Skip to content

Commit bb00bc9

Browse files
committed
[lldb, x86] Add test case for 32bit binary on 64bit platform
1 parent 05a3f76 commit bb00bc9

File tree

2 files changed

+44
-0
lines changed

2 files changed

+44
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
void foo(int *x) { *x = 1; }
3+
4+
int main() {
5+
int x = 0;
6+
foo(&x);
7+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# REQUIRES: target-x86_64
2+
# XFAIL: system-windows
3+
4+
# RUN: mkdir -p %t
5+
# RUN: cd %t
6+
# RUN: %clang_host -g -m32 %p/Inputs/32bit-target.c -o dummy.out
7+
# RUN: %lldb -b -s %s dummy.out | FileCheck %s
8+
9+
# CHECK: Current executable set to '{{.*}}dummy.out' (i386).
10+
11+
breakpoint set -n main
12+
# Breakpoint {{[1-9]}}: where = dummy.out`main + 6 at 32bit-target.c:5:6, address = 0x{{[0-9]*}}
13+
14+
breakpoint list
15+
# CHECK: name = 'main', locations = 1
16+
17+
r
18+
# CHECK: * thread #1, name = 'dummy.out', stop reason = breakpoint 1.1
19+
20+
n
21+
# CHECK: * thread #1, name = 'dummy.out', stop reason = step over
22+
23+
p x
24+
# CHECK: 0
25+
26+
n
27+
# CHECK: * thread #1, name = 'dummy.out', stop reason = step over
28+
29+
p x
30+
# CHECK: 1
31+
32+
target delete
33+
# CHECK: 1 targets deleted
34+
35+
target create dummy.out
36+
# CHECK: Current executable set to '{{.*}}dummy.out' (i386).
37+

0 commit comments

Comments
 (0)