[Lldb-commits] [PATCH] D68106: Fix a crasher due to an assert when two files have the same UUID but different paths.
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Sep 27 00:42:48 PDT 2019
labath accepted this revision.
labath added a comment.
This revision is now accepted and ready to land.
Looks good, modulo the comment about shadowing.
================
Comment at: lldb/source/Plugins/Process/minidump/ProcessMinidump.cpp:115
+ lldb::addr_t GetBaseAddress() const { return m_base; }
private:
----------------
This implements something very similar to the GetBaseAddress function on line 81 (it is equivalent to `const_cast<PlaceholderObjectFile *>(this)->GetBaseAddress().GetFileAddress()`). In fact, the only reason you could define this function is because it is const, while the other method is not. Having two methods with the same name returning different types is very confusing. I think you should just drop this and replace the call on line 417 with `objfile->GetBaseAddress().GetFileAddress()`. That way, you don't even need to cast anything.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68106/new/
https://reviews.llvm.org/D68106
More information about the lldb-commits
mailing list