Date: Wed, 18 Apr 2018 09:24:11 -0700 From: John Baldwin <jhb@freebsd.org> To: freebsd-hackers@freebsd.org Cc: Chuck Tuffli <chuck@tuffli.net> Subject: Re: examining Linux core file? Message-ID: <2717167.3JnP6E4tFK@ralph.baldwin.cx> In-Reply-To: <CAM0tzX1GNvO%2BKWTi5=08C=uyeH3BKtWY=01RKXoM79t%2BzwR9Tg@mail.gmail.com> References: <CAM0tzX1GNvO%2BKWTi5=08C=uyeH3BKtWY=01RKXoM79t%2BzwR9Tg@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sunday, January 14, 2018 07:57:01 AM Chuck Tuffli wrote: > If a Linux application running under the Linux emulation (a.k.a. > Linuxulator) core dumps, is it possible to examine the resulting core > file? lldb didn't seem to like it: > > # file mremap05.core > mremap05.core: ELF 64-bit LSB core file x86-64, version 1 (FreeBSD), > FreeBSD-style, from 'ases/bin/mremap05' > # lldb -c mremap05.core testcases/bin/mremap05 > (lldb) target create "testcases/bin/mremap05" --core "mremap05.core" > error: Unable to find process plug-in for core file > '/compat/linux/opt/ltp/mremap05.core' > (lldb) bt > error: invalid process > > FreeBSD's gdb seems to recognize this is as Linux, but doesn't know > where to go from there: > # /usr/libexec/gdb -q ./testcases/bin/mremap05 mremap05.core > > warning: A handler for the OS ABI "GNU/Linux" is not built into this > configuration > of GDB. Attempting to continue with the default i386:x86-64 settings. > > Dwarf Error: wrong version in compilation unit header (is 4, should be > 2) [in module /compat/linux/opt/ltp/testcases/bin/mremap05] > > warning: core file may not match specified executable file. > Core was generated by `./testcases/bin/mremap05'. > Program terminated with signal 11, Segmentation fault. > #0 0x0040eb01 in ?? () > (gdb) bt > #0 0x0040eb01 in ?? () > Cannot access memory at address 0xdbea00 > > The gdb from CentOS, on the other hand, seems to think this is a FreeBSD core: > # gdb -q ./testcases/bin/mremap05 mremap05.core > Reading symbols from /opt/ltp/testcases/bin/mremap05...done. > > warning: A handler for the OS ABI "FreeBSD ELF" is not built into this > configuration > of GDB. Attempting to continue with the default i386:x86-64 settings. > > "/opt/ltp/mremap05.core": no core file handler recognizes format > > Are there any other approaches to consider? TIA. Try gdb from ports. -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2717167.3JnP6E4tFK>
