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

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Oct 24 09:36:46 PDT 2019


labath 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);
----------------
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).


================
Comment at: lldb/test/Shell/ObjectFile/PECOFF/symbol.yaml:2
+# RUN: yaml2obj %s > %t
+# RUN: lldb-test symbols %t | FileCheck %s
+
----------------
At some point we'll probably want to add some kind of a  symtab dumping mechanism to the object-file subcommand, but this is fine until then.


================
Comment at: lldb/test/Shell/ObjectFile/PECOFF/symbol.yaml:4
+
+# CHECK: Code 0x0000000040001000 0x{{[0-9a-f]+}} 0x{{[0-9a-f]+}} entry
+# CHECK:      0x0000000040002000 0x{{[0-9a-f]+}} 0x{{[0-9a-f]+}} variable
----------------
Could you also add a CHECK line with the table header, just so one gets the idea of what is the meaning of individual fields..


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

https://reviews.llvm.org/D69366





More information about the lldb-commits mailing list