[Lldb-commits] [PATCH] D120578: [lldb] Implement ObjectFile::GetCStrFromSection

Andreu Carminati via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Feb 25 14:59:18 PST 2022


andcarminati added inline comments.


================
Comment at: lldb/source/Symbol/ObjectFile.cpp:559
+                               lldb::offset_t section_offset) const {
+  offset_t offset = section->GetOffset() + section_offset;
+  return m_data.GetCStr(&offset);
----------------
Wouldn't it be better to use 
```
section->GetFileOffset()
``` 
to access m_data? As this object contains data loaded from the file. 


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