Community
Participate
Working Groups
CDT provides generic actions for Run to Line, Move to Line and Resume at Line. The TCF debugger should provide support for those both in the editor and in the disassembly view.
Created attachment 184942 [details] Implements special run control support Known limitations: - The preference "Skip breakpoints during a 'Run to Line' operation" is ignored - After move-to-line, the current stack frame and IP annotation only update if an execution context is selected, but not when the top stack frame is selected.
Created attachment 184949 [details] Implements special run control support (2) Fixed a little bug in previous patch.
I'm having a problem with the patch. The patch adds this call at the plugin startup: EvaluationContextManager.startup(); It causes Eclipse to crash: !ENTRY org.eclipse.osgi 4 0 2010-12-13 11:22:57.125 !MESSAGE Application error !STACK 1 org.eclipse.swt.SWTException: Invalid thread access at org.eclipse.swt.SWT.error(SWT.java:4083) at org.eclipse.swt.SWT.error(SWT.java:3998) at org.eclipse.swt.SWT.error(SWT.java:3969) at org.eclipse.swt.widgets.Display.error(Display.java:1249) at org.eclipse.swt.widgets.Display.checkDevice(Display.java:755) at org.eclipse.swt.widgets.Display.addListener(Display.java:617) at org.eclipse.ui.internal.ide.application.IDEWorkbenchAdvisor.<init>(IDEWorkbenchAdvisor.java:170) at org.eclipse.ui.internal.ide.application.IDEWorkbenchAdvisor.<init>(IDEWorkbenchAdvisor.java:178) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:116) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:619) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574) at org.eclipse.equinox.launcher.Main.run(Main.java:1407) at org.eclipse.equinox.launcher.Main.main(Main.java:1383) The root cause appears to be Display object that is created too early and on a wrong thread by calling Display.getDefault() from EvaluationContextManager.startup(). As result, Start Level Event Dispatcher thread becomes the display thread, instead of Main.
Interesting. I did not run into this problem, but I see that it's possible. I'll fix that.
Created attachment 185120 [details] Implements special run control support (3) I still cannot reproduce, but using a WorkbenchJob to initialize the EvaluationContextManager should fix the problem.
It works now. I have committed the patch, with few changes: 1. I changed the code to use cached registers info. 2. I added TCFModel.setDebugViewSelection() call to update current stack frame and IP annotation after move-to-line. Thanks!
(In reply to comment #6) > 1. I changed the code to use cached registers info. > 2. I added TCFModel.setDebugViewSelection() call to update current stack frame > and IP annotation after move-to-line. Great, thanks. I didn't notice there is API for that.
Bulk change: Marking all bugs from the TM era (until June 2011) target 0.3