[PATCH] D78500: [DWARF5]:Added support for .debug_macro.dwo section in llvm-dwarfdump

Sourabh Singh Tomar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 21 03:13:17 PDT 2020


SouraVX marked 4 inline comments as done.
SouraVX added a comment.

> I am still not really contented that there are two distinct methods to get strings from a string section in DWARFDebugMacro::parseImpl(), one for _strp codes and another for _strx. Is there a way to unify them?

I'm afraid not, since `_strp` and `_strx` forms parsing is entirely different. 
`_strp` forms doesn't require any `CU` information(Test case shows that) to parse it that's why we need to explicitly pass the relevant `StringExtractor` based on context(`macro` or `macro.dwo`).
While for parsing `_strx` forms we need `CU` information(Test case shows that) to parse it, once we have the `CU` we can extract the desired `StringExtractor` and use that to parse `macro` or `macro.dwo`.


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

https://reviews.llvm.org/D78500





More information about the llvm-commits mailing list