Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

toolchain/51557: gdb can't read core files

4 views
Skip to first unread message

mar...@netbsd.org

unread,
Oct 13, 2016, 5:40:10 AM10/13/16
to toolchai...@netbsd.org, gnats...@netbsd.org, netbs...@netbsd.org
>Number: 51557
>Category: toolchain
>Synopsis: gdb can't read core files
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: toolchain-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Oct 13 09:40:00 +0000 2016
>Originator: Martin Husemann
>Release: NetBSD 7.99.39
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD space-truckin.duskware.de 7.99.39 NetBSD 7.99.39 (CUBIETRUCK) #291: Mon Oct 10 19:19:39 CEST 2016 mar...@night-owl.duskware.de:/usr/src/sys/arch/evbarm/compile/CUBIETRUCK evbarm
Architecture: earmv7hfeb
Machine: evbarm
>Description:

Trying to read a core file in gdb crashes gdb:

# gdb gdb gdb.core
GNU gdb (GDB) 7.10.1
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
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 "armeb--netbsdelf-eabihf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from gdb...Reading symbols from /usr/libdata/debug//usr/bin/gdb.debug...done.
done.
[New process 1]
Segmentation fault (core dumped)


>How-To-Repeat:
s/a

>Fix:
n/a

Martin Husemann

unread,
Oct 14, 2016, 9:05:09 AM10/14/16
to toolchai...@netbsd.org, gnats...@netbsd.org, netbs...@netbsd.org, mar...@netbsd.org
The following reply was made to PR toolchain/51557; it has been noted by GNATS.

From: Martin Husemann <mar...@duskware.de>
To: gnats...@NetBSD.org
Cc:
Subject: Re: toolchain/51557: gdb can't read core files
Date: Fri, 14 Oct 2016 15:04:52 +0200

The crash happens in:

#0 0x0ca5af70 in get_core_register_section (
regcache=regcache@entry=0x608688a0, regset=regset@entry=0x0,
name=0xcc61900 ".reg", min_size=min_size@entry=0, which=which@entry=0,
human_name=0xcc61908 "general-purpose", required=required@entry=1)
at /usr/src/external/gpl3/gdb.old/lib/libgdb/../../dist/gdb/corelow.c:544

(gdb) p size
$3 = 68
(gdb) p min_size
$4 = 0
(gdb) p regset
$5 = (const struct regset *) 0x0

This is called from:

#1 0x0ca5b1d4 in get_core_registers (ops=<optimized out>,
regcache=0x608688a0, regno=<optimized out>)
at /usr/src/external/gpl3/gdb.old/lib/libgdb/../../dist/gdb/corelow.c:629
629 in /usr/src/external/gpl3/gdb.old/lib/libgdb/../../dist/gdb/corelow.c

with a NULL pointer as regset and 0 as min_size.


Martin

0 new messages