1b8021494Sopenharmony_ci// Copyright 2023, VIXL authors 2b8021494Sopenharmony_ci// All rights reserved. 3b8021494Sopenharmony_ci// 4b8021494Sopenharmony_ci// Redistribution and use in source and binary forms, with or without 5b8021494Sopenharmony_ci// modification, are permitted provided that the following conditions are met: 6b8021494Sopenharmony_ci// 7b8021494Sopenharmony_ci// * Redistributions of source code must retain the above copyright notice, 8b8021494Sopenharmony_ci// this list of conditions and the following disclaimer. 9b8021494Sopenharmony_ci// * Redistributions in binary form must reproduce the above copyright notice, 10b8021494Sopenharmony_ci// this list of conditions and the following disclaimer in the documentation 11b8021494Sopenharmony_ci// and/or other materials provided with the distribution. 12b8021494Sopenharmony_ci// * Neither the name of ARM Limited nor the names of its contributors may be 13b8021494Sopenharmony_ci// used to endorse or promote products derived from this software without 14b8021494Sopenharmony_ci// specific prior written permission. 15b8021494Sopenharmony_ci// 16b8021494Sopenharmony_ci// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS CONTRIBUTORS "AS IS" AND 17b8021494Sopenharmony_ci// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18b8021494Sopenharmony_ci// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19b8021494Sopenharmony_ci// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE 20b8021494Sopenharmony_ci// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21b8021494Sopenharmony_ci// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 22b8021494Sopenharmony_ci// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 23b8021494Sopenharmony_ci// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 24b8021494Sopenharmony_ci// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25b8021494Sopenharmony_ci// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26b8021494Sopenharmony_ci 27b8021494Sopenharmony_ci#include "test-debugger-aarch64.h" 28b8021494Sopenharmony_ci 29b8021494Sopenharmony_cinamespace vixl { 30b8021494Sopenharmony_cinamespace aarch64 { 31b8021494Sopenharmony_ci 32b8021494Sopenharmony_ci#ifdef VIXL_INCLUDE_SIMULATOR_AARCH64 33b8021494Sopenharmony_ci// The debugger is only available to be tested in simulator builds. 34b8021494Sopenharmony_ci 35b8021494Sopenharmony_ciTEST(breakpoints_invalid) { 36b8021494Sopenharmony_ci SETUP(); 37b8021494Sopenharmony_ci 38b8021494Sopenharmony_ci // Test invalid strings instead of numbers. 39b8021494Sopenharmony_ci SETUP_CMD("break a", "Error: Use `break <address>` to set a breakpoint"); 40b8021494Sopenharmony_ci SETUP_CMD("break abcdef", "Error: Use `break <address>` to set a breakpoint"); 41b8021494Sopenharmony_ci SETUP_CMD("break A", "Error: Use `break <address>` to set a breakpoint"); 42b8021494Sopenharmony_ci SETUP_CMD("break ABCDEF", "Error: Use `break <address>` to set a breakpoint"); 43b8021494Sopenharmony_ci SETUP_CMD("break 0x", "Error: Use `break <address>` to set a breakpoint"); 44b8021494Sopenharmony_ci SETUP_CMD("break 0xg", "Error: Use `break <address>` to set a breakpoint"); 45b8021494Sopenharmony_ci 46b8021494Sopenharmony_ci // Test different amounts of parameters. 47b8021494Sopenharmony_ci SETUP_CMD("break", "Error: Use `break <address>` to set a breakpoint"); 48b8021494Sopenharmony_ci SETUP_CMD("break 42 52", "Error: Use `break <address>` to set a breakpoint"); 49b8021494Sopenharmony_ci 50b8021494Sopenharmony_ci // Test out of range addresses. 51b8021494Sopenharmony_ci SETUP_CMD("break 0xFFFFFFFFFFFFFFFF1", 52b8021494Sopenharmony_ci "Error: Use `break <address>` to set a breakpoint"); 53b8021494Sopenharmony_ci SETUP_CMD("break 18446744073709551616", 54b8021494Sopenharmony_ci "Error: Use `break <address>` to set a breakpoint"); 55b8021494Sopenharmony_ci 56b8021494Sopenharmony_ci // Continue to exit the debugger. 57b8021494Sopenharmony_ci SETUP_CMD("continue", "Continuing..."); 58b8021494Sopenharmony_ci RUN(); 59b8021494Sopenharmony_ci 60b8021494Sopenharmony_ci CHECK_OUTPUT(); 61b8021494Sopenharmony_ci} 62b8021494Sopenharmony_ci 63b8021494Sopenharmony_ciTEST(breakpoints_valid) { 64b8021494Sopenharmony_ci SETUP(); 65b8021494Sopenharmony_ci 66b8021494Sopenharmony_ci // Test bottom boundary of addresses. 67b8021494Sopenharmony_ci SETUP_CMD("break 0x0", "Breakpoint successfully added at: 0x0"); 68b8021494Sopenharmony_ci SETUP_CMD("break 0", "Breakpoint successfully removed at: 0x0"); 69b8021494Sopenharmony_ci SETUP_CMD("break 0x1", "Breakpoint successfully added at: 0x1"); 70b8021494Sopenharmony_ci SETUP_CMD("break 1", "Breakpoint successfully removed at: 0x1"); 71b8021494Sopenharmony_ci 72b8021494Sopenharmony_ci // Test top boundary of addresses. 73b8021494Sopenharmony_ci SETUP_CMD("break 0xFFFFFFFFFFFFFFFF", 74b8021494Sopenharmony_ci "Breakpoint successfully added at: 0xffffffffffffffff"); 75b8021494Sopenharmony_ci SETUP_CMD("break 18446744073709551615", 76b8021494Sopenharmony_ci "Breakpoint successfully removed at: 0xffffffffffffffff"); 77b8021494Sopenharmony_ci 78b8021494Sopenharmony_ci // Continue to exit the debugger. 79b8021494Sopenharmony_ci SETUP_CMD("continue", "Continuing..."); 80b8021494Sopenharmony_ci RUN(); 81b8021494Sopenharmony_ci 82b8021494Sopenharmony_ci CHECK_OUTPUT(); 83b8021494Sopenharmony_ci} 84b8021494Sopenharmony_ci 85b8021494Sopenharmony_ciTEST(breakpoints_hit) { 86b8021494Sopenharmony_ci SETUP(); 87b8021494Sopenharmony_ci 88b8021494Sopenharmony_ci // Test hitting a breakpoint. 89b8021494Sopenharmony_ci std::string mov_addr = GET_INSTRUCTION_ADDRESS("mov x2, #0x2"); 90b8021494Sopenharmony_ci std::string break_cmd = "break "; 91b8021494Sopenharmony_ci break_cmd += mov_addr; 92b8021494Sopenharmony_ci std::string expected_trace = "Breakpoint successfully added at: "; 93b8021494Sopenharmony_ci expected_trace += mov_addr; 94b8021494Sopenharmony_ci SETUP_CMD(break_cmd, expected_trace); 95b8021494Sopenharmony_ci SETUP_CMD("continue", 96b8021494Sopenharmony_ci "Continuing...\n" 97b8021494Sopenharmony_ci "Debugger hit breakpoint, breaking..."); 98b8021494Sopenharmony_ci 99b8021494Sopenharmony_ci // Continue to exit the debugger. 100b8021494Sopenharmony_ci SETUP_CMD("continue", "Continuing..."); 101b8021494Sopenharmony_ci RUN(); 102b8021494Sopenharmony_ci 103b8021494Sopenharmony_ci CHECK_OUTPUT(); 104b8021494Sopenharmony_ci} 105b8021494Sopenharmony_ci 106b8021494Sopenharmony_ciTEST(cmd_aliases) { 107b8021494Sopenharmony_ci SETUP(); 108b8021494Sopenharmony_ci 109b8021494Sopenharmony_ci // Test all short form commands, to ensure they correctly run their long form 110b8021494Sopenharmony_ci // counterparts. 111b8021494Sopenharmony_ci SETUP_CMD("b", "Error: Use `break <address>` to set a breakpoint"); 112b8021494Sopenharmony_ci SETUP_CMD("s x", 113b8021494Sopenharmony_ci "Error: use `step \\[number\\]` to step an optional number of" 114b8021494Sopenharmony_ci " instructions"); 115b8021494Sopenharmony_ci SETUP_CMD("p", 116b8021494Sopenharmony_ci "Error: use `print <register|all>` to print the contents of a" 117b8021494Sopenharmony_ci " specific register or all registers."); 118b8021494Sopenharmony_ci SETUP_CMD("t 1", "Error: use `trace` to toggle tracing of registers."); 119b8021494Sopenharmony_ci SETUP_CMD("g 1", 120b8021494Sopenharmony_ci "Error: use `gdb` to enter GDB from the simulator debugger."); 121b8021494Sopenharmony_ci 122b8021494Sopenharmony_ci // Continue to exit the debugger. 123b8021494Sopenharmony_ci SETUP_CMD("c", "Continuing..."); 124b8021494Sopenharmony_ci RUN(); 125b8021494Sopenharmony_ci 126b8021494Sopenharmony_ci CHECK_OUTPUT(); 127b8021494Sopenharmony_ci} 128b8021494Sopenharmony_ci 129b8021494Sopenharmony_ciTEST(stepping_single) { 130b8021494Sopenharmony_ci SETUP(); 131b8021494Sopenharmony_ci 132b8021494Sopenharmony_ci // Test single stepping through the whole program. 133b8021494Sopenharmony_ci SETUP_CMD("step", ".*mov x2, #0x2"); 134b8021494Sopenharmony_ci SETUP_CMD("step", ".*sub x3, x1, x2"); 135b8021494Sopenharmony_ci SETUP_CMD("step", ".*ret"); 136b8021494Sopenharmony_ci SETUP_CMD("step", 137b8021494Sopenharmony_ci ".*Debugger at the end of simulation, leaving simulator..."); 138b8021494Sopenharmony_ci 139b8021494Sopenharmony_ci RUN(); 140b8021494Sopenharmony_ci 141b8021494Sopenharmony_ci CHECK_OUTPUT(); 142b8021494Sopenharmony_ci} 143b8021494Sopenharmony_ci 144b8021494Sopenharmony_ciTEST(stepping_single_and_continue) { 145b8021494Sopenharmony_ci SETUP(); 146b8021494Sopenharmony_ci 147b8021494Sopenharmony_ci // Test single stepping and then continuing. 148b8021494Sopenharmony_ci SETUP_CMD("step", ".*mov x2, #0x2"); 149b8021494Sopenharmony_ci SETUP_CMD("continue", "Continuing..."); 150b8021494Sopenharmony_ci 151b8021494Sopenharmony_ci RUN(); 152b8021494Sopenharmony_ci 153b8021494Sopenharmony_ci CHECK_OUTPUT(); 154b8021494Sopenharmony_ci} 155b8021494Sopenharmony_ci 156b8021494Sopenharmony_ciTEST(stepping_multi_1) { 157b8021494Sopenharmony_ci SETUP(); 158b8021494Sopenharmony_ci 159b8021494Sopenharmony_ci // Test multi stepping a single instruction. 160b8021494Sopenharmony_ci SETUP_CMD("step 1", ".*mov x2, #0x2"); 161b8021494Sopenharmony_ci 162b8021494Sopenharmony_ci // Continue to exit the debugger. 163b8021494Sopenharmony_ci SETUP_CMD("continue", "Continuing..."); 164b8021494Sopenharmony_ci RUN(); 165b8021494Sopenharmony_ci 166b8021494Sopenharmony_ci CHECK_OUTPUT(); 167b8021494Sopenharmony_ci} 168b8021494Sopenharmony_ci 169b8021494Sopenharmony_ciTEST(stepping_multi_2) { 170b8021494Sopenharmony_ci SETUP(); 171b8021494Sopenharmony_ci 172b8021494Sopenharmony_ci // Test multi stepping two instructions. 173b8021494Sopenharmony_ci SETUP_CMD("step 2", 174b8021494Sopenharmony_ci ".*mov x2, #0x2\n" 175b8021494Sopenharmony_ci ".*sub x3, x1, x2"); 176b8021494Sopenharmony_ci 177b8021494Sopenharmony_ci // Continue to exit the debugger. 178b8021494Sopenharmony_ci SETUP_CMD("continue", "Continuing..."); 179b8021494Sopenharmony_ci RUN(); 180b8021494Sopenharmony_ci 181b8021494Sopenharmony_ci CHECK_OUTPUT(); 182b8021494Sopenharmony_ci} 183b8021494Sopenharmony_ci 184b8021494Sopenharmony_ciTEST(stepping_multi_3) { 185b8021494Sopenharmony_ci SETUP(); 186b8021494Sopenharmony_ci 187b8021494Sopenharmony_ci // Test multi stepping three instructions. 188b8021494Sopenharmony_ci SETUP_CMD("step 3", 189b8021494Sopenharmony_ci ".*mov x2, #0x2\n" 190b8021494Sopenharmony_ci ".*sub x3, x1, x2\n" 191b8021494Sopenharmony_ci ".*ret"); 192b8021494Sopenharmony_ci 193b8021494Sopenharmony_ci // Continue to exit the debugger. 194b8021494Sopenharmony_ci SETUP_CMD("continue", "Continuing..."); 195b8021494Sopenharmony_ci RUN(); 196b8021494Sopenharmony_ci 197b8021494Sopenharmony_ci CHECK_OUTPUT(); 198b8021494Sopenharmony_ci} 199b8021494Sopenharmony_ci 200b8021494Sopenharmony_ciTEST(stepping_multi_4) { 201b8021494Sopenharmony_ci SETUP(); 202b8021494Sopenharmony_ci 203b8021494Sopenharmony_ci // Test stepping through the whole program in one go. 204b8021494Sopenharmony_ci SETUP_CMD("step 4", 205b8021494Sopenharmony_ci ".*mov x2, #0x2\n" 206b8021494Sopenharmony_ci ".*sub x3, x1, x2\n" 207b8021494Sopenharmony_ci ".*ret\n" 208b8021494Sopenharmony_ci "Debugger at the end of simulation, leaving simulator..."); 209b8021494Sopenharmony_ci 210b8021494Sopenharmony_ci RUN(); 211b8021494Sopenharmony_ci 212b8021494Sopenharmony_ci CHECK_OUTPUT(); 213b8021494Sopenharmony_ci} 214b8021494Sopenharmony_ci 215b8021494Sopenharmony_ciTEST(stepping_multi_5) { 216b8021494Sopenharmony_ci SETUP(); 217b8021494Sopenharmony_ci 218b8021494Sopenharmony_ci // Test multi stepping past the end of the program. 219b8021494Sopenharmony_ci SETUP_CMD("step 5", 220b8021494Sopenharmony_ci ".*mov x2, #0x2\n" 221b8021494Sopenharmony_ci ".*sub x3, x1, x2\n" 222b8021494Sopenharmony_ci ".*ret\n" 223b8021494Sopenharmony_ci "Debugger at the end of simulation, leaving simulator..."); 224b8021494Sopenharmony_ci 225b8021494Sopenharmony_ci RUN(); 226b8021494Sopenharmony_ci 227b8021494Sopenharmony_ci CHECK_OUTPUT(); 228b8021494Sopenharmony_ci} 229b8021494Sopenharmony_ci 230b8021494Sopenharmony_ciTEST(stepping_invalid) { 231b8021494Sopenharmony_ci SETUP(); 232b8021494Sopenharmony_ci 233b8021494Sopenharmony_ci // Test invalid arguments to step command. 234b8021494Sopenharmony_ci SETUP_CMD("step 1 2", 235b8021494Sopenharmony_ci "Error: use `step \\[number\\]` to step an optional number of" 236b8021494Sopenharmony_ci " instructions"); 237b8021494Sopenharmony_ci 238b8021494Sopenharmony_ci // Continue to exit the debugger. 239b8021494Sopenharmony_ci SETUP_CMD("continue", "Continuing..."); 240b8021494Sopenharmony_ci RUN(); 241b8021494Sopenharmony_ci 242b8021494Sopenharmony_ci CHECK_OUTPUT(); 243b8021494Sopenharmony_ci} 244b8021494Sopenharmony_ci 245b8021494Sopenharmony_ciTEST(print_invalid) { 246b8021494Sopenharmony_ci SETUP(); 247b8021494Sopenharmony_ci 248b8021494Sopenharmony_ci // Test invalid amounts of arguments to the print command. 249b8021494Sopenharmony_ci SETUP_CMD("print", 250b8021494Sopenharmony_ci "Error: use `print <register|all>` to print the contents of a" 251b8021494Sopenharmony_ci " specific register or all registers."); 252b8021494Sopenharmony_ci SETUP_CMD("print all all", 253b8021494Sopenharmony_ci "Error: use `print <register|all>` to print the contents of a" 254b8021494Sopenharmony_ci " specific register or all registers."); 255b8021494Sopenharmony_ci 256b8021494Sopenharmony_ci // Test invalid types of registers. 257b8021494Sopenharmony_ci SETUP_CMD("print alls", 258b8021494Sopenharmony_ci "Error: incorrect register format, use e.g: X0, x0, etc..."); 259b8021494Sopenharmony_ci SETUP_CMD("print a", 260b8021494Sopenharmony_ci "Error: incorrect register format, use e.g: X0, x0, etc..."); 261b8021494Sopenharmony_ci SETUP_CMD("print x", 262b8021494Sopenharmony_ci "Error: incorrect register format, use e.g: X0, x0, etc..."); 263b8021494Sopenharmony_ci SETUP_CMD("print 0", 264b8021494Sopenharmony_ci "Error: incorrect register format, use e.g: X0, x0, etc..."); 265b8021494Sopenharmony_ci 266b8021494Sopenharmony_ci // Test registers that don't exist on AARCH64. 267b8021494Sopenharmony_ci SETUP_CMD("print w32", 268b8021494Sopenharmony_ci "Error: incorrect register format, use e.g: X0, x0, etc..."); 269b8021494Sopenharmony_ci SETUP_CMD("print W32", 270b8021494Sopenharmony_ci "Error: incorrect register format, use e.g: X0, x0, etc..."); 271b8021494Sopenharmony_ci SETUP_CMD("print x32", 272b8021494Sopenharmony_ci "Error: incorrect register format, use e.g: X0, x0, etc..."); 273b8021494Sopenharmony_ci SETUP_CMD("print X32", 274b8021494Sopenharmony_ci "Error: incorrect register format, use e.g: X0, x0, etc..."); 275b8021494Sopenharmony_ci SETUP_CMD("print v32", 276b8021494Sopenharmony_ci "Error: incorrect register format, use e.g: X0, x0, etc..."); 277b8021494Sopenharmony_ci SETUP_CMD("print V32", 278b8021494Sopenharmony_ci "Error: incorrect register format, use e.g: X0, x0, etc..."); 279b8021494Sopenharmony_ci 280b8021494Sopenharmony_ci // Continue to exit the debugger. 281b8021494Sopenharmony_ci SETUP_CMD("continue", "Continuing..."); 282b8021494Sopenharmony_ci RUN(); 283b8021494Sopenharmony_ci 284b8021494Sopenharmony_ci CHECK_OUTPUT(); 285b8021494Sopenharmony_ci} 286b8021494Sopenharmony_ci 287b8021494Sopenharmony_ciTEST(trace_invalid) { 288b8021494Sopenharmony_ci SETUP(); 289b8021494Sopenharmony_ci 290b8021494Sopenharmony_ci // Test invalid arguments to trace command. 291b8021494Sopenharmony_ci SETUP_CMD("trace 1 2", "Error: use `trace` to toggle tracing of registers."); 292b8021494Sopenharmony_ci 293b8021494Sopenharmony_ci // Continue to exit the debugger. 294b8021494Sopenharmony_ci SETUP_CMD("continue", "Continuing..."); 295b8021494Sopenharmony_ci RUN(); 296b8021494Sopenharmony_ci 297b8021494Sopenharmony_ci CHECK_OUTPUT(); 298b8021494Sopenharmony_ci} 299b8021494Sopenharmony_ci 300b8021494Sopenharmony_ciTEST(trace_toggling) { 301b8021494Sopenharmony_ci SETUP(); 302b8021494Sopenharmony_ci 303b8021494Sopenharmony_ci // Test toggling tracing. 304b8021494Sopenharmony_ci SETUP_CMD("trace", 305b8021494Sopenharmony_ci "Enabling disassembly, registers and memory write tracing"); 306b8021494Sopenharmony_ci SETUP_CMD("trace", 307b8021494Sopenharmony_ci "Disabling disassembly, registers and memory write tracing"); 308b8021494Sopenharmony_ci SETUP_CMD("trace", 309b8021494Sopenharmony_ci "Enabling disassembly, registers and memory write tracing"); 310b8021494Sopenharmony_ci SETUP_CMD("trace", 311b8021494Sopenharmony_ci "Disabling disassembly, registers and memory write tracing"); 312b8021494Sopenharmony_ci 313b8021494Sopenharmony_ci // Continue to exit the debugger. 314b8021494Sopenharmony_ci SETUP_CMD("continue", "Continuing..."); 315b8021494Sopenharmony_ci RUN(); 316b8021494Sopenharmony_ci 317b8021494Sopenharmony_ci CHECK_OUTPUT(); 318b8021494Sopenharmony_ci} 319b8021494Sopenharmony_ci 320b8021494Sopenharmony_ciTEST(trace_full) { 321b8021494Sopenharmony_ci SETUP(); 322b8021494Sopenharmony_ci 323b8021494Sopenharmony_ci // Test tracing the whole program. 324b8021494Sopenharmony_ci SETUP_CMD("trace", 325b8021494Sopenharmony_ci "Enabling disassembly, registers and memory write tracing"); 326b8021494Sopenharmony_ci 327b8021494Sopenharmony_ci std::string expected_trace = "Continuing...\n"; 328b8021494Sopenharmony_ci expected_trace += ".*add x1, x0, #0x5 \\(5\\)\n"; 329b8021494Sopenharmony_ci expected_trace += "(" + x_register_trace + "\\n){32}"; 330b8021494Sopenharmony_ci expected_trace += "(" + v_register_trace + "\\n){32}"; 331b8021494Sopenharmony_ci expected_trace += ".*mov x2, #0x2\n"; 332b8021494Sopenharmony_ci expected_trace += x_register_trace + "\n"; 333b8021494Sopenharmony_ci expected_trace += ".*sub x3, x1, x2\n"; 334b8021494Sopenharmony_ci expected_trace += x_register_trace + "\n"; 335b8021494Sopenharmony_ci expected_trace += ".*ret\n"; 336b8021494Sopenharmony_ci expected_trace += "# Branch to 0x0000000000000000."; 337b8021494Sopenharmony_ci SETUP_CMD("continue", expected_trace); 338b8021494Sopenharmony_ci 339b8021494Sopenharmony_ci RUN(); 340b8021494Sopenharmony_ci 341b8021494Sopenharmony_ci CHECK_OUTPUT(); 342b8021494Sopenharmony_ci} 343b8021494Sopenharmony_ci 344b8021494Sopenharmony_ciTEST(trace_partial) { 345b8021494Sopenharmony_ci SETUP(); 346b8021494Sopenharmony_ci 347b8021494Sopenharmony_ci // Test tracing a single line. 348b8021494Sopenharmony_ci SETUP_CMD("trace", 349b8021494Sopenharmony_ci "Enabling disassembly, registers and memory write tracing"); 350b8021494Sopenharmony_ci 351b8021494Sopenharmony_ci std::string expected_trace = ".*add x1, x0, #0x5 \\(5\\)\n"; 352b8021494Sopenharmony_ci expected_trace += "(" + x_register_trace + "\\n){32}"; 353b8021494Sopenharmony_ci expected_trace += "(" + v_register_trace + "\\n){32}"; 354b8021494Sopenharmony_ci expected_trace += ".*mov x2, #0x2\n"; 355b8021494Sopenharmony_ci SETUP_CMD("step", expected_trace); 356b8021494Sopenharmony_ci SETUP_CMD("trace", 357b8021494Sopenharmony_ci "Disabling disassembly, registers and memory write tracing"); 358b8021494Sopenharmony_ci SETUP_CMD("continue", "Continuing...\n"); 359b8021494Sopenharmony_ci 360b8021494Sopenharmony_ci RUN(); 361b8021494Sopenharmony_ci 362b8021494Sopenharmony_ci CHECK_OUTPUT(); 363b8021494Sopenharmony_ci} 364b8021494Sopenharmony_ci 365b8021494Sopenharmony_ci#endif // VIXL_INCLUDE_SIMULATOR_AARCH64 366b8021494Sopenharmony_ci 367b8021494Sopenharmony_ci} // namespace aarch64 368b8021494Sopenharmony_ci} // namespace vixl 369