Files
clang-p2996/cross-project-tests/debuginfo-tests/dexter-tests/memvars/inlining.c
Shubham Sandeep Rastogi e6cc7b723f [Dexter] Fix test failures on greendragon (#66299)
The issue with these test failures is that the dSYM was not being found
by lldb, which is why setting breakpoints was failing and lldb quit
without performing any steps. This change copies the dSYM to the same
temp directory that the executable is copied to.
2023-09-14 09:28:47 -07:00

27 lines
643 B
C

// REQUIRES: lldb
// UNSUPPORTED: system-windows
// RUN: %clang -std=gnu11 -O2 -glldb %s -o %t
// RUN: %dexter --fail-lt 1.0 -w --debugger lldb --binary %t -- %s
//
//// Check that the once-escaped variable 'param' can still be read after
//// we perform inlining + mem2reg. See D89810 and D85555.
int g;
__attribute__((__always_inline__))
static void use(int* p) {
g = *p;
}
__attribute__((__noinline__))
void fun(int param) {
volatile int step1 = 0; // DexLabel('s1')
use(&param);
volatile int step2 = 0; // DexLabel('s2')
}
int main() {
fun(5);
}
// DexExpectWatchValue('param', '5', from_line=ref('s1'), to_line=ref('s2'))