I want to set a breakpoint at an offset within a file.
I can do this fine if I launch the app, check where it is loaded with image list testapp
and then add the offset of where in the binary I want the breakpoint e.g.:
breakpoint set -a 0x10100cff4
Is there a way whereby I can set the breakpoint in one go without first checking the offset it is loaded at so that I can automate a task more easily. e.g. something similar to:
breakpoint set -a ((image list -o testapp)+0x100168ff4)
I suspect I could do it with Python however that is not working for me at the moment on Ubuntu so would prefer a way it can be done with lldb commands.
Alternatively, I can add a breakpoint with:
breakpoint set --name function_name
but it is only one instruction I want to break on so still need to add an offset to that address as I then have a command that is performed when it is reached and then resumes.
Thanks