Subject: bin/1703: gdb gets bus error when stepping
To: None <gnats-bugs@gnats.netbsd.org>
From: enami tsugutomo <enami@sys.ptg.sony.co.jp>
List: netbsd-bugs
Date: 10/29/1995 10:21:01
>Number:         1703
>Category:       bin
>Synopsis:       gdb gets bus error when stepping
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Oct 29 17:20:01 1995
>Last-Modified:
>Originator:     enami tsugutomo
>Organization:
	Sony Corporation.
>Release:        NetBSD-current around 95Oct22
>Environment:
System: NetBSD pavlov 1.1_ALPHA NetBSD 1.1_ALPHA (PAVLOV) #3: Fri Oct 27 07:14:43 JST 1995 enami@pavlov:/usr/src/sys/arch/i386/compile/PAVLOV i386


>Description:
	gdb gets bus error when stepping.  But it works on NetBSD 1.0A around
	95 Sep 30.
>How-To-Repeat:
	
pavlov% cat hw.c
int
main (argc, argv)
     int argc;
     char **argv;
{
  printf ("hello, world\n");
}
pavlov% /usr/bin/cc -v -g hw.c -o hw
gcc version 2.4.5
 /usr/libexec//cpp -lang-c -v -undef -D__GNUC__=2 -Di386 -Dunix -D__NetBSD__ -D__i386__ -D__i386__ -D__unix__ -D__NetBSD__ -D__i386__ -D__i386 -D__unix -D__NetBSD__ -D__i386__ -g hw.c /usr/tmp/cc026855.i
GNU CPP version 2.4.5 (80386, BSD syntax)
 /usr/libexec//cc1 /usr/tmp/cc026855.i -quiet -dumpbase hw.c -g -version -o /usr/tmp/cc026855.s
GNU C version 2.4.5 (80386, BSD syntax) compiled by GNU C version 2.4.5.
 as -o /usr/tmp/cc0268551.o /usr/tmp/cc026855.s
 ld -e start -dc -dp -o hw /usr/lib/crt0.o /usr/tmp/cc0268551.o -lgcc -lc -lgcc
pavlov% gdb ./hw
GDB is free software and you are welcome to 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.
GDB 4.11 (i386-netbsd), Copyright 1993 Free Software Foundation, Inc...
(gdb) br main
Breakpoint 1 at 0x1774: file hw.c, line 7.
(gdb) run
Starting program: /tmp/./hw 

Breakpoint 1, main (argc=1, argv=0xf7bfde64) at hw.c:7
7         printf ("hello, world\n");
(gdb) n

Program received signal SIGBUS (10), Bus error
0x1776 in main (argc=1, argv=0xf7bfde64) at hw.c:7
7         printf ("hello, world\n");
(gdb) n

Program terminated with signal SIGBUS (10), Bus error
The program no longer exists.
(gdb) quit
pavlov% 
>Fix:
>Audit-Trail:
>Unformatted: