[Lldb-commits] [PATCH] D122293: [intelpt] Refactoring instruction decoding for flexibility

Alisamar Husain via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Mar 25 14:22:46 PDT 2022


zrthxn added inline comments.


================
Comment at: lldb/source/Plugins/Trace/intel-pt/TraceCursorIntelPT.cpp:77
 bool TraceCursorIntelPT::IsError() {
   return m_decoded_thread_sp->GetInstructions()[m_pos].IsError();
 }
----------------
jj10306 wrote:
> nit: should we update this to use the error map? I don't think there's a significant difference performance wise, but the code would be a little cleaner imo and consistent with how `GetError()` works.
That would sort of look like this I think

```
  if (m_decoded_thread_sp->GetErrorByInstructionIndex(m_pos).isA<ErrorSuccess>())
    return false;
  else true;
```


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