Skip to content

Commit ff7cd83

Browse files
committed
Move array usage to a separate function to ensure there is a breakpoint afterwards
1 parent 930bac5 commit ff7cd83

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

lldb/test/Shell/SymbolFile/DWARF/DW_OP_piece-O3.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
// RUN: %clang_host -O3 -gdwarf %s -o %t
99
// RUN: %lldb %t \
10-
// RUN: -o "b 22" \
10+
// RUN: -o "b 25" \
1111
// RUN: -o "r" \
1212
// RUN: -o "p/x array[2]" \
1313
// RUN: -b | FileCheck %s
@@ -17,7 +17,10 @@
1717

1818
static char array[5] = {0, 1, 2, 3, 4};
1919

20+
void func() __attribute__((noinline));
21+
void func() { ++array[2]; };
22+
2023
int main(void) {
21-
array[2]++;
24+
func();
2225
return 0;
23-
}
26+
}

0 commit comments

Comments
 (0)