cannot debug with gdb
I downloaded a project from the Internet and tried to debug it, but run into a problem.
Without knowing much about the makefile, i managed to copy the part where it build the executable I need. The problem is that I cannot use gdb with this executable for some reason. However, running the it without gdb seems to work ok. Can someone help me identifying what I did incorrectly. Below is what it shows when compiling and link. Compile: Code:
gcc -g -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" Code:
/bin/sh ../../libtool --mode=link gcc -g -O3 -Wall - Running without gdb as following works fine with : ./sphinx3_decode - Output from gdb (problem): Code:
[user1@user11 programs]$ gdb sphinx3_decode I forgot to let you know that I was able to debug a simple helloworld program using gdb, but still cannot debug this sphinx3_decode. |
What does the output of "file ./sphinx3_decode" say?
|
Quote:
It returns an output as i expected. |
What does gcc -v say? What happens if you get rid of -O3?
Kevin Barry |
Boy, that's a really helpful response:
Quote:
|
Quote:
Code:
$ file ./sphinx3_decode |
It works now.
I have to use $ libtool gdb ./sphinx3_decode Not really sure what the different it makes when adding libtool. |
My problem now is how to use that command in Eclipse.
I have tried couple of things, but still cannot get it to work. |
Hi -
Quote:
You can only run the GDB debugger on binary executables, not shell scripts! PS: In case you were wondering, you can't run the Visual Studio debugger on a DOS .bat file, either... |
I felt so silly :) you are right. it is a script file.
|
All times are GMT -5. The time now is 10:32 AM. |