This is the mail archive of the
mailing list for the GDB project.
Re: ARM Simulator Bug?
- From: "David Mc Kenna" <mckennad at esatclear dot ie>
- To: Richard Earnshaw <rearnsha at arm dot com>, mckennad at esatclear dot ie, gdb at sources dot redhat dot com, insight at sources dot redhat dot com, Richard dot Earnshaw at arm dot com
- Date: Tue, 2 Sep 2003 15:31:11 +0100
- Subject: Re: ARM Simulator Bug?
- Reply-to: mckennad at esatclear dot ie
Thanks for the reply.
>It's more likely to be the way you are trying to get into Thumb state. Try
> adr r0, __start_of_thumb
Should this line not be
adr r0, __start_of_thumb+1
To set the LSB to tell the core we want to enter Thumb mode
> bx r0
> .code 16
> .global __start_of_thumb
>This is really brokenness in the way gas implements ARM and Thumb code
>areas, but it's hard to fix properly until GAS starts using mapping
If I use the +1 code above, and set a breakpoint at the adr command, I can single
step successfully past the BX command and into my main.
But if I set a breakpoint further down, e.g. after two NOPS, and hit continue,
things go astray again. It seems that gdb does not know that when it does a
continue that it is in thumb mode and that it is executing 32bit arm commands
( e.g. 2*16bit Thumb Commands).
Is it possible to see the commands the simulator recieves as you can with the
remote serial commands , i.e. set debug remote 1?