| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 <stdlib.h> | 5 #include <stdlib.h> |
| 6 #include <cmath> | 6 #include <cmath> |
| 7 #include <cstdarg> | 7 #include <cstdarg> |
| 8 #include "src/v8.h" | 8 #include "src/v8.h" |
| 9 | 9 |
| 10 #if V8_TARGET_ARCH_ARM64 | 10 #if V8_TARGET_ARCH_ARM64 |
| (...skipping 3326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3337 " Print the content of a register. (alias 'p')\n" | 3337 " Print the content of a register. (alias 'p')\n" |
| 3338 " 'print all' will print all registers.\n" | 3338 " 'print all' will print all registers.\n" |
| 3339 " Use 'printobject' to get more details about the value.\n"); | 3339 " Use 'printobject' to get more details about the value.\n"); |
| 3340 } | 3340 } |
| 3341 | 3341 |
| 3342 // printobject / po ------------------------------------------------------ | 3342 // printobject / po ------------------------------------------------------ |
| 3343 } else if ((strcmp(cmd, "printobject") == 0) || | 3343 } else if ((strcmp(cmd, "printobject") == 0) || |
| 3344 (strcmp(cmd, "po") == 0)) { | 3344 (strcmp(cmd, "po") == 0)) { |
| 3345 if (argc == 2) { | 3345 if (argc == 2) { |
| 3346 int64_t value; | 3346 int64_t value; |
| 3347 OFStream os(stdout); |
| 3347 if (GetValue(arg1, &value)) { | 3348 if (GetValue(arg1, &value)) { |
| 3348 Object* obj = reinterpret_cast<Object*>(value); | 3349 Object* obj = reinterpret_cast<Object*>(value); |
| 3349 PrintF("%s: \n", arg1); | 3350 os << arg1 << ": \n"; |
| 3350 #ifdef DEBUG | 3351 #ifdef DEBUG |
| 3351 obj->PrintLn(); | 3352 obj->Print(os); |
| 3353 os << "\n"; |
| 3352 #else | 3354 #else |
| 3353 obj->ShortPrint(); | 3355 os << Brief(obj) << "\n"; |
| 3354 PrintF("\n"); | |
| 3355 #endif | 3356 #endif |
| 3356 } else { | 3357 } else { |
| 3357 PrintF("%s unrecognized\n", arg1); | 3358 os << arg1 << " unrecognized\n"; |
| 3358 } | 3359 } |
| 3359 } else { | 3360 } else { |
| 3360 PrintF("printobject <value>\n" | 3361 PrintF("printobject <value>\n" |
| 3361 "printobject <register>\n" | 3362 "printobject <register>\n" |
| 3362 " Print details about the value. (alias 'po')\n"); | 3363 " Print details about the value. (alias 'po')\n"); |
| 3363 } | 3364 } |
| 3364 | 3365 |
| 3365 // stack / mem ---------------------------------------------------------- | 3366 // stack / mem ---------------------------------------------------------- |
| 3366 } else if (strcmp(cmd, "stack") == 0 || strcmp(cmd, "mem") == 0) { | 3367 } else if (strcmp(cmd, "stack") == 0 || strcmp(cmd, "mem") == 0) { |
| 3367 int64_t* cur = NULL; | 3368 int64_t* cur = NULL; |
| (...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3727 | 3728 |
| 3728 delete[] format; | 3729 delete[] format; |
| 3729 } | 3730 } |
| 3730 | 3731 |
| 3731 | 3732 |
| 3732 #endif // USE_SIMULATOR | 3733 #endif // USE_SIMULATOR |
| 3733 | 3734 |
| 3734 } } // namespace v8::internal | 3735 } } // namespace v8::internal |
| 3735 | 3736 |
| 3736 #endif // V8_TARGET_ARCH_ARM64 | 3737 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |