Live data from Hacker News

Automatically download symbols and sources in GDB

sourceware.org

1–10 of 21 posts

Re: Automatically download symbols and sources in GDB

#2
I strongly encourage developments like that. It’s a shame that Linux and macOS didn’t adopt something like Microsoft’s symbol server. This project could become something like this.

If you have an installation like this you can also plug it into Sentry as symbol server and it picks it up.

Re: Automatically download symbols and sources in GDB

#4

Any chance that Linux package managers will integrate this for their -dbg packages? I’d rather not fiddle with downloading those along with -src, untarring it, telling GDB where to find the code…

Very small. I asked before and the consensus was that nobody wants to maintain it. There was a project before (Fedora’s dark server) which died.

That said, debian started indexing build ids in the repos so at least for dwarf files there is a barebones index now. Sadly not for the companion executables.

Re: Automatically download symbols and sources in GDB

#5

I strongly encourage developments like that. It’s a shame that Linux and macOS didn’t adopt something like Microsoft’s symbol server. This project could become something like this. If you have an installation like this you can also plug it into Sentry as symbol server and it picks it up.

Yep, in case of Linux the 'it's OSS. Download the tar.gz configure --enable-debug and deal with it' attitude hampered the development and use of something like a Symbol Server.

Microsoft has had it since at least 2005 - that's the first Visual Studio release I remember using it with - so it might have exited before that. It's things like these that separate MS from all others - Engineering culture of having to give 2 shits about other people - OEMs, developers, corporate IT, partners and having the chops to effectively address it at scale within their Engineering teams.

Re: Automatically download symbols and sources in GDB

#6

I strongly encourage developments like that. It’s a shame that Linux and macOS didn’t adopt something like Microsoft’s symbol server. This project could become something like this. If you have an installation like this you can also plug it into Sentry as symbol server and it picks it up.

Apple runs something similar internally, as it can correlate debug symbols to binaries by checking the UUID the linker sticks in it. Unfortunately, it’s not generally available…

Re: Automatically download symbols and sources in GDB

#7

Any chance that Linux package managers will integrate this for their -dbg packages? I’d rather not fiddle with downloading those along with -src, untarring it, telling GDB where to find the code…

This was originally built by RedHat and they are adding support for Fedora's package manager, which should make debugging in future versions of Fedora an amazing experience. The ability to debug any application on your machine with no effort.

Debuginfod does support debian packages as well (integrating with -dbg pacages), but it does not support src packages. The documentation mentions that this is tricky.

Re: Automatically download symbols and sources in GDB

#8

I strongly encourage developments like that. It’s a shame that Linux and macOS didn’t adopt something like Microsoft’s symbol server. This project could become something like this. If you have an installation like this you can also plug it into Sentry as symbol server and it picks it up.

"Good enough" solutions were already in place for many years, that's why a symbol server was not a matter of urgency. Did you know about the following?

• A package manager can be configured to install the corresponding debuginfo/debugsource packages, this is literally one menu toggle. It's off by default to save disk space, as most users don't need them.

• A desktop environment crash handler (e.g. drkonqi) offers to install the missing debuginfo/debugsource packages and then produces a complete stacktrace.

• gdb shows the command for installing the missing debuginfo/debugsource packages it needs.

Re: Automatically download symbols and sources in GDB

#10
post #8

I strongly encourage developments like that. It’s a shame that Linux and macOS didn’t adopt something like Microsoft’s symbol server. This project could become something like this. If you have an installation like this you can also plug it into Sentry as symbol server and it picks it up.

"Good enough" solutions were already in place for many years, that's why a symbol server was not a matter of urgency. Did you know about the following? • A package manager can be configured to install the corresponding debuginfo/debugsource packages, this is literally one menu toggle. It's off by default to save disk space, as most users don't need them. • A desktop environment crash handler (e.g. drkonqi) offers to…

I'm not aware of those solutions. Very cool! Are they specific to one distro (for example, Fedora)? How do I get gdb to show me the command to installing missing packages?

One downside to those solutions, they only support debugging on the same machine running the executable. If I want to debug a crash dump from a machine different from my own I might not be able to install the packages.

Post reply on HN