[Lldb-commits] [PATCH] D130580: Add string conversion for InstructionControlFlowKind enum
Jakob Johnson via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Jul 26 08:36:36 PDT 2022
jj10306 created this revision.
jj10306 added reviewers: persona0220, wallace.
Herald added a project: All.
jj10306 requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.
Refactor the string conversion of the `lldb::InstructionControlFlowKind` enum out
of `Instruction::Dump` to enable reuse of this logic by the
JSON TraceDumper (to be implemented in separate diff).
Will coordinate the landing of this change with D130320 <https://reviews.llvm.org/D130320> since there will be a minor merge conflict between
these changes.
Test Plan:
Run unittests
> ninja check-lldb-unittests
[4/5] Running lldb unit test suite
Testing Time: 10.13s
Passed: 1084
Verify '-k' flag's output
(lldb) thread trace dump instructions -k
thread #1: tid = 1375377
libstdc++.so.6`std::ostream::flush() + 43
7048: 0x00007ffff7b54dab return retq
7047: 0x00007ffff7b54daa other popq %rbx
7046: 0x00007ffff7b54da7 other movq %rbx, %rax
7045: 0x00007ffff7b54da5 cond jump je 0x11adb0 ; <+48>
7044: 0x00007ffff7b54da2 other cmpl $-0x1, %eax
libc.so.6`_IO_fflush + 249
7043: 0x00007ffff7161729 return retq
7042: 0x00007ffff7161728 other popq %rbp
7041: 0x00007ffff7161727 other popq %rbx
7040: 0x00007ffff7161725 other movl %edx, %eax
7039: 0x00007ffff7161721 other addq $0x8, %rsp
7038: 0x00007ffff7161709 cond jump je 0x87721 ; <+241>
7037: 0x00007ffff7161707 other decl (%rsi)
7036: 0x00007ffff71616fe cond jump je 0x87707 ; <+215>
7035: 0x00007ffff71616f7 other cmpl $0x0, 0x33de92(%rip) ; __libc_multiple_threads
7034: 0x00007ffff71616ef other movq $0x0, 0x8(%rsi)
7033: 0x00007ffff71616ed cond jump jne 0x87721 ; <+241>
7032: 0x00007ffff71616e9 other subl $0x1, 0x4(%rsi)
7031: 0x00007ffff71616e2 other movq 0x88(%rbx), %rsi
7030: 0x00007ffff71616e0 cond jump jne 0x87721 ; <+241>
7029: 0x00007ffff71616da other testl $0x8000, (%rbx) ; imm = 0x8000
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D130580
Files:
lldb/include/lldb/Core/Disassembler.h
lldb/include/lldb/lldb-enumerations.h
lldb/source/Core/Disassembler.cpp
lldb/source/Target/TraceDumper.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D130580.447723.patch
Type: text/x-patch
Size: 4328 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220726/c98f4186/attachment.bin>
More information about the lldb-commits
mailing list