GDB problems ???

GDB problems ???

Post by Pisut Tranchindavon » Thu, 19 Sep 1996 04:00:00



Hi,
   I'm trying to debug my small C program on RedHat Linux PC at home.
While running my program, I press Ctrl-\, SIGQUIT, to make a core dump image.
Then, use gdb to resume execution of the program as following with some error:
-------------------------------attachment-------------------------------------
$ cat count.c
#include <stdio.h>

main() {
  int i;

  for (i=1; i<=180; i++) {
     printf("\rCount=%d",i);
     fflush(stdout);
     sleep(1);
  }

Quote:}

$ gcc -o count count.c
$ count
... ... ... ... ...
  ^\ Pressed
(core dump)
... ... ... ... ...
$ gdb count core
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.15 (i586-unknown-linux), Copyright 1995 Free Software Foundation, Inc...
(no debugging symbols found)...
Couldn't fetch registers from core file: File in wrong format
Couldn't fetch registers from core file: File in wrong format
#0  0x0 in ?? ()
(gdb) cont
The program is not being run.
(gdb) quit
-----------------------------end_of_attachment---------------------------------
  There are two errors as shown, one is during loading, the other is issuing
"cont" command.
  Does anyone please tell me how to fix these problems?
Regards,
Pisut T.
 
 
 

GDB problems ???

Post by Andrew N. Ry » Thu, 19 Sep 1996 04:00:00


: $ gdb count core
: 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.15 (i586-unknown-linux), Copyright 1995 Free Software Foundation, Inc...
: (no debugging symbols found)...
: Couldn't fetch registers from core file: File in wrong format
: Couldn't fetch registers from core file: File in wrong format
: #0  0x0 in ?? ()
: (gdb) cont
: The program is not being run.
: (gdb) quit
        Do you have an ELF system?  I believe that GDB 4.15 can't read linux ELF
format.  Try upgrading your GDB to 4.16.

Andy

http://quake2.emsphone.com

 
 
 

1. gdb problem (gdb 4.8, gcc 2.6.2)

gdb 4.8 refuses to debug gcc 2.6.2 generated binaries and finds no symbols
in them (even when compiled with -g). Do I need a newer version and if so
were can I find one?

Duncan (-:

2. Linux demographics

3. Slackware 3.0: gdb problem & setup problem

4. Help! Major Lock-up!

5. gdb problem w/ iostream.cc

6. 3com pc card doesn't work after recompiling kernel

7. help the GDB problem

8. silly ftp problem

9. 3.3-R gdb problems with C++

10. DLL Tools & gdb problem

11. gdb problem