4 ms·
I'll preface this by saying that I don't have that much C or C++ experience. Now on to the topic of debugging em: I'd suggest trying out lldb [0] as an alterna
by TheAceOfHearts 8y ago
I'll preface this by saying that I don't have that much C or C++ experience. Now on to the topic of debugging em:
I'd suggest trying out lldb [0] as an alternative to gdb. In general it has more sensible commands [1] and it can be scripted with python.
If you're willing to pay, CLion [2] is amazing and it includes an interactive debugger [3] which, IMO, completely blows away these CLI tools.
[0] https://lldb.llvm.org/index.html https://lldb.llvm.org/index.html
[1] https://lldb.llvm.org/lldb-gdb.html https://lldb.llvm.org/lldb-gdb.html
[2] https://www.jetbrains.com/clion/ https://www.jetbrains.com/clion/
[3] https://www.youtube.com/watch?v=wUZyoAnPdCY https://www.youtube.com/watch?v=wUZyoAnPdCY
- userbinator 8y agoIn general it has more sensible commands I completely disagree (and I don't think GDB's command set is all that great either); the page you linked shows that LLDB's commands are even longer, which is extremely annoying when you're forced to use it for any length of time. Getting a good standard hexdump out of either is a pain too, and LLDB has this ridiculously stupid arbitrary limit of 1024 bytes to display each command (which can be overridden by specifying an additional option each time, but... why!?) I think "more sensible commands" would be what WinDbg and SoftICE have. Short and unobtrusive.
- saagarjha 8y ago> the page you linked shows that LLDB's commands are even longer Where? In almost all cases, LLDB has an alias for the GDB command.
- danellis 8y agoHow is CLion for embedded work these days? If I have, say, an ARM GDB server running, can I use that with CLion's debugger?
- davidrm 8y agoKind of. After connecting to the gdb server, CLion's GDB client usually sends some commands (IIRC start) that will not return a proper response because the server does not support it. Our solution was writing a wrapper to the GDB's machine interface that just ate the problematic commands that are being sent and from then on it works. I don't know if it has been fixed, this is the most recent article i found and it's been a while since I last tried to tackle this problem (previous job). https://blog.jetbrains.com/clion/2017/12/clion-for-embedded-development-part-ii/ https://blog.jetbrains.com/clion/2017/12/clion-for-embedded-...
- tomjakubowski 8y agogdb has been scriptable with python since 7.0 https://sourceware.org/gdb/onlinedocs/gdb/Python.html#Python https://sourceware.org/gdb/onlinedocs/gdb/Python.html#Python