ARM Simulator Bug?
David Mc Kenna
mckennad@esatclear.ie
Tue Sep 2 14:31:00 GMT 2003
Hi Richard,
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
> .thumb_func
>__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
>symbols.
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?
Thanks,
Dave
--
http://www.iol.ie
More information about the Gdb
mailing list