Re: Examining core dump with gdb

[email protected] (Christos Zoulas) Fri, 14 Mar 2025 15:41:04 -0000 (UTC)
Newsgroups gmane.os.netbsd.devel.toolchain
Message-ID <[email protected]>
In article <[email protected]>,
Peter Skvarka  <[email protected]> wrote:
>Hello,
>I have /etc/defaults/rc.conf setup like described on:
>https://wiki.netbsd.org/tutorials/panic/ relating to savecore, 
>savecore_flags, savecore_dir. (on NetBSD 10.1)
>
>On the page is written:
>"...To load the core dump into gdb, after uncompressing it with 
>gunzip(1), use target kvm /path/to/netbsd.core..."
>
>When I try with unzipped core dump:
>/var/crash#gdb
>(gdb) target kvm netbsd.10.core
>[1]   Abort trap (core dumped) gdb
>/var/crash#

That should not die like this :-( But the problem is that you did not
supply a kernel executable. For best results you want a kernel with
symbols (netbsd.gdb) but a regular kernel will work:

/var/crash#gdb netbsd
(gdb) target kvm netbsd.10.core

christos