Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gdb debug #7264

Closed
R3D9477 opened this issue Feb 26, 2018 · 3 comments
Closed

gdb debug #7264

R3D9477 opened this issue Feb 26, 2018 · 3 comments

Comments

@R3D9477
Copy link

R3D9477 commented Feb 26, 2018

Hi. Is it possible to integrate Nim's variables with gdb (now gdb can't evaluate it without workarounds)?

@krux02
Copy link
Contributor

krux02 commented Feb 27, 2018

I have some experience with debugging with the gdb command line tool. And I can write a bit about the experience. First of all, use --debugger:native. Then when your program has debug information you can just debug it with gdb. you can inspect strings already, but it is kind of tedious, because gdb by defaults thinks they are just C structs. But it is possible. Then when you want to set breakpoints. You can use rbreak with the unmangled name in nim. The mangled function name will always contain the unmangled name in nim. Local variables work, too. Thanks to auto completion the mangleing of those names can be completed and is not really a problem. But the overall experience is: not good. It works but it's not good.

@enthus1ast
Copy link
Contributor

there is also this https://github.com/cooldome/Nim-gdb

@krux02
Copy link
Contributor

krux02 commented Oct 28, 2018

well this is now fixed, there are now gdb pretty printers distributed with nim. Just make sure they are loaded (for example with the nim-gdb start script in the bin folder)

@krux02 krux02 closed this as completed Oct 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants