Automatically download symbols and sources in GDB(sourceware.org) |
Automatically download symbols and sources in GDB(sourceware.org) |
[0] https://github.com/edolstra/dwarffs/blob/master/README.md
If you have an installation like this you can also plug it into Sentry as symbol server and it picks it up.
• 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.
In Ubuntu I found it slightly confusing to locate debug symbol packages. I understood (or misunderstood) that there are 2 options where to find debug symbols and it just depends on the package maintainer how it's done. I did not find how to install debugsource at all.
By doing debugsource I mean the source that has all the patches applied exactly as during the build and is in the same path as the symbols suggest.
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.
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.
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.
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.
no
> How do I get gdb to show me the command
With the "run" command. You get a message "Missing separate debuginfos, use:" and then debuginfo-install, zypper etc. depending on the distro.
It’s a much better mechanism than anything I’ve looked at in the Linux space (caveat: I have not been developing C++ for a while).
I was so impressed I started looking at what it would take to implement for the gcc/gdb toolchain but discovered Microsoft held a patent and gave up.
Oh and the debuginfo packages used to be and still are huge in size. Not sure if anything has changed most recently but the concept of lazy loading symbols from remote and storing only what you need locally is not something you can do with debuginfo packages.