コード例 #1
0
  /**
   * Initialize the members of the DebugNewProcessSequence class. This step is mandatory for the
   * rest of the sequence to complete.
   */
  @Execute
  public void stepInitializeBaseSequence(RequestMonitor rm) {
    fTracker = new DsfServicesTracker(GdbPlugin.getBundleContext(), fContext.getSessionId());
    fBackend = fTracker.getService(IGDBBackend.class);
    fCommandControl = fTracker.getService(IGDBControl.class);
    fCommandFactory = fTracker.getService(IMICommandControl.class).getCommandFactory();
    fProcService = fTracker.getService(IGDBProcesses.class);

    if (fBackend == null
        || fCommandControl == null
        || fCommandFactory == null
        || fProcService == null) {
      rm.setStatus(
          new Status(
              IStatus.ERROR,
              GdbPlugin.PLUGIN_ID,
              IDsfStatusConstants.INTERNAL_ERROR,
              "Cannot obtain service",
              null)); //$NON-NLS-1$
      rm.done();
      return;
    }

    // When we are starting to debug a new process, the container is the default process used by
    // GDB.
    // We don't have a pid yet, so we can simply create the container with the UNIQUE_GROUP_ID
    setContainerContext(
        fProcService.createContainerContextFromGroupId(
            fCommandControl.getContext(), MIProcesses.UNIQUE_GROUP_ID));

    rm.done();
  }
コード例 #2
0
  /**
   * Initialize the members of the StartOrRestartProcessSequence_7_0 class. This step is mandatory
   * for the rest of the sequence to complete.
   */
  @Execute
  public void stepInitializeBaseSequence(RequestMonitor rm) {
    fTracker = new DsfServicesTracker(GdbPlugin.getBundleContext(), fContainerDmc.getSessionId());
    fCommandControl = fTracker.getService(IGDBControl.class);
    fCommandFactory = fTracker.getService(IMICommandControl.class).getCommandFactory();
    fProcService = fTracker.getService(IGDBProcesses.class);
    fBackend = fTracker.getService(IGDBBackend.class);

    if (fCommandControl == null || fCommandFactory == null || fProcService == null) {
      rm.setStatus(
          new Status(
              IStatus.ERROR,
              GdbPlugin.PLUGIN_ID,
              IDsfStatusConstants.INTERNAL_ERROR,
              "Cannot obtain service",
              null)); //$NON-NLS-1$
      rm.done();
      return;
    }

    fReverseService = fTracker.getService(IReverseRunControl.class);
    if (fReverseService != null) {
      // Although the option to use reverse debugging could be on, we only check
      // it if we actually have a reverse debugging service.  There is no point
      // in trying to handle reverse debugging if it is not available.
      fReverseEnabled =
          CDebugUtils.getAttribute(
              fAttributes,
              IGDBLaunchConfigurationConstants.ATTR_DEBUGGER_REVERSE,
              IGDBLaunchConfigurationConstants.DEBUGGER_REVERSE_DEFAULT);
    }

    rm.done();
  }
コード例 #3
0
ファイル: MIDisassembly.java プロジェクト: Mathiasdm/cdt
 /* (non-Javadoc)
  * @see org.eclipse.cdt.dsf.service.AbstractDsfService#getBundleContext()
  */
 @Override
 protected BundleContext getBundleContext() {
   return GdbPlugin.getBundleContext();
 }