[LLVMdev] Why gdb can't determine stack of code run in JIT?

Reid Kleckner reid.kleckner at gmail.com
Sun Oct 17 08:28:35 PDT 2010


I know you haven't been able to get the JIT gdb support to work on
FreeBSD (right?), but this is exactly the problem that we ran into
that it solves.

http://llvm.org/docs/DebuggingJITedCode.html

I don't know what heuristic gdb is trying to use to unwind the stack,
but it doesn't work.  I asked a gdb developer about it two summers ago
when I was working on this, but he seemed dismissive about teaching
gdb how to get this right.

Reid

On Fri, Oct 15, 2010 at 8:58 PM, Yuri <yuri at rawbw.com> wrote:
> I run some code in JIT on x86-64 architecture.
> Even though llvm::NoFramePointerElim is set to true, I still see weird
> stack in gdb, see below.
> 800b485a4 is the current rip register where gdb stopped. Then many
> others values aren't valid. Then there is value that looks ok again.
>
> Why gdb can't determine stack?
>
> Yuri
>
>
> -- stack --
> #0  0x0000000800b485a4 in ?? ()
> #1  0x000000000000005f in ?? ()
> #2  0x0000000003899330 in ?? ()
> #3  0x000000000422d6f8 in ?? ()
> #4  0x0000000000ea7468 in ?? ()
> #5  0x00000000051b0600 in ?? ()
> #6  0x00000000013714d8 in ?? ()
> #7  0x0000000003b425c8 in ?? ()
> #8  0x000000000397c420 in ?? ()
> #9  0x00007fffffffae60 in ?? ()
> #10 0x0000000800b481b1 in ?? ()
> #11 0x0000000003b42590 in ?? ()
> #12 0x00000000038993c0 in ?? ()
> #13 0x000000000397c940 in ?? ()
> #14 0x00000000038992e8 in ?? ()
> #15 0x0000000003899330 in ?? ()
> #16 0x0000000004b0a748 in ?? ()
> #17 0x000000000556e818 in ?? ()
> #18 0x0000000003899378 in ?? ()
> #19 0x00000000038993c0 in ?? ()
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>




More information about the llvm-dev mailing list