This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [arm] force gdb into disassembling in thumb (arm) mode

On Wed, 2002-01-23 at 11:44, Richard Earnshaw wrote:

> Hmm, a quick test on the CVS sources shows that using an odd address will 
> DTRT (ie force thumb mode but then round the address down); I can't see 
> anything from the commit log that might have changed.  The key is this 
> line of code:
> gdb/arm-tdep.c/gdb_print_insn_arm()
>       memaddr = UNMAKE_THUMB_ADDR (memaddr);
> Which strips off the thumb bit before actually loading the half-word.

Sorry, my fault, mostly - Memory didn't contain what I thought it did,
which did confuse me, together with the memory addresses on the
disassembler output having the lsb set. But you're right, the data
actually displayed is at the right addresses.

But then I should be able to do "display/i $pc+1" but this has no effect
(neither does disp/i $pc|1):
(gdb) disp/i $pc+1
4: x/i $pc + 1  0xf54:	undefined

(is the same as plain disp/i $pc - it tries to decode arm).

(gdb) x/i $pc+1
0xf55:	push	{r4, r5, r7, lr}

shows the thumb instruction really at 0xf54.

greets from Zürich
-- vbi

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]