[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 11:43:59 PDT 2023
kastiglione updated this revision to Diff 521392.
kastiglione added a comment.
add Shell test
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,12 @@
+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-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.521392.patch
Type: text/x-patch
Size: 852 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230511/3b7edfbc/attachment-0001.bin>
More information about the lldb-commits
mailing list