Search in sources :

Example 1 with DebuggerEventSettingsStorage

use of com.google.security.zynamics.binnavi.debug.models.storage.DebuggerEventSettingsStorage in project binnavi by google.

the class CDebuggerFunctions method sendDebuggerEventSettings.

public static void sendDebuggerEventSettings(final JFrame parent, final IDebugger debugger, final DebugTargetSettings debugTarget) {
    try {
        final DebuggerEventSettingsStorage eventSettingsStorage = new DebuggerEventSettingsStorage(debugger, debugTarget);
        debugger.setDebuggerEventSettings(eventSettingsStorage.deserialize());
    } catch (final DebugExceptionWrapper exception) {
        CUtilityFunctions.logException(exception);
        final String message = "Debugger event settings could not be sent to the debugger.";
        final String description = CUtilityFunctions.createDescription(String.format("BinNavi could not send the debugger event settings to the debug client."), new String[] {}, new String[] { "The default debugger event settings will be used during this session." });
        NaviErrorDialog.show(parent, message, description, exception);
    } catch (final CouldntLoadDataException exception) {
        CUtilityFunctions.logException(exception);
        final String message = "Debugger event settings could not be retrieved from the database.";
        final String description = CUtilityFunctions.createDescription(String.format("BinNavi could not send the debugger event settings to the debug client."), new String[] {}, new String[] { "The default debugger event settings will be used during this session." });
        NaviErrorDialog.show(parent, message, description, exception);
    }
}
Also used : DebuggerEventSettingsStorage(com.google.security.zynamics.binnavi.debug.models.storage.DebuggerEventSettingsStorage) DebugExceptionWrapper(com.google.security.zynamics.binnavi.debug.debugger.DebugExceptionWrapper) CouldntLoadDataException(com.google.security.zynamics.binnavi.Database.Exceptions.CouldntLoadDataException)

Example 2 with DebuggerEventSettingsStorage

use of com.google.security.zynamics.binnavi.debug.models.storage.DebuggerEventSettingsStorage in project binnavi by google.

the class CDebuggerFunctions method writeDebuggerEventSettings.

/**
 * Write the Debugger Event Settings to the per-module storage.
 *
 * @param debugger The currently active debugger.
 * @param debugTarget The currently active debug target.
 * @param eventSettings The event settings to be stored in the database.
 *
 * @throws CouldntSaveDataException Thrown if the data could not be saved.
 */
private static void writeDebuggerEventSettings(final IDebugger debugger, final DebugTargetSettings debugTarget, final DebuggerEventSettings eventSettings) throws CouldntSaveDataException {
    final DebuggerEventSettingsStorage eventSettingsStorage = new DebuggerEventSettingsStorage(debugger, debugTarget);
    eventSettingsStorage.serialize(eventSettings);
}
Also used : DebuggerEventSettingsStorage(com.google.security.zynamics.binnavi.debug.models.storage.DebuggerEventSettingsStorage)

Aggregations

DebuggerEventSettingsStorage (com.google.security.zynamics.binnavi.debug.models.storage.DebuggerEventSettingsStorage)2 CouldntLoadDataException (com.google.security.zynamics.binnavi.Database.Exceptions.CouldntLoadDataException)1 DebugExceptionWrapper (com.google.security.zynamics.binnavi.debug.debugger.DebugExceptionWrapper)1