![]() |
gdb "not in executable format: File format not recognized"
$ gdb snmptrap
GNU gdb 6.0 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 "x86_64-pc-linux-gnu"..."/home/tcma/net-snmp-5.1.1/apps/snmptrap": not in executable format: File format not recognized I compiled my program with the "-g" debug option: CFLAGS = -g -O2 -Dlinux Why I have this error? Linux version 2.6.7-gentoo-r11 (root@rose) (gcc version 3.4.1 (Gentoo Linux 3.4.1, ssp-3.4-2, pie-8.7.6.3)) |
what is the output of
file /home/tcma/net-snmp-5.1.1/apps/snmptrap |
/home/tcma/net-snmp-5.1.1/apps/snmptrap: Bourne shell script text executable
Quote:
|
theres your problem, that file is not a compiled program, its a shell script - a list of commands for bash to run, you can open it in your favourite text editor and maybe find the path of the actual program you want to debug.
|
gdb "not in executable format: File format not recognized "
# gdb core
GNU gdb Red Hat Linux (6.3.0.0-1.132.EL4rh) Copyright 2004 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"..."/opt/nms_mycaller/bin/core": not in executable format: File format not recognized file core gives core: ELF 32-bit LSB core file Intel 80386, version 1 (SYSV), SVR4-style, from 'rplclient' What can be the reason? |
Quote:
Also, as an aside, it probably would have been better to start a new thread on this one, rather than resurrecting a three-years-old one. |
I get this error only when I try to run core file with out specifying the program name which produced the core.
I solved my error this way. First you do a "ulimit -c unlimited " to generate the core then run the program to generate the core say core.xyz debug using "gdb programname core.xyz" still r u getting the error? |
Quote:
I tried as mentioned first ran gdb then used core <corefile> it gave an output as Program terminated with signal 11, Segmentation fault. #0 0x00a4f9b2 in ?? () But how can i pin point in the code where this fault is happening? Thanks in advance |
did you tried using "where" command
|
Quote:
|
| All times are GMT -5. The time now is 10:21 PM. |