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

Jeffrey Yasskin jyasskin at google.com
Mon Aug 23 04:46:25 PDT 2010


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. 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.

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
>
>



More information about the llvm-commits mailing list