This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
"Program received signal SIGILL, Illegal instruction" on putting breakpoint while using gdb-gdbserver for remote debugging
- From: himanshu sardana <er dot sardana at gmail dot com>
- To: gdb at sourceware dot org
- Date: Tue, 9 Nov 2010 15:46:31 +0530
- Subject: "Program received signal SIGILL, Illegal instruction" on putting breakpoint while using gdb-gdbserver for remote debugging
I am trying to remote debug an application which resides in an Intel
x86 system. I am using gdbserver on the target machine and gdb on the
host machine which is Intel x86 as well.
The application is a single threaded application. The code was
compiled using gcc with '-g' switch to enable debugging.
gcc -g -o main_app main_app.c
I am facing problems if I put any breakpoint once the debug session is
running and connected with the remote machine. Following steps were
done to start debugging:
=====================================================
$> gdb ./main_app
(gdb) target remote 192.168.202.156:2108
Remote debugging using 192.168.202.156:2108
0xfc140020 in ?? ()
(gdb)
=====================================================
After these steps if I simply 'continue' the program, the program
executes fine and then terminates properly. But, If I put a breakpoint
and then continue execution I get the following problem:
Program received signal SIGILL, Illegal instruction.
0x52034000 in ?? ()
What may be the problem due to which I get the above error.
Also, when I execute "target remote 192.168.202.156:2108", I get
QUESTION MARKS (??) alone with the address info i.e. "0xfc140020 in ??
()". I am suspecting that I should get the application name i.e.
"main_app" instead of '??'. I am not sure on this but I tried
remote-debugging using a similar setup long time back and I have a
slight memory that there was application name instead of '??'. But,
again, I am not very sure of that.
Also I tried an another command in gdb which was
(gdb) add-symbol-file main_app 0xfc140020
This asks me to Enter 'y' to read symbol file and it shows no error on
reading but still I get same problem.
Any suggestions will be highly appreciable.
Thanks,
Himanshu