I can easily set a breakpoint on a function:
However, I cannot set a breakpoint callback function if I don't know the source location (the line number may change, so I need to consider it as "unknown").
I can use Elf to get the address of the function and use that to set a breakpoint. I would like to use the following to set the callback:
However, that will fail as SetCommand expects the source location to be a string literal.
Is there some way to convert 'address' to a string? I tried using an array of char, but passing 'array' to SetCommand gets "Expected a '['" and '&array[ 0 ]' gets "Expected a value or an identifier".
However, I cannot set a breakpoint callback function if I don't know the source location (the line number may change, so I need to consider it as "unknown").
I can use Elf to get the address of the function and use that to set a breakpoint. I would like to use the following to set the callback:
Is there some way to convert 'address' to a string? I tried using an array of char, but passing 'array' to SetCommand gets "Expected a '['" and '&array[ 0 ]' gets "Expected a value or an identifier".