| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <stdarg.h> | 5 #include <stdarg.h> |
| 6 #include <stdlib.h> | 6 #include <stdlib.h> |
| 7 #include <cmath> | 7 #include <cmath> |
| 8 | 8 |
| 9 #include "src/v8.h" | 9 #include "src/v8.h" |
| 10 | 10 |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 PrintF("%s unrecognized\n", arg1); | 335 PrintF("%s unrecognized\n", arg1); |
| 336 } | 336 } |
| 337 } | 337 } |
| 338 } else { | 338 } else { |
| 339 PrintF("print <register>\n"); | 339 PrintF("print <register>\n"); |
| 340 } | 340 } |
| 341 } else if ((strcmp(cmd, "po") == 0) | 341 } else if ((strcmp(cmd, "po") == 0) |
| 342 || (strcmp(cmd, "printobject") == 0)) { | 342 || (strcmp(cmd, "printobject") == 0)) { |
| 343 if (argc == 2) { | 343 if (argc == 2) { |
| 344 int32_t value; | 344 int32_t value; |
| 345 OFStream os(stdout); |
| 345 if (GetValue(arg1, &value)) { | 346 if (GetValue(arg1, &value)) { |
| 346 Object* obj = reinterpret_cast<Object*>(value); | 347 Object* obj = reinterpret_cast<Object*>(value); |
| 347 PrintF("%s: \n", arg1); | 348 os << arg1 << ": \n"; |
| 348 #ifdef DEBUG | 349 #ifdef DEBUG |
| 349 obj->PrintLn(); | 350 obj->Print(os); |
| 351 os << "\n"; |
| 350 #else | 352 #else |
| 351 obj->ShortPrint(); | 353 os << Brief(obj) << "\n"; |
| 352 PrintF("\n"); | |
| 353 #endif | 354 #endif |
| 354 } else { | 355 } else { |
| 355 PrintF("%s unrecognized\n", arg1); | 356 os << arg1 << " unrecognized\n"; |
| 356 } | 357 } |
| 357 } else { | 358 } else { |
| 358 PrintF("printobject <value>\n"); | 359 PrintF("printobject <value>\n"); |
| 359 } | 360 } |
| 360 } else if (strcmp(cmd, "stack") == 0 || strcmp(cmd, "mem") == 0) { | 361 } else if (strcmp(cmd, "stack") == 0 || strcmp(cmd, "mem") == 0) { |
| 361 int32_t* cur = NULL; | 362 int32_t* cur = NULL; |
| 362 int32_t* end = NULL; | 363 int32_t* end = NULL; |
| 363 int next_arg = 1; | 364 int next_arg = 1; |
| 364 | 365 |
| 365 if (strcmp(cmd, "stack") == 0) { | 366 if (strcmp(cmd, "stack") == 0) { |
| (...skipping 3463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3829 uintptr_t address = *stack_slot; | 3830 uintptr_t address = *stack_slot; |
| 3830 set_register(sp, current_sp + sizeof(uintptr_t)); | 3831 set_register(sp, current_sp + sizeof(uintptr_t)); |
| 3831 return address; | 3832 return address; |
| 3832 } | 3833 } |
| 3833 | 3834 |
| 3834 } } // namespace v8::internal | 3835 } } // namespace v8::internal |
| 3835 | 3836 |
| 3836 #endif // USE_SIMULATOR | 3837 #endif // USE_SIMULATOR |
| 3837 | 3838 |
| 3838 #endif // V8_TARGET_ARCH_ARM | 3839 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |