Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Setting correct state for suspend/resume icons in debugger

Hi David,

I see you didn't get an answer yet.  People have been pretty busy with our upcoming release.

Did you make any progress on your issue?  If not, let me ask if you are getting a *stopped event after the -exec-interrupt you send.  If you don't then CDT does not realize the program has been interrupted.

Marc

________________________________________
From: cdt-dev-bounces@xxxxxxxxxxx [cdt-dev-bounces@xxxxxxxxxxx] on behalf of David Wootton [drwootton@xxxxxxxxxx]
Sent: January 13, 2015 11:51 AM
To: cdt-dev@eclipse org
Subject: [cdt-dev] Setting correct state for suspend/resume icons in debugger

I'm trying to implement function in my debugger plugins that is a combination of the CDT debugger attach and launch modes. From the perspective of the CDT debugger, the session looks like a launch, but my plugin is actually attaching to a running process thru an agent that my plugin connects gdb to by having gdb issue a 'target remote' command.

I have this working where my plugin establishes the connection, then suspends the running process by issuing an '-exec-interrupt' command. At this point, the user can set breakpoints and resume execution.

I am issuing the -exec-interrupt command from the stepRunProgram method in my class that extends StartOrRestartProcessSequence_7_0.

The problem is that even though the 'resume' icon is enabled, when I click it, the resume icon is disabled but the 'suspend' icon is not enabled. Once the first breakpoint is reached, the state of the icons is correct and they work correctly.

I tried fixing this by getting access to the IDebugTarget object to suspend the application but it seems that it has not been created yet. When I try to access it thru the ILaunch object, its value is null.

Then I tried getting access to the IRunControl object and calling its suspend() method,but that resulted in an error message telling me the program was already suspended. I then tried calling the resume() method on the IRunControl object then calling suspend() but that did not help.

The other problem I have, maybe related, is that if I click the single step icon and the program suspended somewhere in a library function or then the single step fails with a message from gdb telling me gdb can't determine the bounds of the function. If the program suspends in the application itself, then single step works correctly.

I'm looking for suggestion of other ways to approach getting the program into a suspended stare when my plugin connects to it.

Thanks
Dave
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/cdt-dev


Back to the top