[Lldb-commits] [PATCH] D122293: [wip][intelpt] Refactoring instruction decoding for flexibility
walter erquinigo via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Mar 24 08:33:05 PDT 2022
wallace added inline comments.
================
Comment at: lldb/source/Plugins/Trace/intel-pt/IntelPTDecoder.cpp:227
+
+static Expected<DecodedThreadSP> DecodeLiveThread(const ThreadSP &thread_sp,
+ TraceIntelPT &trace) {
----------------
don't use expected. The DecodedThread object already can store errors. Just return a DecodedThreadSP and assign it a single error and return it. If you need to return the failed DecodedThread before you know the size of the buffer, just pass 0 as size
================
Comment at: lldb/source/Plugins/Trace/intel-pt/IntelPTDecoder.cpp:241
+DecodedThreadSP LiveThreadDecoder::DoDecode() {
+ return *(DecodeLiveThread(m_thread_sp, m_trace));
}
----------------
remove the *, because we will make DecodeLiveThread not return an Expected
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D122293/new/
https://reviews.llvm.org/D122293
More information about the lldb-commits
mailing list