[llvm-commits] JIT: Emitting a debug location after an instruction

nicolas geoffray nicolas.geoffray at gmail.com
Mon Aug 23 04:51:59 PDT 2010


On Mon, Aug 23, 2010 at 1:46 PM, Jeffrey Yasskin <jyasskin at google.com>wrote:

> What problem are you trying to solve here? This patch looks like it'll
> assign the wrong line number to first instruction of any line, except
> when doing a backtrace.


The backtrace is exactly what I want to solve here :). Don't think lines,
but PC.


> I'm not sure how existing debuggers assign
> line numbers to backtrace frames, but one simple fix might be to look
> up the line of the address before the one stored as the return
> address.
>

This does not work if I want precise information: I don't want the PC before
or after and then do some kind of magic computation, but the exact one.

Nicolas


> Devang, why does this argument to processDebugLoc even exist? I don't
> see it used anywhere, you didn't update the MachineCodeEmitter.h
> comment to mention it, and your commit adding it only says "Update
> processDebugLoc() so that it can be used to process debug info before
> and after printing an instruction."
>
> On Sun, Aug 22, 2010 at 11:04 PM, nicolas geoffray
> <nicolas.geoffray at gmail.com> wrote:
> > Hi,
> > The attached patch adds a flags to TargetOptions to control when a debug
> > location must be emitted when jitting. As of today, it could only be
> emitted
> > before the instruction was emitted. Because, at runtime, when walking the
> > call stack, return instructions point to the next instruction after the
> > call, I would like to emit a debug information after a call instruction.
> > I haven't found any alternative or existing approach in LLVM. Please let
> me
> > know if you know one, and/or what you think about the patch.
> > Thanks!
> > Nicolas
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20100823/aab98a79/attachment.html>


More information about the llvm-commits mailing list