From: Adrian von Bidder <avbidder@acter.ch>
To: gdb mailing list <gdb@sources.redhat.com>
Subject: [arm] force gdb into disassembling in thumb (arm) mode
Date: Wed, 23 Jan 2002 01:56:00 -0000 [thread overview]
Message-ID: <1011779773.10599.4.camel@atlas> (raw)
Heyho!
[May have been asked before - just point me in the general direction as
I couldn't find it with google or in the mailing lsit archive]
How can I force gdb to disassemble a memory region in thumb?
gdb 5.1 gets it right if there is symbol information, but just
disassembles to arm instructions when no symbol information is present
(apparently). Can I change this default to thumb (runtime), or is it
possible with a argument to the x/i command?
The sensible way (imho) would be to interpret the (h)alfword/(w)ord
format letters, so that x/ih and x/iw would force to interpret 16/32 bit
instructions.
x/i on an odd address currently does switch to thumb mode - but it seems
to interpret the instructions at the odd address (it doesn't strip the
lsb when loading the data):
(gdb) x/20i 0xbe1
0xbe1: ldrsh r5, [r6, r6]
0xbe3: strb r6, [r0, r5]
0xbe5: ldr r4, [pc, #280] (0xd00)
0xbe7: add sp, #280
0xbe9: undefined instruction 0x47b4
0xbeb: strh r6, [r0, #2]
but the halfword at 0xbe0 does (in this example) disassemble to
ldr r7,[sp, #0xb5].
greets from Zürich
-- vbi
next reply other threads:[~2002-01-23 9:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-01-23 1:56 Adrian von Bidder [this message]
2002-01-23 3:44 ` Richard Earnshaw
2002-01-23 4:27 ` Adrian von Bidder
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=1011779773.10599.4.camel@atlas \
--to=avbidder@acter.ch \
--cc=gdb@sources.redhat.com \
/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