<div dir="ltr">Hi Keno,<div><br></div><div>Thanks for that. After a little tweaking (I had made the same mistake of referencing the wrong object in my ELF getObjectForDebug code) that works perfectly. Committed in r243456.</div><div><br></div><div>- Lang.</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jul 27, 2015 at 3:24 PM, Keno Fischer <span dir="ltr"><<a href="mailto:kfischer@college.harvard.edu" target="_blank">kfischer@college.harvard.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Lang,<div><br></div><div>that flag is there to test the legacy behavior of not passing a LoadedObjectInfo to DWARFContextInMemory, but instead relying on the debug object. I see that that's not quite what it's doing though. I think the correct fix is pass a nullptr as the second argument to DWARFContextInMemory for `-printdebugline`. Is that compatible with the proposed patch?</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Keno</div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jul 27, 2015 at 5:58 PM, Lang Hames <span dir="ltr"><<a href="mailto:lhames@gmail.com" target="_blank">lhames@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Keno,<div><br></div><div>Is there a reason the -printdebugline test is calling getObjectForDebug()? Apologies - it has been a while since I looked at this, but it's causing some issues with the attached patch.</div><div><br></div><div>This patch, which was requested by Eugene, changes LoadedObjectInfo::getSectionLoadAddress to take a SectionRef instead of a string section name. In theory this should be safe since LoadedObjectInfo is meant to provide metadata only about the object that was loaded, not the object returned by getObjectForDebug. In practice it's causing problems because -printdebugline code is mixing the two and constructing a DWARFContextInMemory from a debug-object and a loaded object info. DWARFContextInMemory tries to look up the load address of the sections of the debug object and gets null values back because the debug-object was never loaded, which leads to bogus output.</div><div><br></div><div>My instinct is to remove -printdebugline and the call to getObjectForDebug(), but I wanted to check with you first: What was/is it meant to be testing?</div><div><br></div><div>Cheers,</div><div>Lang.</div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>