From: Jonas Maebe <jonas.maebe@elis.ugent.be>
To: gdb@sourceware.org
Subject: Debug ARM semihosting Thumb-2 binary
Date: Wed, 08 Feb 2012 10:34:00 -0000 [thread overview]
Message-ID: <047D674A-A77C-4E5A-B207-592A81D857DC@elis.ugent.be> (raw)
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
next reply other threads:[~2012-02-08 10:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-08 10:34 Jonas Maebe [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=047D674A-A77C-4E5A-B207-592A81D857DC@elis.ugent.be \
--to=jonas.maebe@elis.ugent.be \
--cc=gdb@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox