[PATCH] D52444: [DWARF] Make llvm-dwarfdump display the .debug_loc.dwo section (fixes PR38991)

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 2 15:30:47 PDT 2018


dblaikie accepted this revision.
dblaikie added a comment.
This revision is now accepted and ready to land.

You should be able to remove the condition on numDWOCompileUnits now that parsing debug_loc.dwo doesn't need a CU of any kind? Be good to have a/the test case validate that the dumping works in the absence of any debug_info(.dwo) sections. Just the debug_loc.dwo all by itself. (this is my main motivation with the line of questioning/discussion here - it's nice to be able to dump independent sections even if they appear alone and/or without parsing other (Possibly corrupt) debug info)

(also, I did go back and read the spec - and you're right that call_ref uses an address-width-sized value, and that it could be used in debug_loclists.dwo. Appendix B of DWARF5 even states specifically (in (fo)) that DW_OP_call_ref can be used to reference from somewhere in debug_info.dwo to somewhere else in debug_info.dwo - though interestingly it doesn't mention any chance of referencing debug_info.dwo from debug_loc.dwo - so maybe it isn't valid in debug_loclists.dwo (or debug_loc.dwo)?

And honestly I'm not sure it makes sense to use it in debug_info.dwo either - because DWP tools are meant to work without relocations - and this form would require a relocation)


https://reviews.llvm.org/D52444





More information about the llvm-commits mailing list