[Lldb-commits] [lldb] [lldb] Improve mid-function epilogue scanning for x86 (PR #110965)

via lldb-commits lldb-commits at lists.llvm.org
Thu Oct 3 00:10:58 PDT 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff c1343a29216f08ec762b3e58572e5c3e41f6f285 8deef52bd49a54c8ea23d97460641d01d0daf898 --extensions cpp -- lldb/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.cpp lldb/unittests/UnwindAssembly/x86/Testx86AssemblyInspectionEngine.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/lldb/unittests/UnwindAssembly/x86/Testx86AssemblyInspectionEngine.cpp b/lldb/unittests/UnwindAssembly/x86/Testx86AssemblyInspectionEngine.cpp
index f5bb3b6d64..f737d0db24 100644
--- a/lldb/unittests/UnwindAssembly/x86/Testx86AssemblyInspectionEngine.cpp
+++ b/lldb/unittests/UnwindAssembly/x86/Testx86AssemblyInspectionEngine.cpp
@@ -2847,29 +2847,29 @@ TEST_F(Testx86AssemblyInspectionEngine, TestDisassemblyMidFunctionEpilogues) {
   std::unique_ptr<x86AssemblyInspectionEngine> engine64 = Getx86_64Inspector();
 
   uint8_t data[] = {
-    0x55,                   // <+0>: pushq %rbp
-    0x48, 0x89, 0xe5,       // <+1>: movq %rsp, %rbp
-    0x48, 0x83, 0xec, 0x70, // <+4>: subq $0x70, %rsp
-    0x90,                   // <+8>: nop               // prologue set up
+      0x55,                   // <+0>: pushq %rbp
+      0x48, 0x89, 0xe5,       // <+1>: movq %rsp, %rbp
+      0x48, 0x83, 0xec, 0x70, // <+4>: subq $0x70, %rsp
+      0x90,                   // <+8>: nop               // prologue set up
 
-    0x74, 0x7,              // <+9>: je 7 <+18>
-    0x48, 0x83, 0xc4, 0x70, // <+11>: addq $0x70, %rsp
-    0x5d,                   // <+15>: popq %rbp
-    0xff, 0xe0,             // <+16>: jmpq *%rax      // epilogue completed
+      0x74, 0x7,              // <+9>: je 7 <+18>
+      0x48, 0x83, 0xc4, 0x70, // <+11>: addq $0x70, %rsp
+      0x5d,                   // <+15>: popq %rbp
+      0xff, 0xe0,             // <+16>: jmpq *%rax      // epilogue completed
 
-    0x90,                   // <+18>: nop             // prologue setup back
+      0x90, // <+18>: nop             // prologue setup back
 
-    0x74, 0x8,              // <+19>: je 7 <+28>
-    0x48, 0x83, 0xc4, 0x70, // <+21>: addq $0x70, %rsp
-    0x5d,                   // <+25>: popq %rbp
-    0x90,                   // <+26>: nop           // mid-epilogue non-epilogue
-    0xc3,                   // <+27>: retq            // epilogue completed
+      0x74, 0x8,              // <+19>: je 7 <+28>
+      0x48, 0x83, 0xc4, 0x70, // <+21>: addq $0x70, %rsp
+      0x5d,                   // <+25>: popq %rbp
+      0x90, // <+26>: nop           // mid-epilogue non-epilogue
+      0xc3, // <+27>: retq            // epilogue completed
 
-    0x90,                   // <+28>: nop             // prologue setup back
+      0x90, // <+28>: nop             // prologue setup back
 
-    0x48, 0x83, 0xc4, 0x70, // <+29>: addq $0x70, %rsp
-    0x5d,                   // <+33>: popq %rbp
-    0xc3,                   // <+34>: retq            // epilogue completed
+      0x48, 0x83, 0xc4, 0x70, // <+29>: addq $0x70, %rsp
+      0x5d,                   // <+33>: popq %rbp
+      0xc3,                   // <+34>: retq            // epilogue completed
 
   };
 

``````````

</details>


https://github.com/llvm/llvm-project/pull/110965


More information about the lldb-commits mailing list