[Lldb-commits] [PATCH] D72597: [lldb][DWARF] Added support for new forms in DWARFv5 macro.

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Jan 14 03:31:00 PST 2020


labath added a comment.

I have a high-level question/comment. Are you planning to implement debug_macro reading in llvm-dwarfdump? Even if you aren't, I am expecting that you will be asked to do that as a part of testing for your debug_macro generation patch... And in that case, it would be much better to write a debug_macro parser in first, and reuse that in lldb, similar to how its done for rnglists, loclists, and other "minor" sections. The slightly tricky part there is that you need to make sure to not intertwine it too much with other llvm dwarf classes, as lldb does not use all of llvm dwarf (yet). However, given that the debug_macro section is pretty independent, that shouldn't be too much of a problem?



================
Comment at: lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugMacro.cpp:70
+    // For DWARF32 debug_str_offsets header size is 8 bytes.
+    uint8_t str_offsets_base = 8, index_size = 4;
+    uint32_t line = 0, str_index = 0;
----------------
Surely, this should be set according to the actual str_offsets_base value, no?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D72597/new/

https://reviews.llvm.org/D72597





More information about the lldb-commits mailing list