Issue with -printdebugline.

Lang Hames lhames at gmail.com
Mon Jul 27 14:58:36 PDT 2015


Hi Keno,

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.

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.

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?

Cheers,
Lang.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150727/474d5d5a/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: get_loaded_section_address.patch
Type: application/octet-stream
Size: 14513 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150727/474d5d5a/attachment.obj>


More information about the llvm-commits mailing list