diff options
Diffstat (limited to 'deps/v8/tools/gdbinit')
-rw-r--r-- | deps/v8/tools/gdbinit | 44 |
1 files changed, 10 insertions, 34 deletions
diff --git a/deps/v8/tools/gdbinit b/deps/v8/tools/gdbinit index a91554c3fa..ad7847df31 100644 --- a/deps/v8/tools/gdbinit +++ b/deps/v8/tools/gdbinit @@ -65,6 +65,15 @@ Print the current JavaScript stack trace Usage: jst end +# Print TurboFan graph node. +define pn +call _v8_internal_Node_Print((void*)($arg0)) +end +document pn +Print a v8 TurboFan graph node +Usage: pn node_address +end + # Skip the JavaScript stack. define jss set $js_entry_sp=v8::internal::Isolate::Current()->thread_local_top()->js_entry_sp_ @@ -191,25 +200,6 @@ def add_debug_file_directory(dir): "set debug-file-directory %s" % ":".join(current_dirs), to_string=True) -def load_libcxx_pretty_printers(src_dir): - libcxx_pretty_printers = os.path.join(src_dir, 'third_party', - 'libcxx-pretty-printers') - if not os.path.isdir(libcxx_pretty_printers): - return - sys.path.insert(1, libcxx_pretty_printers) - from printers import register_libcxx_printers - register_libcxx_printers(None) - - -def load_gdb_chrome(src_dir): - tools_gdb = os.path.join(src_dir, 'tools', 'gdb') - - sys.path.insert(1, tools_gdb) - import gdb_chrome - - gdb.execute('source %s' % os.path.join(tools_gdb, 'viewg.gdb')) - - def newobj_handler(event): global compile_dirs compile_dir = os.path.dirname(event.new_objfile.filename) @@ -227,24 +217,10 @@ def newobj_handler(event): # https://crbug.com/603286#c35 add_debug_file_directory(compile_dir) - git = subprocess.Popen( - ['git', '-C', compile_dir, 'rev-parse', '--show-toplevel'], - stdout=subprocess.PIPE, - stderr=subprocess.PIPE) - src_dir, _ = git.communicate() - if git.returncode: - return - src_dir = str(src_dir).rstrip() - - load_libcxx_pretty_printers(src_dir) - - load_gdb_chrome(src_dir) - - # Event hook for newly loaded objfiles. # https://sourceware.org/gdb/onlinedocs/gdb/Events-In-Python.html gdb.events.new_objfile.connect(newobj_handler) -gdb.execute("set environment CHROMIUM_GDBINIT_SOURCED=1") +gdb.execute("set environment V8_GDBINIT_SOURCED=1") end |