You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lldb/test/Shell/Expr/TestProcessModificationIdOnExpr.cpp
+30-12
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
// Tests that ProcessModID.m_memory_id is not bumped when evaluating expressions without side effects.
2
2
3
-
// REQUIRES: target-windows && target-x86
4
-
// Due to different implementations exact numbers (m_stop_id) are different on different OSs. So we lock this test to specific platform (Windows). It is limited to x86 because on x86, running get()
// Due to different implementations exact numbers (m_stop_id) are different on different OSs. So we lock this test to specific platform (Windows). It is limited to x86/x64 because on x86/x64, running get()
5
5
// requires that we write the return address to the stack, this does not happen on AArch64.
6
6
7
7
// RUN: %build %s -o %t
@@ -11,10 +11,13 @@
11
11
// RUN: -o "process status -d" \
12
12
// RUN: -o "expr x.i != 42" \
13
13
// RUN: -o "process status -d" \
14
+
// RUN: -o "process status -d" \
14
15
// RUN: -o "expr x.get()" \
15
16
// RUN: -o "process status -d" \
17
+
// RUN: -o "process status -d" \
16
18
// RUN: -o "expr x.i = 10" \
17
19
// RUN: -o "process status -d" \
20
+
// RUN: -o "process status -d" \
18
21
// RUN: -o "continue" \
19
22
// RUN: -o "process status -d" \
20
23
// RUN: -o "exit" | FileCheck %s -dump-input=fail
@@ -36,34 +39,49 @@ int main() {
36
39
}
37
40
38
41
// CHECK-LABEL: process status -d
39
-
// CHECK: m_stop_id: 2
40
-
// CHECK: m_memory_id: 0
42
+
// CHECK: m_stop_id: [[#STOP_ID:]]
43
+
// CHECK: m_memory_id: [[#MEMORY_ID:]]
41
44
42
45
// CHECK-LABEL: expr x.i != 42
43
46
// IDs are not changed when executing simple expressions
44
47
45
48
// CHECK-LABEL: process status -d
46
-
// CHECK: m_stop_id: 2
47
-
// CHECK: m_memory_id: 0
49
+
// CHECK: m_stop_id: [[#STOP_ID]]
50
+
// CHECK: m_memory_id: [[#MEMORY_ID]]
51
+
52
+
// CHECK-LABEL: process status -d
53
+
// Remember new values
54
+
// CHECK: m_stop_id: [[#STOP_ID:]]
55
+
// CHECK: m_memory_id: [[#MEMORY_ID:]]
48
56
49
57
// CHECK-LABEL: expr x.get()
50
58
// Expression causes ID to be bumped because LLDB has to execute function and in doing
51
59
// so must write the return address to the stack.
52
60
53
61
// CHECK-LABEL: process status -d
54
-
// CHECK: m_stop_id: 3
55
-
// CHECK: m_memory_id: 1
62
+
// CHECK-NOT: m_stop_id: [[#STOP_ID]]
63
+
// CHECK-NOT: m_memory_id: [[#MEMORY_ID]]
64
+
65
+
// CHECK-LABEL: process status -d
66
+
// Remember new values
67
+
// CHECK: m_stop_id: [[#STOP_ID:]]
68
+
// CHECK: m_memory_id: [[#MEMORY_ID:]]
56
69
57
70
// CHECK-LABEL: expr x.i = 10
58
71
// Expression causes MemoryID to be bumped because LLDB writes to non-cache memory
59
72
60
73
// CHECK-LABEL: process status -d
61
-
// CHECK: m_stop_id: 3
62
-
// CHECK: m_memory_id: 2
74
+
// CHECK: m_stop_id: [[#STOP_ID]]
75
+
// CHECK-NOT: m_memory_id: [[#MEMORY_ID]]
76
+
77
+
// CHECK-LABEL: process status -d
78
+
// Remember new values
79
+
// CHECK: m_stop_id: [[#STOP_ID:]]
80
+
// CHECK: m_memory_id: [[#MEMORY_ID:]]
63
81
64
82
// CHECK-LABEL: continue
65
83
// Continue causes StopID to be bumped because process is resumed
0 commit comments