3

I want to set a breakpoint to the end of a function in Lauterbach.

I know that this can be achieved using Break.set sYmbol.EXIT(function_name).

Unfortunately, this isn't working.

Can you indicate another command for this ?

John Smith
  • 777
  • 2
  • 14
  • 37
  • 1
    `Break.set sYmbol.EXIT(function_name)` is in fact the correct approach. If this is not working there might be a bug in your version of TRACE32 or you are trying to debug optimized code. – Holger Aug 24 '15 at 11:30
  • For some of the functions I get the message "variable has no address" – John Smith Aug 24 '15 at 11:34

2 Answers2

3

To set breakpoint at the end of the function, you can use g.r command. This command will run the program till the return statement of the function.

Shivakumar
  • 427
  • 2
  • 15
  • Note that `Go.Return` will set a **temporary breakpoint**, which will be removed when the CPU stops (no matter where it stops). Anyway, in most cases this is what you want. – Holger Feb 09 '16 at 11:11
0

You should use BREAK.SET sYmbol.END(function_name), I had the same error and this fixed it.

Tomerikoo
  • 18,379
  • 16
  • 47
  • 61
sandra
  • 65
  • 4
  • 1
    Nope. `sYmbol.END(function_name)` returns the highest address occupied by the function. However this does not have to be the address of the last instruction executed. To get the last instruction executed use `sYmbol.EXIT(function_name)` – Holger Mar 01 '21 at 23:58
  • Thanks for the answer, I just started scripting with lauterbach so I don't know much about it. Do you happen to know why the error "variable has no address" comes up when I use sYmbol.EXIT(function_name)? Does it have to do with the fact that the function is void? – sandra Mar 04 '21 at 07:35
  • Maybe your function got inlined, so there is no longer an exit point. Are you debugging optimized code? – Holger Mar 04 '21 at 16:50