Open ell1e opened 11 months ago
I pondered this some more and I have a suggestion, I hope I didn't observe the following incorrectly:
When stopped, the purpose of "Run" seems to bring up the dialog and allow me to pick a different binary and then run (although there seems to be a bug where even once the program quits, SeerGDB still think it's running, hence never showing this dialog again but rather asking me if I want to abort and restart even though it's not running). And the purpose of "Start" seems to be to run again without switching binaries. Is that correct?
When just paused or already running though, "Run" and "Start" seem to do exactly the same, which is abort and start over.
If that is correct, maybe "Start" could instead be replaced with "Stop" when the program is running? That way, the toolbar wouldn't even become more cluttered and yet there would be a good spot for this new button.
Hi Ellie,
I apologize, I haven't forgotten about this.
Here's a summary. I hope it makes sense. (And I'm open to improving things).
First, starting Seer from the command line:
$ seergdb -s ./hellopoem # Debug 'hellopoem' and stop in 'main'. You then see the code for 'main'.
$ seergdb -r ./hellopoem # Debug 'hellopoem' with no breakpoints. Program starts immediately. You will see no code. Program stops and end or signals.
$ seergdb -r --bl <file> ./hellopoem # Debug 'hellopoem' with breakpoints from <file>. You will see no code until program encounters breakpoints or encounters signals.
$ seergdb -r --bf <function> ./hellopoem # Debug 'hellopoem' with breakpoint in <function>. You will see no code until program encounters breakpoints or encounters signals.
$ seergdb -r --bs <source:file> ./hellopoem # Debug 'hellopoem' with breakpoint at <source:file>. You will see no code until program encounters breakpoints or encounters signals.
Without -s
or -r
, Seer will always bring up the debug dialog.
$ seergdb ./hellopoem # Debug 'hellopoem' and brings up debug dialog for last second changes.
Once your started debugging, the Run and Start button have these behaviors.
Run - Run (or rerun) the program, only stopping on preexisting breakpoints or when signals are encountered.
Start - Run (or rerun) the program, always breaking in "main".
You are right. Seer always says "the program is already running", even though it isn't. Something for me to fix.
I suggest there should be a prominent "Stop" button
I really like this idea. I've seen other debuggers with it. I've put in a task with the gdb community to provide a function for it. I'd like to hear what they say. There is a kludgy way I could do it, though.
Anyway, the "Run", "Start", and eventual "Stop" buttons can be reworked a little.
Very cool! :heart: Yeah I assumed all the functionality was already there, but just the choice of button texts usually confuses me a little and I expected one that said "Stop". For what it's worth, I'm a bit slower on feedback sometimes simply because some months I have less to do on the C/C++ side so then I just touch Seer less. It's in any case still an absolutely amazing tool.
All good. Thanks for your input!
For my reference.
These 2 threads have a previously proposed "-exec-abort" function for the gdb team.
https://gdb-patches.sourceware.narkive.com/FdZj7eUg/patch-gdb-mi-implement-exec-abort https://inbox.sourceware.org/gdb-patches/D06EC684.17566%25dbrueni@slickedit.com/T/#t
I'm going to combine #162, #192, and #194 together, as they are some what related to the same parts of the code.
I suggest there should be a prominent "Stop" button that unlike the "Interrupt" menu immediately stops the debugged program execution including releasing whatever pause or signal catch from gdb might still be clinging on and reloads the program freshly from disk. Here's my quote from #158 for the rationale: