What is everyone using for debugger on Linux?

Discuss anything related to product development
Post Reply
seasoned_geek
Posts: 254
Joined: Thu Jun 11 2020 12:18 pm

What is everyone using for debugger on Linux?

Post by seasoned_geek »

Hello,
Been making all of the Diamond source changes using GUI Emacs. Until I get the changes done Emacs is the closest thing I can get to what I want, but it is annoyingly wrong in certain places. I'm not great with the GDB command line, but can normally muddle through. Not with CopperSpice.

http://www.logikalsolutions.com/wordpress/wp-content/uploads/2020/07/debug-2.png

I followed all of the instructions I found, but there is no joy in Mudville. Just trying to examine a CopperSpice string is rather brutal. I do have a debug build and can examine any non-CopperSpice things just fine.

# =============================================================================
# Project: diamond
# Configuration: Debug
# =============================================================================

I tried Gede because it works great with GnuCOBOL. Poor thing died horribly.

If there is just something I need to tweak so I can examine CopperSpice classes correctly that would be great. This is my first exposure to ninja, but my gut tells me we are missing some kind of compiler option or Linux PATH setting.

Even using Atom gdb interface it is not a pretty thing.

http://www.logikalsolutions.com/wordpress/wp-content/uploads/2020/07/debug-5.png

I assume there is an answer other than "suck it up."
tim
Posts: 11
Joined: Tue Oct 15 2019 7:45 pm

Re: What is everyone using for debugger on Linux?

Post by tim »

Hello seasoned_geek,

When it comes to debugging on Linux GDB is essentially the most complete and best solution. You could have a look at LLDB which is similar to GDB, but part of the LLVM ecosystem. There are some GUI tools you may want to try out, a relatively new one is https://github.com/snare/voltron, a more mature GUI is https://www.gnu.org/software/ddd/.

Regarding strings, you might be interested in playing with GDB's python interface, you could take the individual codepoints / characters from the data structure and format them as a string for better readability. I don't have a more convenient solution for you right now, but I'll also have a look at how far I can get with GDB and python.

Tim.
tim
Posts: 11
Joined: Tue Oct 15 2019 7:45 pm

Re: What is everyone using for debugger on Linux?

Post by tim »

In case you are trying to pick this up the following seems like a good resource to start with https://www-zeuthen.desy.de/dv/documentation/unixguide/infohtml/gdb/Writing-a-Pretty_002dPrinter.html
seasoned_geek
Posts: 254
Joined: Thu Jun 11 2020 12:18 pm

Re: What is everyone using for debugger on Linux?

Post by seasoned_geek »

tim wrote: Wed Jul 15 2020 12:40 pm Hello seasoned_geek,

When it comes to debugging on Linux GDB is essentially the most complete and best solution. You could have a look at LLDB which is similar to GDB, but part of the LLVM ecosystem. There are some GUI tools you may want to try out, a relatively new one is https://github.com/snare/voltron, a more mature GUI is https://www.gnu.org/software/ddd/.

Regarding strings, you might be interested in playing with GDB's python interface, you could take the individual codepoints / characters from the data structure and format them as a string for better readability. I don't have a more convenient solution for you right now, but I'll also have a look at how far I can get with GDB and python.

Tim.
Thanks, no rush. I muddled through with a combination of VSCodium and Emacs debugging, hopping along with the default debugger qDebug(). I'm past the point I needed it.
At some point I will look at hacking/porting GEDE http://gede.acidron.com/ if I continue with CopperSpice. That's a GDB interface written in Qt so it shouldn't be too horrible to port . . . he said before he was never heard from again <Grin>
Post Reply