llvm-project/lldb/source/Expression
Walter Erquinigo ad7bcda940 [trace] Add a flag to the decoder to output the instruction type
To build complex binding upon instruction trace, additional metadata 'instruction type' is needed.

This diff has followings:
 - Add a flag -k  / --kind for instruction dump
 - Remove SetGranularity and SetIgnoreErros from Trace cursor

Sample output:

```
(lldb) thread trace dump instruction -k
thread #1: tid = 3198805
  libc.so.6`_IO_puts + 356
    2107: 0x00007ffff7163594 (    return)     retq
    2106: 0x00007ffff7163592 (     other)     popq   %r13
    2105: 0x00007ffff7163590 (     other)     popq   %r12
    2104: 0x00007ffff716358f (     other)     popq   %rbp
    2103: 0x00007ffff716358e (     other)     popq   %rbx
    2102: 0x00007ffff716358c (     other)     movl   %ebx, %eax
    2101: 0x00007ffff7163588 (     other)     addq   $0x8, %rsp
    2100: 0x00007ffff7163570 ( cond jump)     je     0x89588                   ; <+344>
    2099: 0x00007ffff716356e (     other)     decl   (%rdx)
    2098: 0x00007ffff7163565 ( cond jump)     je     0x8956e                   ; <+318>
    2097: 0x00007ffff716355e (     other)     cmpl   $0x0, 0x33c02b(%rip)      ; __libc_multiple_threads
    2096: 0x00007ffff7163556 (     other)     movq   $0x0, 0x8(%rdx)
    2095: 0x00007ffff7163554 ( cond jump)     jne    0x89588                   ; <+344>
    2094: 0x00007ffff7163550 (     other)     subl   $0x1, 0x4(%rdx)
    2093: 0x00007ffff7163549 (     other)     movq   0x88(%rbp), %rdx
    2092: 0x00007ffff7163547 ( cond jump)     jne    0x89588                   ; <+344>
    2091: 0x00007ffff7163540 (     other)     testl  $0x8000, (%rbp)           ; imm = 0x8000
    2090: 0x00007ffff716353c (     other)     cmovaq %rax, %rbx
    2089: 0x00007ffff7163535 (     other)     cmpq   $0x7fffffff, %rbx         ; imm = 0x7FFFFFFF
    2088: 0x00007ffff7163530 (     other)     movl   $0x7fffffff, %eax         ; imm = 0x7FFFFFFF
```

Reviewed By: wallace

Differential Revision: https://reviews.llvm.org/D128477
2022-07-12 16:23:03 -07:00
..
CMakeLists.txt Reland "[LLDB][NFC] Decouple dwarf location table from DWARFExpression." 2022-07-12 10:54:24 -07:00
DWARFExpression.cpp Reland "[LLDB][NFC] Decouple dwarf location table from DWARFExpression." 2022-07-12 10:54:24 -07:00
DWARFExpressionList.cpp Reland "[LLDB][NFC] Decouple dwarf location table from DWARFExpression." 2022-07-12 10:54:24 -07:00
DiagnosticManager.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
Expression.cpp [lldb][NFC] Fix all formatting errors in .cpp file headers 2020-01-24 08:52:55 +01:00
ExpressionVariable.cpp [lldb] Rename Logging.h to LLDBLog.h and clean up includes 2022-02-03 14:47:01 +01:00
FunctionCaller.cpp [lldb] Rename Logging.h to LLDBLog.h and clean up includes 2022-02-03 14:47:01 +01:00
IRExecutionUnit.cpp [trace] Add a flag to the decoder to output the instruction type 2022-07-12 16:23:03 -07:00
IRInterpreter.cpp [LLDB] Applying clang-tidy modernize-use-default-member-init over LLDB 2022-03-14 13:32:03 -07:00
IRMemoryMap.cpp [lldb] Rename Logging.h to LLDBLog.h and clean up includes 2022-02-03 14:47:01 +01:00
LLVMUserExpression.cpp [lldb] Rename Logging.h to LLDBLog.h and clean up includes 2022-02-03 14:47:01 +01:00
Materializer.cpp Reland "[LLDB][NFC] Decouple dwarf location table from DWARFExpression." 2022-07-12 10:54:24 -07:00
REPL.cpp [lldb] Don't report progress in the REPL 2022-04-11 13:06:40 -07:00
UserExpression.cpp Support expressions in the context of a reference 2022-06-21 14:30:07 +02:00
UtilityFunction.cpp [lldb] Get rid of HAVE_SYS_TYPES_H 2021-08-03 22:14:56 +02:00