[Lldb-commits] [PATCH] D150383: [lldb] Correct elision of line zero in mixed disassembly

Dave Lee via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu May 11 13:24:43 PDT 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rGefbd5870402b: [lldb] Correct elision of line zero in mixed disassembly (authored by kastiglione).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D150383

Files:
  lldb/source/Core/Disassembler.cpp
  lldb/test/Shell/Commands/command-disassemble-mixed.test


Index: lldb/test/Shell/Commands/command-disassemble-mixed.test
===================================================================
--- /dev/null
+++ lldb/test/Shell/Commands/command-disassemble-mixed.test
@@ -0,0 +1,13 @@
+extern int do_not_show;
+
+int main() {
+  int abc = 30;
+#line 0
+  return abc;
+}
+
+// RUN: %clang_host -g -x c -o a.out %s
+// RUN: %lldb -b -o 'disassemble --mixed -n main' a.out | FileCheck %s
+
+// CHECK: a.out`main:
+// CHECK-NOT: do_not_show
Index: lldb/source/Core/Disassembler.cpp
===================================================================
--- lldb/source/Core/Disassembler.cpp
+++ lldb/source/Core/Disassembler.cpp
@@ -243,7 +243,7 @@
 
   // Skip any line #0 entries - they are implementation details
   if (line.line == 0)
-    return false;
+    return true;
 
   ThreadSP thread_sp = exe_ctx.GetThreadSP();
   if (thread_sp) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D150383.521426.patch
Type: text/x-patch
Size: 875 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230511/f6c6e12e/attachment-0001.bin>


More information about the lldb-commits mailing list