Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
gdb: breakpoints with dynamic library #74
With dynamic library saying, I have:
library.cc -> library.so
If I dap-add-breakpoint on library.cc:58 on
But dap will ignore with no breakpoint set. So I cannot step into program. Is there any template argument I can configure with?
Usually when I do gdb, I will enter
@qqldd I do not have gdb/lldb expertize, so in order to work on this issue I will need detailed steps to reproduce(e. g. how to build shared lib, etc). As far as I can see from Native Debug readme there are some limitations related to setting breakpoints when using gdb(e. g. you should stop the thread and then set the breakpoint) which is a pretty severe limitation and might be related to the problem. The full list of configuration settings could be found here - https://github.com/WebFreak001/code-debug/blob/master/package.json and I don't see a setting related to your problem.
PS: We might try to integrate with the gdb dap adapter implemented by MS which I suspect which be more functional(https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools).
Hmm after I write below down, I cannot reproduce this issue using following example even with same output as I describe above. The breakpoints actually useful. I will still keep following for now:
I will modify the command from here to provide instructions on how to create dynamic library: https://www.cprogramming.com/tutorial/shared-libraries-linux-gcc.html
Put foo.c and main.c in same folder and execute following comment in shell:
It will output
After that, if I do:
But this is not the case after program is running since libfoo.so is loaded:
In Eamcs, if I setup a breakpoint at foo.c:3, it will outputs
Yes, it stops. Lol...
I need to see why the complicate one not is not stopping.