Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(263)

Side by Side Diff: src/objects-printer.cc

Issue 2186293002: [gdb] Define print functions used by gdb macros in the top level namespace to make them always be a… (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | tools/gdbinit » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "src/objects.h" 5 #include "src/objects.h"
6 6
7 #include "src/disasm.h" 7 #include "src/disasm.h"
8 #include "src/disassembler.h" 8 #include "src/disassembler.h"
9 #include "src/interpreter/bytecodes.h" 9 #include "src/interpreter/bytecodes.h"
10 #include "src/objects-inl.h" 10 #include "src/objects-inl.h"
(...skipping 1409 matching lines...) Expand 10 before | Expand all | Expand 10 after
1420 void JSObject::PrintTransitions(std::ostream& os) { // NOLINT 1420 void JSObject::PrintTransitions(std::ostream& os) { // NOLINT
1421 Object* transitions = map()->raw_transitions(); 1421 Object* transitions = map()->raw_transitions();
1422 int num_transitions = TransitionArray::NumberOfTransitions(transitions); 1422 int num_transitions = TransitionArray::NumberOfTransitions(transitions);
1423 if (num_transitions == 0) return; 1423 if (num_transitions == 0) return;
1424 os << "\n - transitions"; 1424 os << "\n - transitions";
1425 TransitionArray::PrintTransitions(os, transitions, false); 1425 TransitionArray::PrintTransitions(os, transitions, false);
1426 } 1426 }
1427 #endif // defined(DEBUG) || defined(OBJECT_PRINT) 1427 #endif // defined(DEBUG) || defined(OBJECT_PRINT)
1428 } // namespace internal 1428 } // namespace internal
1429 } // namespace v8 1429 } // namespace v8
1430
1431 //
1432 // The following functions are used by our gdb macros.
1433 //
1434 extern void _v8_internal_Print_Object(void* object) {
1435 reinterpret_cast<i::Object*>(object)->Print();
1436 }
1437
1438 extern void _v8_internal_Print_Code(void* object) {
1439 i::Isolate* isolate = i::Isolate::Current();
1440 isolate->FindCodeObject(reinterpret_cast<i::Address>(object))->Print();
1441 }
1442
1443 extern void _v8_internal_Print_TypeFeedbackVector(void* object) {
1444 if (reinterpret_cast<i::Object*>(object)->IsSmi()) {
1445 printf("Not a type feedback vector\n");
1446 } else {
1447 reinterpret_cast<i::TypeFeedbackVector*>(object)->Print();
1448 }
1449 }
1450
1451 extern void _v8_internal_Print_DescriptorArray(void* object) {
1452 if (reinterpret_cast<i::Object*>(object)->IsSmi()) {
1453 printf("Not a descriptor array\n");
1454 } else {
1455 reinterpret_cast<i::DescriptorArray*>(object)->Print();
1456 }
1457 }
1458
1459 extern void _v8_internal_Print_TransitionArray(void* object) {
1460 if (reinterpret_cast<i::Object*>(object)->IsSmi()) {
1461 printf("Not a transition array\n");
1462 } else {
1463 reinterpret_cast<i::TransitionArray*>(object)->Print();
1464 }
1465 }
1466
1467 extern void _v8_internal_Print_StackTrace() {
1468 i::Isolate* isolate = i::Isolate::Current();
1469 isolate->PrintStack(stdout);
1470 }
OLDNEW
« no previous file with comments | « no previous file | tools/gdbinit » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698