Add gdbinit to tools/ directory.
authorjkummerow@chromium.org <jkummerow@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 7 Jul 2014 16:21:29 +0000 (16:21 +0000)
committerjkummerow@chromium.org <jkummerow@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Mon, 7 Jul 2014 16:21:29 +0000 (16:21 +0000)
Suggested usage: echo "source /path/to/v8/tools/gdbinit" >> ~/.gdbinit

R=mstarzinger@chromium.org

Review URL: https://codereview.chromium.org/375503009

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22252 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

tools/gdbinit [new file with mode: 0644]

diff --git a/tools/gdbinit b/tools/gdbinit
new file mode 100644 (file)
index 0000000..0c99ae1
--- /dev/null
@@ -0,0 +1,33 @@
+# Copyright 2014 the V8 project authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# Print HeapObjects.
+define job
+print ((v8::internal::HeapObject*)($arg0))->Print()
+end
+document job
+Print a v8 JavaScript object
+Usage: job tagged_ptr
+end
+
+# Print Code objects containing given PC.
+define jco
+job (v8::internal::Isolate::Current()->FindCodeObject((v8::internal::Address)$arg0))
+end
+document jco
+Print a v8 Code object from an internal code address
+Usage: jco pc
+end
+
+# Print JavaScript stack trace.
+define jst 
+print v8::internal::Isolate::Current()->PrintStack(stdout)
+end
+document jst
+Print the current JavaScript stack trace
+Usage: jst
+end
+
+set disassembly-flavor intel
+set disable-randomization off