diff options
Diffstat (limited to 'dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/FinalLaunchSequence.java')
-rw-r--r-- | dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/FinalLaunchSequence.java | 310 |
1 files changed, 149 insertions, 161 deletions
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/FinalLaunchSequence.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/FinalLaunchSequence.java index b03eb742da3..474c8f34977 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/FinalLaunchSequence.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/FinalLaunchSequence.java @@ -7,11 +7,11 @@ * https://www.eclipse.org/legal/epl-2.0/ * * SPDX-License-Identifier: EPL-2.0 - * + * * Contributors: - * Ericsson - initial API and implementation - * Nokia - create and use backend service. - * IBM Corporation + * Ericsson - initial API and implementation + * Nokia - create and use backend service. + * IBM Corporation * Jens Elmenthaler (Verigy) - Added Full GDB pretty-printing support (bug 302121) * Sergey Prigogin (Google) * Marc Khouzam (Ericsson) - No longer call method to check non-stop for GDB < 7.0 (Bug 365471) @@ -68,7 +68,7 @@ public class FinalLaunchSequence extends ReflectionSequence { private Map<String, Object> fAttributes; private IGDBControl fCommandControl; - private IGDBBackend fGDBBackend; + private IGDBBackend fGDBBackend; private IMIProcesses fProcService; private CommandFactory fCommandFactory; @@ -79,7 +79,8 @@ public class FinalLaunchSequence extends ReflectionSequence { * @since 4.0 */ public FinalLaunchSequence(DsfSession session, Map<String, Object> attributes, RequestMonitorWithProgress rm) { - super(session.getExecutor(), rm, LaunchMessages.getString("FinalLaunchSequence.0"), LaunchMessages.getString("FinalLaunchSequence.1")); //$NON-NLS-1$ //$NON-NLS-2$ + super(session.getExecutor(), rm, LaunchMessages.getString("FinalLaunchSequence.0"), //$NON-NLS-1$ + LaunchMessages.getString("FinalLaunchSequence.1")); //$NON-NLS-1$ fSession = session; fAttributes = attributes; } @@ -105,21 +106,20 @@ public class FinalLaunchSequence extends ReflectionSequence { @Override protected String[] getExecutionOrder(String group) { if (GROUP_TOP_LEVEL.equals(group)) { - return new String[] { - "stepInitializeFinalLaunchSequence", //$NON-NLS-1$ + return new String[] { "stepInitializeFinalLaunchSequence", //$NON-NLS-1$ // Global GDB settings - "stepGDBVersion", //$NON-NLS-1$ - "stepSetEnvironmentDirectory", //$NON-NLS-1$ - "stepSetBreakpointPending", //$NON-NLS-1$ - "stepEnablePrettyPrinting", //$NON-NLS-1$ - "stepSetPrintObject", //$NON-NLS-1$ - "stepSetCharset", //$NON-NLS-1$ - "stepSourceGDBInitFile", //$NON-NLS-1$ - "stepSetAutoLoadSharedLibrarySymbols", //$NON-NLS-1$ - "stepSetSharedLibraryPaths", //$NON-NLS-1$ - "stepSetSourceSubstitutePath", //$NON-NLS-1$ - "stepSetRemoteTimeout", //$NON-NLS-1$ - + "stepGDBVersion", //$NON-NLS-1$ + "stepSetEnvironmentDirectory", //$NON-NLS-1$ + "stepSetBreakpointPending", //$NON-NLS-1$ + "stepEnablePrettyPrinting", //$NON-NLS-1$ + "stepSetPrintObject", //$NON-NLS-1$ + "stepSetCharset", //$NON-NLS-1$ + "stepSourceGDBInitFile", //$NON-NLS-1$ + "stepSetAutoLoadSharedLibrarySymbols", //$NON-NLS-1$ + "stepSetSharedLibraryPaths", //$NON-NLS-1$ + "stepSetSourceSubstitutePath", //$NON-NLS-1$ + "stepSetRemoteTimeout", //$NON-NLS-1$ + // -environment-directory with a lot of paths could // make setting breakpoint incredibly slow, which makes // the debug session un-workable. We simply stop @@ -127,39 +127,41 @@ public class FinalLaunchSequence extends ReflectionSequence { // Bug 225805 // // "stepSetSourceLookupPath", //$NON-NLS-1$ - + // For remote-attach launch only - "stepRemoteConnection", //$NON-NLS-1$ + "stepRemoteConnection", //$NON-NLS-1$ // For all launches except attach ones "stepNewProcess", //$NON-NLS-1$ // For local attach launch only - "stepAttachToProcess", //$NON-NLS-1$ + "stepAttachToProcess", //$NON-NLS-1$ // Global - "stepDataModelInitializationComplete", //$NON-NLS-1$ - "stepCleanup", //$NON-NLS-1$ + "stepDataModelInitializationComplete", //$NON-NLS-1$ + "stepCleanup", //$NON-NLS-1$ }; } return null; } - /** + /** * Initialize the members of the FinalLaunchSequence class. * This step is mandatory for the rest of the sequence to complete. - * @since 4.0 + * @since 4.0 */ @Execute public void stepInitializeFinalLaunchSequence(RequestMonitor requestMonitor) { fTracker = new DsfServicesTracker(GdbPlugin.getBundleContext(), fSession.getId()); fGDBBackend = fTracker.getService(IGDBBackend.class); if (fGDBBackend == null) { - requestMonitor.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, -1, "Cannot obtain GDBBackend service", null)); //$NON-NLS-1$ + requestMonitor.setStatus( + new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, -1, "Cannot obtain GDBBackend service", null)); //$NON-NLS-1$ requestMonitor.done(); return; } fCommandControl = fTracker.getService(IGDBControl.class); if (fCommandControl == null) { - requestMonitor.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, -1, "Cannot obtain control service", null)); //$NON-NLS-1$ + requestMonitor.setStatus( + new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, -1, "Cannot obtain control service", null)); //$NON-NLS-1$ requestMonitor.done(); return; } @@ -168,7 +170,8 @@ public class FinalLaunchSequence extends ReflectionSequence { fProcService = fTracker.getService(IMIProcesses.class); if (fProcService == null) { - requestMonitor.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, -1, "Cannot obtain process service", null)); //$NON-NLS-1$ + requestMonitor.setStatus( + new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, -1, "Cannot obtain process service", null)); //$NON-NLS-1$ requestMonitor.done(); return; } @@ -176,9 +179,9 @@ public class FinalLaunchSequence extends ReflectionSequence { requestMonitor.done(); } - /** + /** * Rollback method for {@link #stepInitializeFinalLaunchSequence()} - * @since 4.0 + * @since 4.0 */ @RollBack("stepInitializeFinalLaunchSequence") public void rollBackInitializeFinalLaunchSequence(RequestMonitor requestMonitor) { @@ -190,13 +193,12 @@ public class FinalLaunchSequence extends ReflectionSequence { } /** - * Print the version of GDB. - * @since 4.6 + * Print the version of GDB. + * @since 4.6 */ @Execute public void stepGDBVersion(final RequestMonitor requestMonitor) { - fCommandControl.queueCommand( - fCommandFactory.createMIGDBVersion(fCommandControl.getContext()), + fCommandControl.queueCommand(fCommandFactory.createMIGDBVersion(fCommandControl.getContext()), new DataRequestMonitor<MIGDBVersionInfo>(getExecutor(), requestMonitor) { @Override protected void handleCompleted() { @@ -207,8 +209,8 @@ public class FinalLaunchSequence extends ReflectionSequence { } /** - * Specify GDB's working directory. - * @since 4.0 + * Specify GDB's working directory. + * @since 4.0 */ @Execute public void stepSetEnvironmentDirectory(final RequestMonitor requestMonitor) { @@ -216,25 +218,26 @@ public class FinalLaunchSequence extends ReflectionSequence { try { dir = fGDBBackend.getGDBWorkingDirectory(); } catch (CoreException e) { - requestMonitor.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, -1, "Cannot get working directory", e)); //$NON-NLS-1$ + requestMonitor + .setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, -1, "Cannot get working directory", e)); //$NON-NLS-1$ requestMonitor.done(); return; } if (dir != null) { fCommandControl.queueCommand( - fCommandFactory.createMIEnvironmentCD(fCommandControl.getContext(), dir.toString()), + fCommandFactory.createMIEnvironmentCD(fCommandControl.getContext(), dir.toString()), new DataRequestMonitor<MIInfo>(getExecutor(), requestMonitor)); } else { requestMonitor.done(); } } - - /** - * Allow breakpoints/tracepoints to be set as pending when using the gdb console - * or a CLI command to create them. - * @since 4.0 - */ + + /** + * Allow breakpoints/tracepoints to be set as pending when using the gdb console + * or a CLI command to create them. + * @since 4.0 + */ @Execute public void stepSetBreakpointPending(final RequestMonitor requestMonitor) { if (fGDBBackend.getSessionType() != SessionType.CORE) { @@ -254,23 +257,21 @@ public class FinalLaunchSequence extends ReflectionSequence { @Execute public void stepEnablePrettyPrinting(final RequestMonitor requestMonitor) { if (Platform.getPreferencesService().getBoolean(GdbPlugin.PLUGIN_ID, - IGdbDebugPreferenceConstants.PREF_ENABLE_PRETTY_PRINTING, - false, null)) { + IGdbDebugPreferenceConstants.PREF_ENABLE_PRETTY_PRINTING, false, null)) { - fCommandControl.enablePrettyPrintingForMIVariableObjects( - new RequestMonitor(getExecutor(), requestMonitor) { + fCommandControl.enablePrettyPrintingForMIVariableObjects(new RequestMonitor(getExecutor(), requestMonitor) { + @Override + protected void handleCompleted() { + fCommandControl.setPrintPythonErrors(false, new ImmediateRequestMonitor() { @Override protected void handleCompleted() { - fCommandControl.setPrintPythonErrors(false, new ImmediateRequestMonitor() { - @Override - protected void handleCompleted() { - // Ignore this error - // Bug 402988 - requestMonitor.done(); - } - }); + // Ignore this error + // Bug 402988 + requestMonitor.done(); } }); + } + }); } else { fCommandControl.setPrintPythonErrors(false, new ImmediateRequestMonitor() { @Override @@ -282,7 +283,7 @@ public class FinalLaunchSequence extends ReflectionSequence { }); } } - + /** * Turn on RTTI usage, if enabled in preferences. * @since 4.1 @@ -291,8 +292,7 @@ public class FinalLaunchSequence extends ReflectionSequence { public void stepSetPrintObject(final RequestMonitor requestMonitor) { // Enable or disable variables type determination based on RTTI. // See bug 377536 for details. - boolean useRtti = Platform.getPreferencesService().getBoolean( - GdbPlugin.PLUGIN_ID, + boolean useRtti = Platform.getPreferencesService().getBoolean(GdbPlugin.PLUGIN_ID, IGdbDebugPreferenceConstants.PREF_USE_RTTI, false, null); fCommandControl.queueCommand( fCommandControl.getCommandFactory().createMIGDBSetPrintObject(fCommandControl.getContext(), useRtti), @@ -301,11 +301,10 @@ public class FinalLaunchSequence extends ReflectionSequence { protected void handleCompleted() { // Not an essential command, so accept errors requestMonitor.done(); - } - } - ); + } + }); } - + /** * Set the charsets. * @since 4.1 @@ -315,31 +314,31 @@ public class FinalLaunchSequence extends ReflectionSequence { // Enable printing of sevenbit-strings. This is required to avoid charset issues. // See bug 307311 for details. fCommandControl.queueCommand( - fCommandFactory.createMIGDBSetPrintSevenbitStrings(fCommandControl.getContext(), true), - new ImmediateDataRequestMonitor<MIInfo>(requestMonitor) { - @Override - protected void handleCompleted() { - // Set the charset to ISO-8859-1. We have to do this here because GDB earlier than - // 7.0 has no proper Unicode support. Note that we can still handle UTF-8 though, as - // we can determine and decode UTF-8 encoded strings on our own. This makes ISO-8859-1 - // the most suitable option here. See the MIStringHandler class and bug 307311 for - // details. - fCommandControl.queueCommand( - fCommandFactory.createMIGDBSetCharset(fCommandControl.getContext(), "ISO-8859-1"), //$NON-NLS-1$ - new ImmediateDataRequestMonitor<MIInfo>(requestMonitor) { - @Override - protected void handleCompleted() { - // Not an essential command, so accept errors - requestMonitor.done(); - } - }); - } - }); + fCommandFactory.createMIGDBSetPrintSevenbitStrings(fCommandControl.getContext(), true), + new ImmediateDataRequestMonitor<MIInfo>(requestMonitor) { + @Override + protected void handleCompleted() { + // Set the charset to ISO-8859-1. We have to do this here because GDB earlier than + // 7.0 has no proper Unicode support. Note that we can still handle UTF-8 though, as + // we can determine and decode UTF-8 encoded strings on our own. This makes ISO-8859-1 + // the most suitable option here. See the MIStringHandler class and bug 307311 for + // details. + fCommandControl.queueCommand( + fCommandFactory.createMIGDBSetCharset(fCommandControl.getContext(), "ISO-8859-1"), //$NON-NLS-1$ + new ImmediateDataRequestMonitor<MIInfo>(requestMonitor) { + @Override + protected void handleCompleted() { + // Not an essential command, so accept errors + requestMonitor.done(); + } + }); + } + }); } /** * Source the gdbinit file specified in the launch. - * @since 4.0 + * @since 4.0 */ @Execute public void stepSourceGDBInitFile(final RequestMonitor requestMonitor) { @@ -348,10 +347,11 @@ public class FinalLaunchSequence extends ReflectionSequence { if (gdbinitFile != null && !gdbinitFile.isEmpty()) { String projectName = (String) fAttributes.get(ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME); - final String expandedGDBInitFile = new DebugStringVariableSubstitutor(projectName).performStringSubstitution(gdbinitFile); + final String expandedGDBInitFile = new DebugStringVariableSubstitutor(projectName) + .performStringSubstitution(gdbinitFile); fCommandControl.queueCommand( - fCommandFactory.createCLISource(fCommandControl.getContext(), expandedGDBInitFile), + fCommandFactory.createCLISource(fCommandControl.getContext(), expandedGDBInitFile), new DataRequestMonitor<MIInfo>(getExecutor(), requestMonitor) { @Override protected void handleCompleted() { @@ -359,7 +359,8 @@ public class FinalLaunchSequence extends ReflectionSequence { // should not consider this an error. // If it is not the default, then the user must have specified it and // we want to warn the user if we can't find it. - if (!expandedGDBInitFile.equals(IGDBLaunchConfigurationConstants.DEBUGGER_GDB_INIT_DEFAULT)) { + if (!expandedGDBInitFile + .equals(IGDBLaunchConfigurationConstants.DEBUGGER_GDB_INIT_DEFAULT)) { requestMonitor.setStatus(getStatus()); } requestMonitor.done(); @@ -369,41 +370,40 @@ public class FinalLaunchSequence extends ReflectionSequence { requestMonitor.done(); } } catch (CoreException e) { - requestMonitor.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, -1, "Cannot get gdbinit option", e)); //$NON-NLS-1$ + requestMonitor + .setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, -1, "Cannot get gdbinit option", e)); //$NON-NLS-1$ requestMonitor.done(); } } /** * Enable non-stop mode if requested. - * @since 4.0 + * @since 4.0 */ // Keep this method in this class for backwards-compatibility, although // it is called only by sub-classes. // It could be moved to FinalLaunchSequence_7_0, otherwise. @Execute public void stepSetNonStop(final RequestMonitor requestMonitor) { - boolean isNonStop = CDebugUtils.getAttribute( - fAttributes, - IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_NON_STOP, - LaunchUtils.getIsNonStopModeDefault()); + boolean isNonStop = CDebugUtils.getAttribute(fAttributes, + IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_NON_STOP, LaunchUtils.getIsNonStopModeDefault()); // GDBs that don't support non-stop don't allow you to set it to false. // We really should set it to false when GDB supports it though. // Something to fix later. if (isNonStop) { - fCommandControl.queueCommand( - fCommandFactory.createMIGDBSetTargetAsync(fCommandControl.getContext(), true), + fCommandControl.queueCommand(fCommandFactory.createMIGDBSetTargetAsync(fCommandControl.getContext(), true), new DataRequestMonitor<MIInfo>(getExecutor(), requestMonitor) { @Override protected void handleSuccess() { fCommandControl.queueCommand( - fCommandFactory.createMIGDBSetPagination(fCommandControl.getContext(), false), + fCommandFactory.createMIGDBSetPagination(fCommandControl.getContext(), false), new DataRequestMonitor<MIInfo>(getExecutor(), requestMonitor) { @Override protected void handleSuccess() { fCommandControl.queueCommand( - fCommandFactory.createMIGDBSetNonStop(fCommandControl.getContext(), true), + fCommandFactory.createMIGDBSetNonStop(fCommandControl.getContext(), + true), new DataRequestMonitor<MIInfo>(getExecutor(), requestMonitor)); } }); @@ -411,8 +411,7 @@ public class FinalLaunchSequence extends ReflectionSequence { }); } else { // Explicitly set target-async to off for all-stop mode. - fCommandControl.queueCommand( - fCommandFactory.createMIGDBSetTargetAsync(fCommandControl.getContext(), false), + fCommandControl.queueCommand(fCommandFactory.createMIGDBSetTargetAsync(fCommandControl.getContext(), false), new DataRequestMonitor<MIInfo>(getExecutor(), requestMonitor) { @Override protected void handleError() { @@ -426,23 +425,21 @@ public class FinalLaunchSequence extends ReflectionSequence { /** * Tell GDB to automatically load or not the shared library symbols - * @since 4.0 + * @since 4.0 */ @Execute public void stepSetAutoLoadSharedLibrarySymbols(RequestMonitor requestMonitor) { - boolean autolib = CDebugUtils.getAttribute( - fAttributes, + boolean autolib = CDebugUtils.getAttribute(fAttributes, IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_AUTO_SOLIB, IGDBLaunchConfigurationConstants.DEBUGGER_AUTO_SOLIB_DEFAULT); - fCommandControl.queueCommand( - fCommandFactory.createMIGDBSetAutoSolib(fCommandControl.getContext(), autolib), + fCommandControl.queueCommand(fCommandFactory.createMIGDBSetAutoSolib(fCommandControl.getContext(), autolib), new DataRequestMonitor<MIInfo>(getExecutor(), requestMonitor)); } /** * Set the shared library paths. - * @since 4.0 + * @since 4.0 */ @Execute public void stepSetSharedLibraryPaths(final RequestMonitor requestMonitor) { @@ -452,7 +449,7 @@ public class FinalLaunchSequence extends ReflectionSequence { if (!p.isEmpty()) { String[] paths = p.toArray(new String[p.size()]); fCommandControl.queueCommand( - fCommandFactory.createMIGDBSetSolibSearchPath(fCommandControl.getContext(), paths), + fCommandFactory.createMIGDBSetSolibSearchPath(fCommandControl.getContext(), paths), new DataRequestMonitor<MIInfo>(getExecutor(), requestMonitor) { @Override protected void handleSuccess() { @@ -464,7 +461,7 @@ public class FinalLaunchSequence extends ReflectionSequence { // // in the GDB documentation. This is to avoid the sysroot // // variable finding libraries that were not meant to be found. // fCommandControl.queueCommand( - // new MIGDBSetSysroot(fCommandControl.getContext()), + // new MIGDBSetSysroot(fCommandControl.getContext()), // new DataRequestMonitor<MIInfo>(getExecutor(), requestMonitor)); }; }); @@ -472,21 +469,22 @@ public class FinalLaunchSequence extends ReflectionSequence { requestMonitor.done(); } } catch (CoreException e) { - requestMonitor.setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, -1, "Cannot set share library paths", e)); //$NON-NLS-1$ + requestMonitor + .setStatus(new Status(IStatus.ERROR, GdbPlugin.PLUGIN_ID, -1, "Cannot set share library paths", e)); //$NON-NLS-1$ requestMonitor.done(); } } /** * Setup the source paths. - * @since 4.0 + * @since 4.0 */ @Execute public void stepSetSourceLookupPath(RequestMonitor requestMonitor) { CSourceLookup sourceLookup = fTracker.getService(CSourceLookup.class); - ILaunch launch = (ILaunch)fSession.getModelAdapter(ILaunch.class); - CSourceLookupDirector locator = (CSourceLookupDirector)launch.getSourceLocator(); - ISourceLookupDMContext sourceLookupDmc = (ISourceLookupDMContext)fCommandControl.getContext(); + ILaunch launch = (ILaunch) fSession.getModelAdapter(ILaunch.class); + CSourceLookupDirector locator = (CSourceLookupDirector) launch.getSourceLocator(); + ISourceLookupDMContext sourceLookupDmc = (ISourceLookupDMContext) fCommandControl.getContext(); sourceLookup.setSourceLookupPath(sourceLookupDmc, locator.getSourceContainers(), requestMonitor); } @@ -514,7 +512,7 @@ public class FinalLaunchSequence extends ReflectionSequence { /** * Before starting a remote connection, set the gdb remotetimeout to the user * specified value. - * + * * @since 5.5 */ @Execute @@ -544,40 +542,33 @@ public class FinalLaunchSequence extends ReflectionSequence { rm.done(); } - private static final String INVALID = "invalid"; //$NON-NLS-1$ - /** + private static final String INVALID = "invalid"; //$NON-NLS-1$ + + /** * If we are dealing with a remote-attach debugging session, connect to the target. * @since 4.0 */ @Execute public void stepRemoteConnection(final RequestMonitor rm) { if (fGDBBackend.getSessionType() == SessionType.REMOTE && fGDBBackend.getIsAttachSession()) { - boolean isTcpConnection = CDebugUtils.getAttribute( - fAttributes, - IGDBLaunchConfigurationConstants.ATTR_REMOTE_TCP, - false); + boolean isTcpConnection = CDebugUtils.getAttribute(fAttributes, + IGDBLaunchConfigurationConstants.ATTR_REMOTE_TCP, false); if (isTcpConnection) { - String remoteTcpHost = CDebugUtils.getAttribute( - fAttributes, - IGDBLaunchConfigurationConstants.ATTR_HOST, INVALID); - String remoteTcpPort = CDebugUtils.getAttribute( - fAttributes, - IGDBLaunchConfigurationConstants.ATTR_PORT, INVALID); + String remoteTcpHost = CDebugUtils.getAttribute(fAttributes, IGDBLaunchConfigurationConstants.ATTR_HOST, + INVALID); + String remoteTcpPort = CDebugUtils.getAttribute(fAttributes, IGDBLaunchConfigurationConstants.ATTR_PORT, + INVALID); - fCommandControl.queueCommand( - fCommandFactory.createMITargetSelect(fCommandControl.getContext(), - remoteTcpHost, remoteTcpPort, true), - new ImmediateDataRequestMonitor<MIInfo>(rm)); + fCommandControl.queueCommand(fCommandFactory.createMITargetSelect(fCommandControl.getContext(), + remoteTcpHost, remoteTcpPort, true), new ImmediateDataRequestMonitor<MIInfo>(rm)); } else { - String serialDevice = CDebugUtils.getAttribute( - fAttributes, - IGDBLaunchConfigurationConstants.ATTR_DEV, INVALID); + String serialDevice = CDebugUtils.getAttribute(fAttributes, IGDBLaunchConfigurationConstants.ATTR_DEV, + INVALID); fCommandControl.queueCommand( - fCommandFactory.createMITargetSelect(fCommandControl.getContext(), - serialDevice, true), - new ImmediateDataRequestMonitor<MIInfo>(rm)); + fCommandFactory.createMITargetSelect(fCommandControl.getContext(), serialDevice, true), + new ImmediateDataRequestMonitor<MIInfo>(rm)); } } else { rm.done(); @@ -592,8 +583,7 @@ public class FinalLaunchSequence extends ReflectionSequence { @Execute public void stepNewProcess(final RequestMonitor rm) { if (!fGDBBackend.getIsAttachSession()) { - boolean noBinarySpecified = CDebugUtils.getAttribute( - fAttributes, + boolean noBinarySpecified = CDebugUtils.getAttribute(fAttributes, IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_USE_SOLIB_SYMBOLS_FOR_APP, IGDBLaunchConfigurationConstants.DEBUGGER_USE_SOLIB_SYMBOLS_FOR_APP_DEFAULT); @@ -605,18 +595,18 @@ public class FinalLaunchSequence extends ReflectionSequence { // Even if binary is null, we must call this to do all the other steps // necessary to create a process. It is possible that the binary is not needed - fProcService.debugNewProcess(fCommandControl.getContext(), binary, fAttributes, + fProcService.debugNewProcess(fCommandControl.getContext(), binary, fAttributes, new DataRequestMonitor<IDMContext>(getExecutor(), rm) { - @Override - protected void handleCancel() { - // If this step is cancelled, cancel the current sequence. - // This is to allow the user to press the cancel button - // when prompted for a post-mortem file. - // Bug 362105 - rm.cancel(); - rm.done(); - } - }); + @Override + protected void handleCancel() { + // If this step is cancelled, cancel the current sequence. + // This is to allow the user to press the cancel button + // when prompted for a post-mortem file. + // Bug 362105 + rm.cancel(); + rm.done(); + } + }); } else { rm.done(); } @@ -624,26 +614,25 @@ public class FinalLaunchSequence extends ReflectionSequence { /** * If we are dealing with an local attach session, perform the attach. - * For a remote attach session, we don't attach during the launch; instead - * we wait for the user to manually do the attach. - * @since 4.0 + * For a remote attach session, we don't attach during the launch; instead + * we wait for the user to manually do the attach. + * @since 4.0 */ @Execute public void stepAttachToProcess(final RequestMonitor requestMonitor) { if (fGDBBackend.getIsAttachSession() && fGDBBackend.getSessionType() != SessionType.REMOTE) { // Is the process id already stored in the launch? - int pid = CDebugUtils.getAttribute( - fAttributes, - ICDTLaunchConfigurationConstants.ATTR_ATTACH_PROCESS_ID, -1); + int pid = CDebugUtils.getAttribute(fAttributes, ICDTLaunchConfigurationConstants.ATTR_ATTACH_PROCESS_ID, + -1); if (pid != -1) { fProcService.attachDebuggerToProcess( fProcService.createProcessContext(fCommandControl.getContext(), Integer.toString(pid)), new DataRequestMonitor<IDMContext>(getExecutor(), requestMonitor)); } else { - IConnectHandler connectCommand = (IConnectHandler)fSession.getModelAdapter(IConnectHandler.class); + IConnectHandler connectCommand = (IConnectHandler) fSession.getModelAdapter(IConnectHandler.class); if (connectCommand instanceof IConnect) { - ((IConnect)connectCommand).connect(requestMonitor); + ((IConnect) connectCommand).connect(requestMonitor); } else { requestMonitor.done(); } @@ -652,7 +641,7 @@ public class FinalLaunchSequence extends ReflectionSequence { requestMonitor.done(); } } - + /** * Indicate that the Data Model has been filled. This will trigger the Debug view to expand. * @since 4.0 @@ -663,7 +652,7 @@ public class FinalLaunchSequence extends ReflectionSequence { fCommandControl.getProperties()); requestMonitor.done(); } - + /** * Cleanup now that the sequence has been run. * @since 4.0 @@ -675,4 +664,3 @@ public class FinalLaunchSequence extends ReflectionSequence { requestMonitor.done(); } } - |