[lldb-dev] How to prolong or duplicate a backstop breakpoint
Nat! via lldb-dev
lldb-dev at lists.llvm.org
Fri May 19 14:40:57 PDT 2017
I adapted the AppleObjcTrampolineHandler to my runtime. It works in as
much as that the debugger steps over my intermediate C functions and
breaks in the targetted method.
Unfortunately when I step out of the method, I am not back at the ObjC
call (0x0000000100000ebf) but instead in my intermediate function. I
think this is, because I am not using trampolines (jumps) but plain C
When I turn on `log enabled lldb step` and watch what is hapenning when
lldb steps through to -[foo class] (0x0000000100000df0)
I can see this at one point in time on the thread plan stack:
thread #1: tid = 0x8c74:
Active plan stack:
Element 0: Base thread plan.
Element 1: Stepping in through line class.m:44 using
Element 2: Stepping through trampoline code from:
0x0000000100000f42 with backstop breakpoint ID: -5 at address:
Element 3: Stepping to implementation of ObjC method - obj:
0x100001158, isa: 0x100001130, sel: 0x7fff91f58a12
Element 4: Run to address: 0x0000000100000df0 using breakpoint: -9 -
There is a backstop breakpoint -5 at the address 0x0000000100000ebf.
Fine. But then, when the start of my method -[foo class] is reached,
the trampoline handler is popped and the breakpoint vanishes!. I need to
somehow "prolong" this backstop breakpoint.
If I were to add a breakpoint to the return address
(0x0000000100000f42), I would lose the functionality, that "continue"
just continues w/o breaking on the backstop. So maybe I need to push
something ahead of the "step through" on the ThreadPlan stack but what ?
More information about the lldb-dev