[lldb-dev] SBThread numframes/frameatindex question

Carlo Kok ck at remobjects.com
Thu Nov 1 14:23:36 PDT 2012


Op 30-10-2012 09:57, Carlo Kok schreef:
> In my llvm emitted code (see IR attached) when I debug I get odd stack
> frame listings.
>
> If I set a breakpoint anywhere in "main" the stack frame contains a
> faulty DoIt entry.
> [0]
>    FunctionName: "Main"
>    FuncType: set (has the proper sig for main)
>    Position: !dbg !19 (call to DoIt)
> [1]
>    FunctionName: "DoIt"
>    FuncType: NULL
>    Position: !dbg !18 (ret)
> [2]
>    FuncName: "start"
>    FuncType: NULL
>    Position: not set
>
> At this point there's nothing in the stack frame that calls DoIt yet. If
> at this point I step into "DoIt" it inserts a proper DoIt entry in the
> list:
>
> [0]
>    FunctionName: "DoIt"
>    FuncType: set (proper sig for DoIt)
>    Position: !dbg !16 (alloca)
> [1]
>    FunctionName: "Main"
>    FuncType: set (has the proper sig for main)
>    Position: !dbg !19 (call to DoIt)
> [2]
>    FunctionName: "DoIt"
>    FuncType: NULL
>    Position: !dbg !18 (ret)
> [3]
>    FuncName: "start"
>    FuncType: NULL
>    Position: not set
>
> but the old one is still there. Where does this come from?


This was all through lack of a stackframe. When forcing stackframes, it 
works fine.






More information about the lldb-dev mailing list