Red Hat General - GDB problem on redhat 9

This is Interesting: Free IT Magazines  
Home > Archive > Red Hat General > January 2004 > GDB problem on redhat 9





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author GDB problem on redhat 9
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



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2009 webservertalk.com