<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Feb 21, 2018, at 9:11 AM, David Blaikie <<a href="mailto:dblaikie@gmail.com" class="">dblaikie@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><br class=""><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Wed, Feb 21, 2018 at 9:07 AM Adrian Prantl <<a href="mailto:aprantl@apple.com" class="">aprantl@apple.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space" class=""><div class=""><br class=""><blockquote type="cite" class=""><div class="">On Feb 21, 2018, at 9:04 AM, David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank" class="">dblaikie@gmail.com</a>> wrote:</div><br class="m_-5896445140954181565Apple-interchange-newline"><div class=""><div dir="ltr" class="">Not sure I follow there, though, Adrian - the semantics don't dictate just how we could model this in a debugger.. (similarly how our diagnostics can provide more detail rather than modelling a macro expansion as though it was all written at the macro invocation point)<br class=""><br class="">I think we've talked about using something like inlining to represent macro expansions, for example - to provide help with the debugging experience.</div></div></blockquote><div class=""><br class=""></div></div></div><div style="word-wrap:break-word;line-break:after-white-space" class=""><div class=""><div class="">Something like this would certainly be doable, but I'm somewhat concerned that we wouldn't be able to reproduce a compilation from preprocessed source any more. I suppose we could extend #line with inline information to reflect the macro expansion, though.</div></div></div></blockquote><div class=""><br class="">I think that might already be true - if it's a multi-line macro, for example, it'll change the line numbers of the file (& result in the multiple lines of the macro being attributed to different lines, rather than all to the same line).<br class=""></div></div></div></div></blockquote><div><br class=""></div><div>As far as I rememeber, a multi-line macro gets expanded onto a single line.</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_quote"><div class=""><br class="">(& certainly if you've got column info on, it'll change quite a lot)<br class=""></div></div></div></div></blockquote><div><br class=""></div>That's might be the case, though.</div><div><br class=""></div><div>-- adrian<br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_quote"><div class=""> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space" class=""><div class=""><div class=""><br class=""></div><div class="">-- adrian</div></div></div><div style="word-wrap:break-word;line-break:after-white-space" class=""><div class=""><br class=""><blockquote type="cite" class=""><div class=""><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Wed, Feb 21, 2018 at 8:18 AM Adrian Prantl <<a href="mailto:aprantl@apple.com" target="_blank" class="">aprantl@apple.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space" class="">This is not even a limitation of DWARF but rather mandated by the C specification. The C language standard explicitly specifies that all code in a (multi-line) macro expansion shall behave as if it were on the same line as the macro invocation. I understand that it technically doesn't say anything about columns and perhaps we could do something for single-line macros there, but this is basically the root of the issue.</div><div style="word-wrap:break-word;line-break:after-white-space" class=""><br class=""><div class=""><br class=""></div><div class="">-- adrian</div></div><div style="word-wrap:break-word;line-break:after-white-space" class=""><div class=""><br class=""><blockquote type="cite" class=""><div class="">On Feb 21, 2018, at 8:00 AM, David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank" class="">dblaikie@gmail.com</a>> wrote:</div><br class="m_-5896445140954181565m_-3989513002722867512Apple-interchange-newline"><div class=""><div dir="ltr" class="">I think it's a matter of this being the best of no great options available in DWARF, but I personally haven't given it a great deal of thought.<br class=""><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Tue, Feb 20, 2018 at 10:34 PM Alex Denisov via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org" target="_blank" class="">cfe-dev@lists.llvm.org</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space" class="">Hi,<br class=""><br class="">I see an issue with debug info and macro. Here is an example:<br class=""><br class=""><font face="Bitstream Vera Sans Mono" class="">#define f(x) x<br class="">...<br class="">int a = f(b + c);<br class="">        ^</font><br class=""><br class="">The debug information for each node in 'b + c' points to the 'f' (see the caret). I expect it to point to the actual source location.<br class=""><br class="">I assume that is a known issue, but I could find neither explanation nor bug report.<br class="">Can somebody shed some light on the issue?<br class=""><br class="">Cheers,<div class="">Alex.<br class=""><br class=""></div></div>_______________________________________________<br class="">
cfe-dev mailing list<br class="">
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank" class="">cfe-dev@lists.llvm.org</a><br class="">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank" class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br class="">
</blockquote></div></div>
</div></blockquote></div><br class=""></div></blockquote></div>
</div></blockquote></div></div></blockquote></div></div>
</div></blockquote></div><br class=""></body></html>