[Lldb-commits] [PATCH] D69366: [LLDB] [PECOFF] Fix symbols to refer to the right section

Adrian McCarthy via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Oct 24 10:57:00 PDT 2019


amccarth added inline comments.


================
Comment at: lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp:691
+              // so we should use section index "symbol.sect - 1 + 1".
+              Address symbol_addr(sect_list->GetSectionAtIndex(symbol.sect),
                                   symbol.value);
----------------
labath wrote:
> You should use FindSectionByID here. That's the API used by both ELF and MachO object files and SymbolFilePDB classes for this sort of thing. This would obviate the need for the long comment and make this patch independent of the header stuff (which I'm going to commit as soon as I figure out how that's done).
+1 to labath's suggestion.  It seems unfortunate that this already had a coupling to implementation details of the section list.


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

https://reviews.llvm.org/D69366





More information about the lldb-commits mailing list