Subject: toolchain/25696: Error in gdb during trace
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <zul@net2hardware.com>
List: netbsd-bugs
Date: 05/24/2004 18:46:36
>Number: 25696
>Category: toolchain
>Synopsis: Error in gdb during trace
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: toolchain-manager
>State: open
>Class: support
>Submitter-Id: net
>Arrival-Date: Mon May 24 18:47:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator: zul
>Release: NetBSD -current
>Organization:
>Environment:
NetBSD Hermes.at.home 2.0E NetBSD 2.0E (HERMES) #0: Mon May 24 20:05:34 CEST 2004 zul@Hermes.at.home:/usr/build_tmp/objdir/sys/arch/i386/compile/HERMES i386
>Description:
It is difficult to describe the problem with precision
when I trace some simple program using gdb, gdb prints the following message
Error accessing memory address 0x........: Invalid argument.
It seems that the issue appears after the first function call.
For some more complex code, gdb seems to run fine, but it depends a lot of the code . I don't have any idea about the difference between the code frome the point of view of gdb :(.
>How-To-Repeat:
cat test.c
#include <stdio.h>
void affiche(char * str) { printf("%s\n"),str); }
int main() {
char foo[]="Hello world!";
affiche(foo);
return 0;
}
gcc -g test.c -o test
./test
Hello world!
gdb test
break affiche
run
Breakpoint 1, affiche (str=Error accessing memory address 0xbfbfe890: Invalid argument.
n
) at test.c:6Error accessing memory address 0xbfbfe86c: Invalid argument.
n
Single stepping until exit from function printf,
which has no line number information.
0x08048458 in init_fallthru ()
n
Single stepping until exit from function init_fallthru,
which has no line number information.
Error accessing memory address 0xbfbfe864: Invalid argument.
n
...
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: