Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Problems with gdb?

In attempts to debug another problem (see the thread about "killing zombies"), I've twice forced crash dumps from ddb. Once with the 'sync' command, and once with 'reboot 0x104'.

Both crash dump files appear valid

# file netbsd.4.core
netbsd.4.core: NetBSD kernel core file, amd64 BSD, (headersize = 16, segmentsize = 8, segments = 131080)
# file netbsd.5.core
netbsd.5.core: NetBSD kernel core file, amd64 BSD, (headersize = 16, segmentsize = 8, segments = 131080)

And crash(8) seems capable of processing them:

# crash -M netbsd.4.core
Crash version 7.99.21, image version 7.99.21.
System panicked: dump forced via kernel debugger
Backtrace from time of crash is available.
crash> show proc 1
init: pid 1 proc fffffe810f46ecd0 vmspace/map fffffe810f483e60 flags 4001
  lwp 1 fffffe810f476a60 pcb fffffe810f464000
    stat 2 flags 8020000 cpu 0 pri 43

Yet, gdb fails to process these files:

# gdb
GNU gdb (GDB) 7.9.1
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64--netbsd".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
Find the GDB manual and other documentation resources online at:
For help, type "help".
Type "apropos word" to search for commands related to "word".
(gdb) target kvm netbsd.4.core
<unavailable> in ?? ()
(gdb) symbol-file /netbsd.gdb
Reading symbols from /netbsd.gdb...done.
PC register is not available

And trying to examine the "struct proc" for init (using the address from crash output) fails miserably!

(gdb) print *(struct proc *)0xfffffe810f46ecd0
Segmentation fault (core dumped)

Has something recently broken in gdb?

My system is a complete kernel+userland amd64/7.99.21 built from sources updated via anoncvs on 2015-09-20 at 02:09:58 UTC.

| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:       |
| (Retired)        | FA29 0E3B 35AF E8AE 6651 | paul at    |
| Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at  |

Home | Main Index | Thread Index | Old Index