Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* [arm] force gdb into disassembling in thumb (arm) mode
@ 2002-01-23  1:56 Adrian von Bidder
  2002-01-23  3:44 ` Richard Earnshaw
  0 siblings, 1 reply; 3+ messages in thread
From: Adrian von Bidder @ 2002-01-23  1:56 UTC (permalink / raw)
  To: gdb mailing list

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


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

end of thread, other threads:[~2002-01-23 12:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-23  1:56 [arm] force gdb into disassembling in thumb (arm) mode Adrian von Bidder
2002-01-23  3:44 ` Richard Earnshaw
2002-01-23  4:27   ` Adrian von Bidder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox