NetBSD Problem Report #32972

From www@netbsd.org  Fri Mar  3 00:07:57 2006
Return-Path: <www@netbsd.org>
Received: by narn.netbsd.org (Postfix, from userid 31301)
	id 2D67963B8EB; Fri,  3 Mar 2006 00:07:57 +0000 (UTC)
Message-Id: <20060303000757.2D67963B8EB@narn.netbsd.org>
Date: Fri,  3 Mar 2006 00:07:57 +0000 (UTC)
From: uwe@netbsd.org
Reply-To: uwe@netbsd.org
To: gnats-bugs@netbsd.org
Subject: gdb doesn't recognize binaires compiled with binutils 2.16
X-Send-Pr-Version: www-1.0

>Number:         32972
>Category:       port-sh3
>Synopsis:       gdb doesn't recognize binaires compiled with binutils 2.16
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    port-sh3-maintainer
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Mar 03 00:10:00 +0000 2006
>Closed-Date:    Tue Mar 07 02:22:15 +0000 2006
>Last-Modified:  Tue Mar 07 02:22:15 +0000 2006
>Originator:     Valeriy E. Ushakov
>Release:        -current
>Organization:
>Environment:
NetBSD nada 3.99.15 NetBSD 3.99.15 (NADA) #31: Sun Feb 26 06:18:58 MSK 2006  uwe@sampo:/export/netbsd/cvs/src/sys/arch/hpcsh/compile/NADA hpcsh
>Description:
In binutils 2.16 support for SuperH has been rototilled.  In particular,
they now handle superh variants differently.  Since gdb53 uses old libfd,
it doesn't recognize binaries compiled with new binutils as superh binaries.
>How-To-Repeat:
$ readelf -h /bin/echo | grep Flags
  Flags:                             0x2, sh2
$ gdb -q /bin/echo
(no debugging symbols found)...(gdb)
$ readelf -h /bin/ls | grep Flags
  Flags:                             0x16, unknown ISA
$ gdb -q /bin/ls
"/bin/ls": not in executable format: File format not recognized

Readelf has been fixed actually, but a copy of libbfd that comes with gdb53
need to be tought the new flags.
>Fix:

>Release-Note:

>Audit-Trail:

From: "Valeriy E. Ushakov" <uwe@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: PR/32972 CVS commit: src/gnu/dist/gdb
Date: Tue,  7 Mar 2006 02:16:23 +0000 (UTC)

 Module Name:	src
 Committed By:	uwe
 Date:		Tue Mar  7 02:16:23 UTC 2006

 Modified Files:
 	src/gnu/dist/gdb/bfd: elf32-sh-nbsd.c
 	src/gnu/dist/gdb/include/elf: sh.h

 Log Message:
 In binutils 2.16 new SuperH flags were introduced.  Since we still use
 old gdb, teach it new flags, so that it can recognize binaries compiled
 with new binutils.  For new flags set arch to an approximate superset
 that this version of bfd knows about.  This is good enough for gdb.

 PR port-sh3/32972


 To generate a diff of this commit:
 cvs rdiff -r1.1.1.1 -r1.2 src/gnu/dist/gdb/bfd/elf32-sh-nbsd.c
 cvs rdiff -r1.1.1.1 -r1.2 src/gnu/dist/gdb/include/elf/sh.h

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

State-Changed-From-To: open->closed
State-Changed-By: uwe@netbsd.org
State-Changed-When: Tue, 07 Mar 2006 02:22:15 +0000
State-Changed-Why:
Fixed by teaching gdb's copy of bfd new flags.


>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-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.