<div dir="ltr">Yes, it looks like, as Paul pointed out, using DW_MACRO_start_file requires the debug_macro contribution to have a debug_line_offset ("If a DW_MACRO_start_file entry is present, the header contains a reference to the .debug_line section of the compilation." - 6.3.3.1p1 in DWARFv5). Using DW_MACRO_start_file seems relevant/useful, so emitting debug_line_offset does too.<br><br>Yes, this means expanding the support for debug_line.dwo from the support for type units, to also supporting the macro usage. It's probably a matter of renaming the SplitTypeUnitFileTable to, say, SplitFileTable, and using that from the debug_macro emission code as needed in the same way as it's done for type units.<br><br>I don't think it makes sense to/is correct to generalize this to be used by compilation units (they need to refer to the debug_line in the .o file to attach the main line table information - the instruction<>line mapping - and that cannot be moved into the .dwo file (well, isn't spec'd to be done that way and there are various reasons not to want to move it out of the .o/linked executable, etc)), so decl_file will still be unresolved when dumping a dwo/dwp in isolation. <br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Feb 2, 2020 at 1:29 PM Sourabh Singh Tomar <<a href="mailto:sourav0311@gmail.com">sourav0311@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="auto">Hello everyone,<div dir="auto"><br></div><div dir="auto">As I was wrapping up my implementation of macro dwo section. I noticed that debug_line.dwo is not present in dwo object, it's *only* present if type units are also present. </div><div dir="auto"><br></div><div dir="auto">While spec doesn't mandate the presence of debug_line.dwo section for when macro section is present, but I think based on comments by Paul in <a href="https://reviews.llvm.org/D72828" target="_blank">https://reviews.llvm.org/D72828</a></div><div dir="auto">At least <span style="font-family:Calibri,sans-serif;font-size:11pt">skeletal
.debug_line.dwo section (which contains only the specialized header (the header
and the file and directory lists, but not the actual line table)</span>,  should be present for filenames. Same as in case of type units, a specialized debug_line.dwo is present.</div><div dir="auto"><br></div><div dir="auto">I would like to have your/community thoughts on this.</div><div><br></div><div>Presence of specialized line table also enhances dwarfdump's  readiibilty while reading DW_AT_decl_file from a DWO object, it only shows[even in verbose mode] the file number, *not*  the name of the file. Perhaps it tried  looked for the corresponding entry in debug_line.dwo which is absent. For the primary object dwarfdump  DW_AT_dec_file attribute is more readable with the file number and the file name both present.</div><div dir="auto"><br></div><div dir="auto">Thanks a lot!</div><div dir="auto">Sourabh Singh Tomar</div></div>
</div>
</blockquote></div>