Search code examples
debuggingbreakpointstrace32lauterbach

Is it possible to set a ranged breakpoint in TRACE32 using symbols?


I'm want to set a ranged breakpoint in the TRACE32 software with symbolic names. The usual syntax is like this
start--end
but depenting on my ELF I need a dynamic range like this
0x00--SYM_NAME.

Is it possible? When yes, how?

Thx in advanced


I use DIAB (now Windriver) compiler for PowerPCs and the TRACE32 version is Aug 2013.


Solution

  • TRACE32 differentiates between plain addresses and decorated addresses (=access class + address). Ranges allow the following combination of addresses:

    <plain address>--<plain address>
    <decorated address>--<plain address>
    <decorated address>--<decorated address>
    

    If you want to use debug symbol as range end, you have two choices: Either convert the debug symbol into a plain address or make sure that the first address is decorated as well. The second option is not recommended, as it requires to know which access class to use.

    Break.Set 0x0--(ADDRESS.OFFSET(my_func)-1)
    Break.Set P:0x0--(my_func-1)
    

    Another alternative to get the desired range may be to use the section information, e.g. to set a breakpoint range on the whole .text section:

    Break.Set sYmbol.SECPRANGE(\\my_program\.text)
    

    Or from begin of a section up to a certain function:

    Break.Set sYmbol.SECADDRESS(\\my_program\.text)--(sYmbol.BEGIN(my_func)-1)