Skip to main content

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

Hi All,

A workaround can be done as a patch in CDT for fixing this issue. Since the debug model id ICBreakpoint.C_BREAKPOINTS_DEBUG_MODEL_ID is contributed thru CDT, it should be associated with the debug context ID of "org.eclipse.cdt.debug.core.cbreakpoints" in the plugin.xml of the org.eclipse.cdt.debug.core plugin itself.
This patch will help to fix the issue in CDT, for those vendors who adopt CDT and Eclipse 3.7.x. Also, this patch is harmless in Eclipse 3.8, as 3.8 treats all views from all debug contexts equally.

If this can be done as a patch, should it be contributed as a bugzilla and a patch attached to it, or through bugzilla and gerrit?

Thanks
Abeer Bagul
Tensilica India


On Wed, Apr 4, 2012 at 3:16 PM, Abeer Bagul <abeer4eclipse@xxxxxxxxx> wrote:
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