Hacker News new | ask | show | jobs
by genpfault 588 days ago
Only works if GDB has been built with TUI support, sadly :(
2 comments

… If you are debugging c code surely you’re able to compile a debugger with whatever options you want?
In theory, yes, but in practice, people who know how to compile gdb is a small subset of people who need to debug c code.

Not to mention that it actually takes extra time to do so, when people are used to debug Python/JavaScript/Go code with one single click these days.

Just grabbed the source, and it's a pretty bog standard ./configure ; make. Simple build instructions in the readme. Not sure this is a daunting challenge for any even moderately skilled developer.
Most people who use C nowadays are students, not "moderately skilled developers".

Students barely know how to manually put together a Makefile.

As long as the number of programmers is growing rapidly, it’s likely that most people who use any language are probably students. The distribution automatically skews toward beginner.

That has no bearing on whether we should have good tools for skilled developers, including debuggers & makefiles & source distributions. Eventually, students become moderately skilled. And we used gdb in class when I was a student.

> That has no bearing on whether we should have good tools for skilled developers, including debuggers & makefiles & source distributions.

Unfortunately, it's also the best explanation as for why we don't have them in practice, and why all software seems perpetually developed by fresh juniors (because it is).

> Most people who use C nowadays are students, not "moderately skilled developers".

That seems a very dubious claim, especially since most students begin with Python or JS. Do you have any data to back that up?

Where? How?

Last time I tried to build GDB from source, which was some two months ago, it wasn't in any way simple. GDB comes embedded in some GNU binutils repo, instructions to build it in isolation weren't obvious.

I ended up creating a new VM with a more recent Linux distro, that came with newer GDB, and migrating everything I'm working on to it, because that was much easier than building GDB from source.

The GDB source is available as a standalone package: https://www.sourceware.org/gdb/download/
I'm not sure where you've been looking, but source tarballs have been available from both gnu.org and the GDB website for over 20 years, with every major release going back 30 years available for download.
Is it not usually? I've never had to compile gdb myself to get TUI
This has definitely been an issue for me before, I think at least for a while Ubuntu/Debian didn't ship gdb with tui enabled, you had to build it yourself.
Only seen on some minor embeded systems but it’s not a big deal to compile gdb with tui support enabled.