Obtaining core files with mapped shared libraries from minidump-2-core

7 views
Skip to first unread message

Bogdan Harjoc

unread,
Apr 29, 2024, 12:13:43 PMApr 29
to Google Breakpad Discuss
Hello,

The test code below produces a breakpad minidump, but I cannot get a stack trace in GDB from the core file generated using minidump-2-core. Outputs for "info shared" and "info proc map" are also empty.

Are separate *.sym files needed in order to generate a core file using minidump-2-core, or should the (possibly stripped) ELF files be sufficient ?

What could make minidump-2-core generate an incomplete core file like below if the binary and libraries are in the locations they were when the program crashed ?

======
#include <client/linux/handler/exception_handler.h>

int main(int argc, char *argv[])
{
    google_breakpad::MinidumpDescriptor descriptor("/home/user/crash");
    google_breakpad::ExceptionHandler handler{descriptor, NULL, NULL, NULL, true, -1};
    *(char *)(size_t)argc = 0;
    return 0;
}
======

g++ -I ~/breakpad/src -std=c++2a -Wall -ggdb -pthread -o test test.cc ~/breakpad/src/client/linux/libbreakpad_client.a

minidump-2-core -v *.dmp > minicore 2> info
gdb ./test ./minicore
[New LWP 30414]
[New LWP 30414]
...
Failed to read a valid object file image from memory.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x0000558c55693f94 in ?? ()
(gdb) info shared
No shared libraries loaded at this time.
(gdb) info proc map
(gdb) quit
======

I'm testing using the latest breakpad commit from 2024-04-24 on Fedora, Ubuntu, CentOS and Debian.

Thanks!
Reply all
Reply to author
Forward
0 new messages