[Lldb-commits] [PATCH] D78396: [lldb/Dataformatter] Add support for CoreFoundation Dictionaries and Sets
Med Ismail Bennani via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Apr 21 12:59:57 PDT 2020
mib marked 7 inline comments as done.
mib added inline comments.
================
Comment at: lldb/source/Plugins/Language/ObjC/CFBasicHash.cpp:47-62
+ DataBufferHeap buffer(size, 0);
+ m_exe_ctx_ref.GetProcessSP()->ReadMemory(addr, buffer.GetBytes(), size,
+ error);
+ if (error.Fail())
+ return false;
+
+ DataExtractor data_extractor = DataExtractor(
----------------
labath wrote:
> Why don't you just pass `m_ht.get()` to `ReadMemory` ?
IIUC, `ReadMemory` will read memory matching the inferior endianness. That's why, I'm using a `DataExtractor`, to translate, the copied bytes to the host endianness.
================
Comment at: lldb/source/Plugins/Language/ObjC/CFBasicHash.cpp:71-82
+ m_exe_ctx_ref.GetProcessSP()->ReadMemory(ptr_offset, buffer.GetBytes(), size,
+ error);
+
+ if (error.Fail()) {
+ m_ht = nullptr;
+ return false;
+ }
----------------
labath wrote:
> `ReadMemory(ptr_offset, m_ht->pointers, ...)` ?
Same answer.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78396/new/
https://reviews.llvm.org/D78396
More information about the lldb-commits
mailing list