| Gemma Haenen 2004-01-23, 6:58 pm |
| I have a problem with gdb on redhat 9 when I try do debug my
static compiled program: hello.c
I use gcc 3.2.2 for compiling my C program and gdb version
5.3post-0.20021129.18rh.
This is what I see:
-----------------------------------------
$ cat hello.c
#include <stdio.h>
main ()
{
printf ("hello world\n");
}
$ gcc -static -g hello.c
$ gdb a.out
GNU gdb Red Hat Linux (5.3post-0.20021129.18rh)
Copyright 2003 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 "i386-redhat-linux-gnu"...
(gdb) b main
Breakpoint 1 at 0x8048210: file hello.c, line 5.
(gdb) r
Starting program: a.out
Breakpoint 1, main () at hello.c:5
5 printf ("hello world\n");
(gdb) call printf("HELLO")
Breakpoint 1, main () at hello.c:5
5 printf ("hello world\n");
The program being debugged stopped while in a function called from GDB.
When the function (malloc) is done executing, GDB will silently
stop (instead of continuing to evaluate the expression containing
the function call).
(gdb)
-------------------------------------------
Does this sound familiar to anyone ???
Gemma
|