[Lldb-commits] [PATCH] D120578: [lldb] Implement ObjectFile::GetCStrFromSection
Augusto Noronha via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Feb 25 11:41:15 PST 2022
augusto2112 added inline comments.
================
Comment at: lldb/include/lldb/Symbol/ObjectFile.h:677
+ const char *GetCStrFromSection(Section *section,
+ lldb::offset_t section_offset) const;
+
----------------
aprantl wrote:
> Should we call it `GetCStringFromSection`, or even better `ReadCStringFromSection`?
I agree that `ReadCStringFromSection` sounds better.
================
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;
----------------
aprantl wrote:
> 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?
What do you mean? This function calls `m_data.GetCStr` and returns the result.
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