Closed DarkDefender closed 1 year ago
Can you try this?
When creating the breakpoint, click on the "Pending" option. The fast way of creating a breakpoint (double-clicking a line of source) will not turn this on by default. However, the RMB on a line of source will give you an opportunity to enable this. Same with the "Add a new breakpoint" button in the breakpoint list.
Let me know how it turns out.
Ah, I wasn't clear enough. I'm talking about creating breakpoints for function names. So either here:
Or when passing a break function_X
command in the "gdb commands before run" panel.
When debugging larger projects I usually specify functions and only fall back to filenames and line number where there is a naming conflict. Do you think specifying function names like this when libraries are involved would be something you would support in the future?
Ah, I see. Thanks for the use case. To confirm, the "Break in" function is in a shared library that hasn't been loaded yet?
If native gdb can do it, Seer should be able to. I'll work on it.
To confirm, the "Break in" function is in a shared library that hasn't been loaded yet?
Yepp, that is correct.
If native gdb can do it, Seer should be able to. I'll work on it.
Thank you! Would it be possible to also introduce break points like these when pausing execution of the program as well? From what I can tell, it seems like it is only possible to define line breakpoints with the current UI after seergdb has attached itself to the program.
only possible to define line breakpoints
I think I understand your question. Try this.
In the Breakpoints tab, click on the New Breakpoint button.
It will bring up a blank Breakpoint dialog.
Then enter the function name on the Function edit field - and select Pending. Click OK.
You should see it appear in the list of breakpoints.
A note, though. Once you populate these breakpoints, you can save them to a file. Kind of like a project file for your executable.
The next time you run Seer, you can load this breakpoint file.
Or:
% seergdb --break-load breakpoints.seer myprogram one two three
Ah, sorry, I am blind XD I could have sworn that I didn't see any "Function" entry in the "create new breakpoint" dialogue. Sorry for wasting your time.
It's all good.
I'll still look into adding the "Pending" flag for the "Break in" method.
I'm going to keep this task opened for a little longer.
The latest snapshot has the fix. Specifying a function name in the "Break in" text field will add the "pending" flag.
Closing task. Reopen or create a new task if required.
I'm trying to debug some KDE applications and a lot of the code is not compiled into the binary but shared libraries that is loaded at run time. When I try to put break points in regular gdb, I simply just answer "yes" to the
Make breakpoint pending on future shared library load?
question and I'm good.However in seer this doesn't seem to be possible, so I can't really debug the application properly as only a tiny fraction of the program is included in the binary.
Would it be possible to add an option for this in the future?