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 Simulator Bug?

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
>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?



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