THUMB code detection for ADS 1.2 ELF emages

Stan Shebs stan@codesourcery.com
Fri Jun 20 10:48:00 GMT 2008


Dmitry Smirnov wrote:
> Hi,
>
> I'm trying to use GDB to work with ARM ELF images produced by ADS 1.2 (ARM toolchain, a liitle bit old).
> I can do almost all I want with ARM code. But GDB works incorrectly with THUMB code: I cannot disassemle the code, GDB places breakpoints at incorrect address, stepping with 'ni'.
>
> In GDB source code I've found that it completely ignores some special symbols ($t, $a, $d ...) that ADS places to an ELF file.
>   
Dan Jacobowitz added this bit of machinery recently; see 
http://sourceware.org/ml/gdb-patches/2008-05/msg00113.html . He points 
out that this should be a rare case, only needed if Arm and Thumb code 
are mixed within a single file; so if your GDB is having trouble 
detecting Thumb code, maybe there is some other problem, perhaps the 
toolchain is not marking the executable correctly?

Stan



More information about the Gdb mailing list