[Lldb-commits] [PATCH] D120578: [lldb] Implement ObjectFile::GetCStrFromSection
Adrian Prantl via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Feb 25 11:28:41 PST 2022
aprantl added inline comments.
================
Comment at: lldb/include/lldb/Symbol/ObjectFile.h:676
+ const char *GetCStrFromSection(Section *section,
+ lldb::offset_t section_offset) const;
----------------
Can you add a doxygen comment for the method?
================
Comment at: lldb/include/lldb/Symbol/ObjectFile.h:677
+ const char *GetCStrFromSection(Section *section,
+ lldb::offset_t section_offset) const;
+
----------------
Should we call it `GetCStringFromSection`, or even better `ReadCStringFromSection`?
================
Comment at: lldb/source/Symbol/ObjectFile.cpp:558
+ObjectFile::GetCStrFromSection(Section *section,
+ lldb::offset_t section_offset) const {
+ offset_t offset = section->GetOffset() + section_offset;
----------------
The fact that it's a C string seems to be not relevant to the function. It seems to just convert a file address to a load address?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120578/new/
https://reviews.llvm.org/D120578
More information about the lldb-commits
mailing list