Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] Register view is hidden when debug session starts

Hi All,

This is a problem observed on Eclipse 3.7:

1. Keep register view open, start a DSF debug session
2. The register view is hidden and Variables view is activated when the session starts.

The bug is that GdbAdapterFactory defines two debug models, GdbLaunchDelegate.GDB_DEBUG_MODEL_ID and ICBreakpoint.C_BREAKPOINTS_DEBUG_MODEL_ID.

Of these two debug models, GdbLaunchDelegate.GDB_DEBUG_MODEL_ID is associated with the debug context ID "org.eclipse.cdt.debug.ui.debugging" via org.eclipse.cdt.dsf.gdb.ui/plugin.xml, but the debug model ICBreakpoint.C_BREAKPOINTS_DEBUG_MODEL_ID is not associated with any context ID.

When a dsf gdb session starts, the eclipse debug platform creates a default context id association for the debug model ICBreakpoint.C_BREAKPOINTS_DEBUG_MODEL_ID, and associates it with the platform debug context, i.e. DebugModelContextBindingManager.DEBUG_CONTEXT.

Due to code in ViewContextService.contextActivated(...), the platform debug context gets precedence in activation, and the Register view, which is associated with the debug context  "org.eclipse.cdt.debug.ui.debugging" is pushed back. The Variables view is associated with the platform debug context, and hence it is activated. This method seems to be fixed in Eclipse 3.8M6, so now all views are treated equally.

However, if someone is shipping Eclipse 3.7.x, you might face this bug that Register View is hidden. The workaround is to add the following extension definition to any of your own plugin.xml files:

   <extension
         point="org.eclipse.debug.ui.debugModelContextBindings">
      <modelContextBinding
            contextId="org.eclipse.cdt.debug.ui.debugging"
            debugModelId="org.eclipse.cdt.debug.core.cbreakpoints">
      </modelContextBinding>
   </extension>

Am not posting this as a bug and a patch, because dont know if there will be a 3.7.3 release, and the bug is fixed in 3.8, so it will only affect those who are shipping product based on 3.7.x

Thanks
Abeer Bagul
Tensilica India


Back to the top