News for hackers. Stuff that matters.
Re:Automatically download symbols and sources in GDB by bmn__ on Sunday June 07, 2020 @03:41PM (#23450094)
"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 by usr1106 on Sunday June 07, 2020 @09:49PM (#23452805)
In Opensuse (release, haven't used Tumbleweed) I found it easy to install debuginfo and debugsource packages.

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.

Re:Automatically download symbols and sources in GDB by schultetwin1 on Sunday June 07, 2020 @05:25PM (#23450980)
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.

Re:Automatically download symbols and sources in GDB by bmn__ on Sunday June 07, 2020 @06:37PM (#23451609)
> Are they specific to one distro

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.

Re:Automatically download symbols and sources in GDB by the_mitsuhiko on Monday June 08, 2020 @02:03AM (#23454013)
None of what we have is good enough unfortunately. If you have a random crash from a customer you’re out of luck.
Re:Automatically download symbols and sources in GDB by de_watcher on Monday June 08, 2020 @07:28AM (#23455620)
You load up the debug info and get all file/line info you need, or you debug the core file.
Re:Automatically download symbols and sources in GDB by NovemberWhiskey on Monday June 08, 2020 @10:36AM (#23456822)
With the Microsoft tooling, you debug a crash dump and your IDE automatically pulls in the symbol data from your symbol server and then automatically checks out the appropriate revisions from your config management system, because the references are embedded into the symbol files at build time.

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.