OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 PrintF("UNDERFLOW flag: %d; ", sim_->underflow_vfp_flag_); | 348 PrintF("UNDERFLOW flag: %d; ", sim_->underflow_vfp_flag_); |
349 PrintF("INEXACT flag: %d; ", sim_->inexact_vfp_flag_); | 349 PrintF("INEXACT flag: %d; ", sim_->inexact_vfp_flag_); |
350 } else if (strcmp(cmd, "unstop") == 0) { | 350 } else if (strcmp(cmd, "unstop") == 0) { |
351 intptr_t stop_pc = sim_->get_pc() - Instr::kInstrSize; | 351 intptr_t stop_pc = sim_->get_pc() - Instr::kInstrSize; |
352 Instr* stop_instr = reinterpret_cast<Instr*>(stop_pc); | 352 Instr* stop_instr = reinterpret_cast<Instr*>(stop_pc); |
353 if (stop_instr->ConditionField() == special_condition) { | 353 if (stop_instr->ConditionField() == special_condition) { |
354 stop_instr->SetInstructionBits(kNopInstr); | 354 stop_instr->SetInstructionBits(kNopInstr); |
355 } else { | 355 } else { |
356 PrintF("Not at debugger stop."); | 356 PrintF("Not at debugger stop."); |
357 } | 357 } |
| 358 } else if ((strcmp(cmd, "t") == 0) || strcmp(cmd, "trace") == 0) { |
| 359 ::v8::internal::FLAG_trace_sim = !::v8::internal::FLAG_trace_sim; |
| 360 PrintF("Trace of executed instructions is %s\n", |
| 361 ::v8::internal::FLAG_trace_sim ? "on" : "off"); |
358 } else if ((strcmp(cmd, "h") == 0) || (strcmp(cmd, "help") == 0)) { | 362 } else if ((strcmp(cmd, "h") == 0) || (strcmp(cmd, "help") == 0)) { |
359 PrintF("cont\n"); | 363 PrintF("cont\n"); |
360 PrintF(" continue execution (alias 'c')\n"); | 364 PrintF(" continue execution (alias 'c')\n"); |
361 PrintF("stepi\n"); | 365 PrintF("stepi\n"); |
362 PrintF(" step one instruction (alias 'si')\n"); | 366 PrintF(" step one instruction (alias 'si')\n"); |
363 PrintF("print <register>\n"); | 367 PrintF("print <register>\n"); |
364 PrintF(" print register content (alias 'p')\n"); | 368 PrintF(" print register content (alias 'p')\n"); |
365 PrintF(" use register name 'all' to print all registers\n"); | 369 PrintF(" use register name 'all' to print all registers\n"); |
366 PrintF("printobject <register>\n"); | 370 PrintF("printobject <register>\n"); |
367 PrintF(" print an object from a register (alias 'po')\n"); | 371 PrintF(" print an object from a register (alias 'po')\n"); |
368 PrintF("flags\n"); | 372 PrintF("flags\n"); |
369 PrintF(" print flags\n"); | 373 PrintF(" print flags\n"); |
370 PrintF("disasm [<instructions>]\n"); | 374 PrintF("disasm [<instructions>]\n"); |
371 PrintF("disasm [[<address>] <instructions>]\n"); | 375 PrintF("disasm [[<address>] <instructions>]\n"); |
372 PrintF(" disassemble code, default is 10 instructions from pc\n"); | 376 PrintF(" disassemble code, default is 10 instructions from pc\n"); |
373 PrintF("gdb\n"); | 377 PrintF("gdb\n"); |
374 PrintF(" enter gdb\n"); | 378 PrintF(" enter gdb\n"); |
375 PrintF("break <address>\n"); | 379 PrintF("break <address>\n"); |
376 PrintF(" set a break point on the address\n"); | 380 PrintF(" set a break point on the address\n"); |
377 PrintF("del\n"); | 381 PrintF("del\n"); |
378 PrintF(" delete the breakpoint\n"); | 382 PrintF(" delete the breakpoint\n"); |
379 PrintF("unstop\n"); | 383 PrintF("unstop\n"); |
380 PrintF(" ignore the stop instruction at the current location"); | 384 PrintF(" ignore the stop instruction at the current location"); |
381 PrintF(" from now on\n"); | 385 PrintF(" from now on\n"); |
| 386 PrintF("trace (alias 't')\n"); |
| 387 PrintF(" toogle the tracing of all executed statements"); |
382 } else { | 388 } else { |
383 PrintF("Unknown command: %s\n", cmd); | 389 PrintF("Unknown command: %s\n", cmd); |
384 } | 390 } |
385 } | 391 } |
386 DeleteArray(line); | 392 DeleteArray(line); |
387 } | 393 } |
388 | 394 |
389 // Add all the breakpoints back to stop execution and enter the debugger | 395 // Add all the breakpoints back to stop execution and enter the debugger |
390 // shell when hit. | 396 // shell when hit. |
391 RedoBreakpoints(); | 397 RedoBreakpoints(); |
(...skipping 1868 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2260 uintptr_t* stack_slot = reinterpret_cast<uintptr_t*>(current_sp); | 2266 uintptr_t* stack_slot = reinterpret_cast<uintptr_t*>(current_sp); |
2261 uintptr_t address = *stack_slot; | 2267 uintptr_t address = *stack_slot; |
2262 set_register(sp, current_sp + sizeof(uintptr_t)); | 2268 set_register(sp, current_sp + sizeof(uintptr_t)); |
2263 return address; | 2269 return address; |
2264 } | 2270 } |
2265 | 2271 |
2266 | 2272 |
2267 } } // namespace assembler::arm | 2273 } } // namespace assembler::arm |
2268 | 2274 |
2269 #endif // !defined(__arm__) | 2275 #endif // !defined(__arm__) |
OLD | NEW |