<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Wed, Feb 21, 2018 at 9:07 AM Adrian Prantl <<a href="mailto:aprantl@apple.com">aprantl@apple.com</a>> wrote:<br></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"><div><br><blockquote type="cite"><div>On Feb 21, 2018, at 9:04 AM, David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>> wrote:</div><br class="m_-5896445140954181565Apple-interchange-newline"><div><div dir="ltr">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><br>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><br></div></div></div><div style="word-wrap:break-word;line-break:after-white-space"><div><div>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><br>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><br>(& certainly if you've got column info on, it'll change quite a lot)<br> </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"><div><div><br></div><div>-- adrian</div></div></div><div style="word-wrap:break-word;line-break:after-white-space"><div><br><blockquote type="cite"><div><br><div class="gmail_quote"><div dir="ltr">On Wed, Feb 21, 2018 at 8:18 AM Adrian Prantl <<a href="mailto:aprantl@apple.com" target="_blank">aprantl@apple.com</a>> wrote:<br></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">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"><br><div><br></div><div>-- adrian</div></div><div style="word-wrap:break-word;line-break:after-white-space"><div><br><blockquote type="cite"><div>On Feb 21, 2018, at 8:00 AM, David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>> wrote:</div><br class="m_-5896445140954181565m_-3989513002722867512Apple-interchange-newline"><div><div dir="ltr">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><br><div class="gmail_quote"><div dir="ltr">On Tue, Feb 20, 2018 at 10:34 PM Alex Denisov via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>> wrote:<br></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">Hi,<br><br>I see an issue with debug info and macro. Here is an example:<br><br><font face="Bitstream Vera Sans Mono">#define f(x) x<br>...<br>int a = f(b + c);<br>        ^</font><br><br>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><br>I assume that is a known issue, but I could find neither explanation nor bug report.<br>Can somebody shed some light on the issue?<br><br>Cheers,<div>Alex.<br><br></div></div>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
</blockquote></div></div>
</div></blockquote></div><br></div></blockquote></div>
</div></blockquote></div></div></blockquote></div></div>