NetBSD Problem Report #34778

From fukaumi@soum.co.jp  Wed Oct 11 03:08:17 2006
Return-Path: <fukaumi@soum.co.jp>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id 92FB663BC72
	for <gnats-bugs@gnats.NetBSD.org>; Wed, 11 Oct 2006 03:08:17 +0000 (UTC)
Message-Id: <1xejtfv9au.wl%fukaumi@soum.co.jp>
Date: Wed, 11 Oct 2006 12:08:25 +0900
From: fukaumi@soum.co.jp
Reply-To: fukaumi@soum.co.jp
To: gnats-bugs@NetBSD.org
Subject: gdb6 doesn't work on OpenBlockS266
X-Send-Pr-Version: 3.95

>Number:         34778
>Category:       port-evbppc
>Synopsis:       gdb6 doesn't work on OpenBlockS266
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    port-evbppc-maintainer
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Oct 11 03:10:00 +0000 2006
>Closed-Date:    Sat Oct 07 14:14:43 +0000 2017
>Last-Modified:  Sat Oct 07 14:14:43 +0000 2017
>Originator:     FUKAUMI Naoki
>Release:        NetBSD 4.99.3 as of Oct 10 2006
>Organization:
	SOUM Corporation
>Environment:
System: NetBSD 4.99.3 NetBSD 4.99.3 (OPENBLOCKS266) #0: Tue Oct 10 19:33:41 JST 2006 fukaumi@XXX.soum.co.jp:/home/fukaumi/evbppc/o/sys/arch/evbppc/compile/OPENBLOCKS266 evbppc
Architecture: powerpc
Machine: evbppc

# gcc --version
gcc (GCC) 4.1.2 20060628 prerelease (NetBSD nb2 20060711)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

# gdb --version
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 "powerpc--netbsd".
>Description:
	gdb 6.5 does not work on OpenBlockS266.

	if target program is dynamic linked binary, program never reachs
	main() function.

	if target program is static linked binary, program does not stop
	at break point.
>How-To-Repeat:
- test program

# cat test.c
#include <stdio.h>

int
main() {
        printf("hello, world\n");
        return 0;
}
# cc -g -o test test.c
# cc -g -static -o test-static test.c

- dynamic linked binary

# file test
test: ELF 32-bit MSB executable, PowerPC or cisco 4500, version 1 (SYSV), for NetBSD 4.99.3, dynamically linked (uses shared libs), for NetBSD 4.99.3, not stripped

# gdb ./test
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 "powerpc--netbsd"...
(gdb) b main
Breakpoint 1 at 0x18007c8: file test.c, line 5.
(gdb) run
Starting program: /tmp/test 
debug reg is 80000000 srr2 2000 srr3 0
debug reg is 80000000 srr2 2000 srr3 0
debug reg is 80000000 srr2 2000 srr3 0
debug reg is 80000000 srr2 2000 srr3 0
debug reg is 80000000 srr2 2000 srr3 0
debug reg is 80000000 srr2 2000 srr3 0
debug reg is 80000000 srr2 2000 srr3 0
debug reg is 80000000 srr2 2000 srr3 0
debug reg is 80000000 srr2 2000 srr3 0
debug reg is 80000000 srr2 2000 srr3 0
debug reg is 80000000 srr2 2000 srr3 0
debug reg is 80000000 srr2 2000 srr3 0
  :
(repeat forever)
  :
^C
Program received signal SIGINT, Interrupt.
0x41813d30 in _rtld_debug_state () from /usr/libexec/ld.elf_so

- static linked binary

# file test-static
test-static: ELF 32-bit MSB executable, PowerPC or cisco 4500, version 1 (SYSV), for NetBSD 4.99.3, statically linked, for NetBSD 4.99.3, not stripped

# gdb ./test-static
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 "powerpc--netbsd"...
(gdb) b main
Breakpoint 1 at 0x1800460: file test.c, line 5.
(gdb) run
Starting program: /tmp/test-static 
hello, world

Program exited normally.
>Fix:

>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->feedback
State-Changed-By: mrg@NetBSD.org
State-Changed-When: Tue, 05 Aug 2014 05:33:48 +0000
State-Changed-Why:
does this problem still occur with modern, supported releases?

thanks.


State-Changed-From-To: feedback->closed
State-Changed-By: kamil@NetBSD.org
State-Changed-When: Sat, 07 Oct 2017 16:14:43 +0200
State-Changed-Why:
gdb6 is no longer maintained in modern releases and it has been removed from pkgsrc


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