NetBSD Problem Report #51557

From martin@duskware.de  Thu Oct 13 09:36:22 2016
Return-Path: <martin@duskware.de>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id D89DE7A16D
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 13 Oct 2016 09:36:22 +0000 (UTC)
From: martin@NetBSD.org
Reply-To: martin@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: gdb can't read core files
X-Send-Pr-Version: 3.95

>Number:         51557
>Category:       toolchain
>Synopsis:       gdb can't read core files
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    toolchain-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Oct 13 09:40:00 +0000 2016
>Closed-Date:    Mon Nov 21 14:14:00 +0000 2016
>Last-Modified:  Mon Nov 21 14:14: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 martin@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

>Release-Note:

>Audit-Trail:
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@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

From: "Nick Hudson" <skrll@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/51557 CVS commit: src/external/gpl3/gdb/dist/gdb
Date: Sun, 23 Oct 2016 07:33:15 +0000

 Module Name:	src
 Committed By:	skrll
 Date:		Sun Oct 23 07:33:15 UTC 2016

 Modified Files:
 	src/external/gpl3/gdb/dist/gdb: armnbsd-tdep.c configure.tgt

 Log Message:
 PR toolchain/51557: gdb can't read core files

 Register an iterate_over_regset_sections methods for armnbsd


 To generate a diff of this commit:
 cvs rdiff -u -r1.5 -r1.6 src/external/gpl3/gdb/dist/gdb/armnbsd-tdep.c
 cvs rdiff -u -r1.12 -r1.13 src/external/gpl3/gdb/dist/gdb/configure.tgt

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->feedback
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Mon, 21 Nov 2016 07:17:04 +0000
State-Changed-Why:
is this fixed?


State-Changed-From-To: feedback->closed
State-Changed-By: martin@NetBSD.org
State-Changed-When: Mon, 21 Nov 2016 14:14:00 +0000
State-Changed-Why:
Nick fixed it.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.