llvm-project/lldb/source/Core
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
..
Address.cpp [LLDB] Applying clang-tidy modernize-use-default-member-init over LLDB 2022-03-14 13:32:03 -07:00
AddressRange.cpp [lldb][NFC] Delete commented out code in AddressRange 2021-11-11 15:42:27 -08:00
AddressResolver.cpp [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
AddressResolverFileLine.cpp [lldb] Use value_or instead of getValueOr (NFC) 2022-06-19 09:12:01 -07:00
CMakeLists.txt [llvm][lldb] use FindLibEdit.cmake everywhere 2022-05-12 15:59:41 -07:00
Communication.cpp [lldb] Modernize ThreadLauncher 2022-02-23 14:25:59 +01:00
CoreProperties.td Introduce new symbol on-demand for debug info 2022-04-26 10:42:06 -07:00
DataFileCache.cpp [lld] Don't use Optional::hasValue (NFC) 2022-06-26 19:29:40 -07:00
Debugger.cpp [lldb/Core] Fix finite progress event reporting 2022-07-05 16:25:40 -07:00
DebuggerEvents.cpp [lldb] Print diagnostic prefixes (error, warning) in color 2022-04-12 20:28:29 -07:00
Declaration.cpp [lldb] Move and clean-up the Declaration class (NFC) 2021-05-04 16:34:44 +00:00
Disassembler.cpp [trace] Add a flag to the decoder to output the instruction type 2022-07-12 16:23:03 -07:00
DumpDataExtractor.cpp [trace] Add a flag to the decoder to output the instruction type 2022-07-12 16:23:03 -07:00
DumpRegisterValue.cpp
DynamicLoader.cpp don't extra notify ModulesDidLoad() from LoadModuleAtAddress() 2022-04-12 00:36:33 +02:00
EmulateInstruction.cpp Remove ConstString from DynamicLoader, JITLoader and Instruction plugin names 2021-10-25 10:32:35 +02:00
FileLineResolver.cpp [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
FileSpecList.cpp [LLDB] Remove cases of using namespace std 2022-03-04 12:50:25 -08:00
FormatEntity.cpp [LLDB] Applying clang-tidy modernize-use-default-member-init over LLDB 2022-03-14 13:32:03 -07:00
Highlighter.cpp
IOHandler.cpp Don't use Optional::getValue (NFC) 2022-06-20 23:35:53 -07:00
IOHandlerCursesGUI.cpp [lldb][gui] remove the "expand" diamond for variables where expanding fails 2022-04-07 21:59:18 +02:00
Mangled.cpp [demangler] Rust demangler buffer return 2022-04-13 08:50:04 -07:00
Module.cpp Simplify some AsCString usage that was also explicitly handling default 2022-07-07 20:27:05 +00:00
ModuleChild.cpp [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
ModuleList.cpp Introduce new symbol on-demand for debug info 2022-04-26 10:42:06 -07:00
Opcode.cpp [lldb][NFC] Use C++ versions of the deprecated C standard library headers 2021-05-26 12:46:12 +02:00
PluginManager.cpp [NFC][lldb][trace] Rename trace session to trace bundle 2022-06-24 08:41:33 -07:00
Progress.cpp Add a progress class that can track long running operations in LLDB. 2021-03-24 12:58:13 -07:00
RichManglingContext.cpp [lldb] Add llvm_unreachable in RichManglingContext 2022-02-18 08:38:03 -08:00
SearchFilter.cpp [lldb][NFC] Use C++ versions of the deprecated C standard library headers 2021-05-26 12:46:12 +02:00
Section.cpp [lldb] Fix modernize-use-equals-default warnings (NFC) 2022-06-17 15:08:02 -07:00
SourceLocationSpec.cpp [lldb] Use value_or instead of getValueOr (NFC) 2022-06-19 09:12:01 -07:00
SourceManager.cpp Check that a FileSpec has a Directory component before using 2022-05-26 11:12:37 -07:00
StreamAsynchronousIO.cpp [lldb] Print diagnostic prefixes (error, warning) in color 2022-04-12 20:28:29 -07:00
StreamFile.cpp [lldb] Rename Logging.h to LLDBLog.h and clean up includes 2022-02-03 14:47:01 +01:00
UserSettingsController.cpp
Value.cpp [lldb] Use =default in the ValueList class 2022-03-30 09:12:59 +02:00
ValueObject.cpp Don't use Optional::getValue (NFC) 2022-06-20 23:35:53 -07:00
ValueObjectCast.cpp [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
ValueObjectChild.cpp [lld] Don't use Optional::hasValue (NFC) 2022-06-26 19:29:40 -07:00
ValueObjectConstResult.cpp [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
ValueObjectConstResultCast.cpp [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
ValueObjectConstResultChild.cpp [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
ValueObjectConstResultImpl.cpp Remove unused variable. 2021-11-18 15:58:20 -08:00
ValueObjectDynamicValue.cpp [lldb] Change back LLDBLog::Commands->Types in a couple more places 2022-03-16 15:46:17 +01:00
ValueObjectList.cpp
ValueObjectMemory.cpp [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
ValueObjectRegister.cpp [lldb] Change back LLDBLog::Commands->Types in a couple more places 2022-03-16 15:46:17 +01:00
ValueObjectSyntheticFilter.cpp [lldb] Rename Logging.h to LLDBLog.h and clean up includes 2022-02-03 14:47:01 +01:00
ValueObjectUpdater.cpp [lldb][NFC] Rename the second ValueObjectManager to ValueObjectUpdater and remove the dead code 2021-02-24 13:58:01 +01:00
ValueObjectVariable.cpp Reland "[LLDB][NFC] Decouple dwarf location table from DWARFExpression." 2022-07-12 10:54:24 -07:00