On Mon, Aug 23, 2010 at 1:46 PM, Jeffrey Yasskin <span dir="ltr"><<a href="mailto:jyasskin@google.com">jyasskin@google.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
What problem are you trying to solve here? This patch looks like it'll<br>
assign the wrong line number to first instruction of any line, except<br>
when doing a backtrace.</blockquote><div><br></div><div>The backtrace is exactly what I want to solve here :). Don't think lines, but PC.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
 I'm not sure how existing debuggers assign<br>
line numbers to backtrace frames, but one simple fix might be to look<br>
up the line of the address before the one stored as the return<br>
address.<br></blockquote><div><br></div><div>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.</div><div> </div><div>
Nicolas</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
Devang, why does this argument to processDebugLoc even exist? I don't<br>
see it used anywhere, you didn't update the MachineCodeEmitter.h<br>
comment to mention it, and your commit adding it only says "Update<br>
processDebugLoc() so that it can be used to process debug info before<br>
and after printing an instruction."<br>
<div><div></div><div class="h5"><br>
On Sun, Aug 22, 2010 at 11:04 PM, nicolas geoffray<br>
<<a href="mailto:nicolas.geoffray@gmail.com">nicolas.geoffray@gmail.com</a>> wrote:<br>
> Hi,<br>
> The attached patch adds a flags to TargetOptions to control when a debug<br>
> location must be emitted when jitting. As of today, it could only be emitted<br>
> before the instruction was emitted. Because, at runtime, when walking the<br>
> call stack, return instructions point to the next instruction after the<br>
> call, I would like to emit a debug information after a call instruction.<br>
> I haven't found any alternative or existing approach in LLVM. Please let me<br>
> know if you know one, and/or what you think about the patch.<br>
> Thanks!<br>
> Nicolas<br>
</div></div><div><div></div><div class="h5">> _______________________________________________<br>
> llvm-commits mailing list<br>
> <a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
><br>
><br>
</div></div></blockquote></div><br>