0

we have lauterbach scripts were we place breakpoints using python scripts at specific address lines of code in a function and the subsequent lines of the function by manually finding the address locations.

#Breakpoint is set at the entry point of default_check() TP_api.set_Breakpoint("0x40004854",30)

#Breakpoint is set at the line 'for i=0..." of default_check() TP_api.set_Breakpoint("0x40004864",30)

But when the build changes, the address locations have to be updated manually again. Is it possible to place a breakpoint using the function name 'default_check' and place subsequent breakpoints as 'offset' from the entry function address location.

boon
  • 345
  • 1
  • 4
  • 11

1 Answers1

0

I assume "change of build" refers to your binary and not the build version of your Lauterbach software.

The documentation[1] suggests a Python command for getting an address:

sym_main = dbg.symbol.query_by_name(name='main')

I don't know if you're using this same Python API, as set_Breakpoint isn't what Lauterbach currently uses as a function name. Therefore, if the above can't work for you, does your chip's readelf (perhaps with flags e.g. --debug-dump) give the address? Can you call this from Python and parse the result for your script?


[1] in a standard installation: demo\api\python\rcl\doc\html

Brian Wright
  • 93
  • 1
  • 9