Skip to content

Commit 3b76b86

Browse files
committed
Add debug prints to diagnose a crash on arm-ubuntu bot
1 parent 5a8f290 commit 3b76b86

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lldb/unittests/Breakpoint/WatchpointAlgorithmsTests.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,15 +77,18 @@ TEST(WatchpointAlgorithmsTests, PowerOf2Watchpoints) {
7777
},
7878
};
7979
// clang-format on
80+
printf("Running doubleword max test cases\n");
8081
for (testcase test : doubleword_max) {
8182
addr_t user_addr = test.user.addr;
8283
size_t user_size = test.user.size;
8384
size_t min_byte_size = 1;
8485
size_t max_byte_size = 8;
8586
size_t address_byte_size = 8;
87+
printf("Calling with addr 0x%llx size %zu\n", user_addr, user_size);
8688
auto result = WatchpointAlgorithmsTest::PowerOf2Watchpoints(
8789
user_addr, user_size, min_byte_size, max_byte_size, address_byte_size);
8890

91+
printf("Checking returned values\n");
8992
check_testcase(test, result, min_byte_size, max_byte_size,
9093
address_byte_size);
9194
}
@@ -102,15 +105,18 @@ TEST(WatchpointAlgorithmsTests, PowerOf2Watchpoints) {
102105
},
103106
};
104107
// clang-format on
108+
printf("Running word max test cases\n");
105109
for (testcase test : word_max) {
106110
addr_t user_addr = test.user.addr;
107111
size_t user_size = test.user.size;
108112
size_t min_byte_size = 1;
109113
size_t max_byte_size = 4;
110114
size_t address_byte_size = 4;
115+
printf("Calling with addr 0x%llx size %zu\n", user_addr, user_size);
111116
auto result = WatchpointAlgorithmsTest::PowerOf2Watchpoints(
112117
user_addr, user_size, min_byte_size, max_byte_size, address_byte_size);
113118

119+
printf("Checking returned values\n");
114120
check_testcase(test, result, min_byte_size, max_byte_size,
115121
address_byte_size);
116122
}
@@ -158,15 +164,18 @@ TEST(WatchpointAlgorithmsTests, PowerOf2Watchpoints) {
158164
},
159165
};
160166
// clang-format on
167+
printf("Running word twogig test cases\n");
161168
for (testcase test : twogig_max) {
162169
addr_t user_addr = test.user.addr;
163170
size_t user_size = test.user.size;
164171
size_t min_byte_size = 1;
165172
size_t max_byte_size = INT32_MAX;
166173
size_t address_byte_size = 8;
174+
printf("Calling with addr 0x%llx size %zu\n", user_addr, user_size);
167175
auto result = WatchpointAlgorithmsTest::PowerOf2Watchpoints(
168176
user_addr, user_size, min_byte_size, max_byte_size, address_byte_size);
169177

178+
printf("Checking returned values\n");
170179
check_testcase(test, result, min_byte_size, max_byte_size,
171180
address_byte_size);
172181
}

0 commit comments

Comments
 (0)