[Lldb-commits] [PATCH] D130930: [trace] Add SBTraceCursor bindings
Jakob Johnson via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Aug 2 08:52:11 PDT 2022
jj10306 added inline comments.
================
Comment at: lldb/source/Plugins/Trace/intel-pt/DecodedThread.cpp:201
lldb::TraceEvent DecodedThread::GetEventByIndex(int item_index) const {
+ // This currently returns an undefined value when the item isn't an event.
return m_item_data[item_index].event;
----------------
what's the best return value if this is called and the item isn't an event?
ideally we could return something similar to LLDB_INVALID_ADDRESS, but since this is an enum we would need to add a new variant that represents the "invalid" case. Perhaps we could bring back the `eTraceEventNone` variant that was recently removed?
wdyt?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130930/new/
https://reviews.llvm.org/D130930
More information about the lldb-commits
mailing list