[Lldb-commits] [PATCH] D83881: [lldb/COFF] Remove strtab zeroing hack

Adrian McCarthy via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Jul 15 09:59:47 PDT 2020


amccarth added a comment.

Yes, getting rid of this hack looks like a good idea.  If it was actually necessary, there should have been a test on it, and the comments should have been clearer.

See my inline comment, though.  It looks like this might back out only part of the change.



================
Comment at: lldb/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp:642
         DataExtractor symtab_data =
             ReadImageData(m_coff_header.symoff, symbol_data_size + 4);
         lldb::offset_t offset = symbol_data_size;
----------------
The `+4` at the end of this expression is from the same patch.  I wonder if it was an attempt to make space for the four bytes of zeros at offset 0 that you're eliminating?

I suggest removing the `+4` and trying the tests again unless it's obvious to you why it's still necessary.  The comment above seems like it might be trying to explain it, but that comment came later.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D83881





More information about the lldb-commits mailing list