[Lldb-commits] [PATCH] D104422: [trace] Add a TraceCursor class

walter erquinigo via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Jun 16 19:32:09 PDT 2021


wallace updated this revision to Diff 352605.
wallace added a comment.

- Simplified Trace.h by simply having lldb::TraceCursorUP GetCursor, as suggested.
- Improved the documentation including a sample code.
- Added methods to quickly move the trace to the beginning or the end.
- Renamed TraceInstructionType to TraceInstructionControlFlowType. I'm not happy with the long name though. I didn't stick to the granularity name because it's useful to know the control flow information of the current instruction, e.g. you might be traversing the instructions one by one but you want to log whenever you see a call.
- Also added a dummy "end of trace" invalid instruction. It helps iterating making sure that only the wanted instructions are seen. The other option, which I don't like, is to point to the last actual instruction of the trace, which might not be what the user wants and they would need to make a additional check for it before the loop.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D104422/new/

https://reviews.llvm.org/D104422

Files:
  lldb/include/lldb/Target/Trace.h
  lldb/include/lldb/Target/TraceCursor.h
  lldb/include/lldb/lldb-enumerations.h
  lldb/include/lldb/lldb-forward.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D104422.352605.patch
Type: text/x-patch
Size: 8623 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20210617/38574c14/attachment-0001.bin>


More information about the lldb-commits mailing list