Hi Jan,
On Wed, 2009-08-26 at 10:39 +0200, Jan Kratochvil wrote:
thread apply all backtrace full q
It tries to locate debuginfo by finding executable's build id, [Jan, can you expand on this - does gdb look at executable or at the core file in order to find build id? If it looks at core file for this, does code file contain build ids of loaded libraries too?] then looks it up in /usr/lib/debug/.build-id/XX/XXXXXXXXXXXXXXX and uses if it is found.
If you type "file BINARY" it will try to find the separate .debug file according to the build-id of BINARY. In such case COREFILE build-id would be ignored.
If you type just "core-file COREFILE" (without "file BINARY") it will find the binary according to its build-id.
This may be wrong in the rare case when binary name is somehow misdetected, or the binary was replaced. But such cases are not typical, so I do not want to worry about it just yet.
Libraries are always found preferred to their build-id.
This is the part I am interested in. How can we extract libraries' build-ids? By ldd'ing the binary and then extracting libraries' build-ids? What about dlopen'ed libs, how to find their debuginfos?
Basically, we need to answer the question "do we need to install debuginfo packages, and which ones?". For that, we need to know "what debuginfo FILES (not packages) gdb would need?".
One way to achieve it is to obtain the list of all build-ids of all binaries/libraries loaded in crashed process' memory. Then it is trivial to check existence of /usr/lib/debug/.build-id/XX/XXX files.
Can we do it somehow? I imagine the last resort way to do it is to read gdb source and extract the code which does that, but maybe there is a simpler way?
So, Jan, what is this pk-debuginfo-install thing, and how it can help us here?
Tried installing pk-debuginfo-install but it wanted to install some graphical mess. Crashes bugreporting must not rely on graphical tools to be usable on the RHEL text-only server farms.
Yeah, I now know that you aren't the right person to talk about pk-debuginfo-install. I now have another contact email to try. -- vda