NetBSD Problem Report #45309

From Manuel.Bouyer@lip6.fr  Mon Aug 29 21:10:30 2011
Return-Path: <Manuel.Bouyer@lip6.fr>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id A132163C0E2
	for <gnats-bugs@gnats.NetBSD.org>; Mon, 29 Aug 2011 21:10:30 +0000 (UTC)
Message-Id: <20110829211026.689E934C41@armandeche.soc.lip6.fr>
Date: Mon, 29 Aug 2011 23:10:26 +0200 (MEST)
From: Manuel.Bouyer@lip6.fr
Reply-To: Manuel.Bouyer@lip6.fr
To: gnats-bugs@gnats.NetBSD.org
Subject: gdb doens't understand native format (N32) on mips64
X-Send-Pr-Version: 3.95

>Number:         45309
>Category:       port-mips
>Synopsis:       gdb doens't understand native format (N32) on mips64
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    matt
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Aug 29 21:15:00 +0000 2011
>Closed-Date:    Wed Nov 02 20:13:55 +0000 2016
>Last-Modified:  Wed Nov 02 20:13:55 +0000 2016
>Originator:     Manuel Bouyer
>Release:        NetBSD 5.99.55
>Organization:
>Environment:
System: NetBSD cuba.soc.lip6.fr 5.99.55 NetBSD 5.99.55 (LOONGSON) #52: Mon Aug 29 21:38:41 CEST 2011 bouyer@roll:/dsk/l1/misc/bouyer/tmp/evbmips64el/obj/dsk/l1/misc/bouyer/current/src/sys/arch/evbmips/compile/LOONGSON evbmips
Architecture: mipsel
Machine: evbmips-mips64el
>Description:
	On mips64el platforms, the default userland format is N32, but
	gdb is configured for mips64el and doesn't understand N32:
cuba:/home/bouyer/src/usr.bin/ftp>file ftp
ftp: ELF 32-bit LSB executable, MIPS, N32 MIPS-III version 1 (SYSV), dynamically linked (uses shared libs), for NetBSD 5.99.55, with unknown capability 0xf41 = 0x756e6700, with unknown capability 0x70100 = 0x3040000, not stripped
cuba:/home/bouyer/src/usr.bin/ftp>gdb ftp
GNU gdb 6.5
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "mips64el--netbsd"..."/home/bouyer/src/usr.bin/ftp/ftp": not in executable format: File format not recognized

>How-To-Repeat:
	try to run a userland binary under gdb on a mip64el platform.
>Fix:
	Ideally, gdb should understand both N32 and N64, and optionally O32,
	as libraries are installed for all 3 formats.

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: port-mips-maintainer->matt
Responsible-Changed-By: tsutsui@NetBSD.org
Responsible-Changed-When: Sun, 05 Jan 2014 05:47:32 +0000
Responsible-Changed-Why:
mips64 issue.


State-Changed-From-To: open->closed
State-Changed-By: maya@NetBSD.org
State-Changed-When: Wed, 02 Nov 2016 20:13:55 +0000
State-Changed-Why:
I've run and debugged o32 and n32 binaries on mips64el succesfully.
n64 has trouble setting breakpoint (cannot access memory), but that is a separate issue.


>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.