public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Debug ARM semihosting Thumb-2 binary
@ 2012-02-08 10:34 Jonas Maebe
  2012-02-08 17:34 ` Matthew Gretton-Dann
  0 siblings, 1 reply; 10+ messages in thread
From: Jonas Maebe @ 2012-02-08 10:34 UTC (permalink / raw)
  To: gdb

Hi,

I'm debugging ARM binaries compiled for the semihosting interface (http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0471c/CHDJHHDI.html 
  ). The binaries run under qemu-system-arm and I'm using QEMU's gdb  
remote target interface.

In general, this works fine, except when such binaries are Thumb-2 and  
perform system calls. The reason is that for Thumb-2, the system call  
interface of the semihosting platform uses "bkpt 0xab" (http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0491c/CJAFABBB.html 
  ). GDB intercepts this bkpt, halts the execution with a SIGINT  
message and does not pass it on to the debugged process. If the  
process is then continued, it behaves as if the system call/bkpt in  
question never was executed

Using "handle SIGINT pass" does not change this.

Is there another way to tell gdb to ignore those particular bkpt  
instructions and execute them normally? I'm using gdb 7.4 (7.2 behaves  
the same).

Thanks,


Jonas

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2012-02-23 14:51 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-08 10:34 Debug ARM semihosting Thumb-2 binary Jonas Maebe
2012-02-08 17:34 ` Matthew Gretton-Dann
2012-02-08 22:36   ` Jonas Maebe
2012-02-09  1:38     ` Matthew Gretton-Dann
2012-02-09 13:08       ` Jonas Maebe
2012-02-15 17:33         ` Peter Maydell
2012-02-20 16:21           ` Peter Maydell
2012-02-23 14:12             ` Jonas Maebe
2012-02-23 14:48               ` Peter Maydell
2012-02-23 14:51                 ` Jonas Maebe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).