mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-23 22:00:10 +00:00
Fix mixed disassembly showing source lines for "line 0"
"line 0" in a DWARF linetable means something that doesn't have associated source. The code for mixed disassembly has a comment indicating that "line 0" should be skipped, but the wrong value was returned. Fix the return value and add a test to check that we don't incorrectly show source lines from the beginning of the file. Reviewed By: jasonmolenda Differential Revision: https://reviews.llvm.org/D112931
This commit is contained in:
parent
85b27ace52
commit
ded1bad64a
18
lldb/test/Shell/Commands/command-disassemble-mixed.c
Normal file
18
lldb/test/Shell/Commands/command-disassemble-mixed.c
Normal file
@ -0,0 +1,18 @@
|
||||
// invalid mixed disassembly line
|
||||
|
||||
// RUN: %clang -g %s -o %t
|
||||
// RUN: %lldb %t -o "dis -m -n main" -o "exit" | FileCheck %s
|
||||
|
||||
// CHECK: int main
|
||||
// CHECK: int i
|
||||
// CHECK-NOT: invalid mixed disassembly line
|
||||
// CHECK: return 0;
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i=0; i < 10; ++i) ;
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user