Commit Graph

7 Commits

Author SHA1 Message Date
Camillo Bruni
8081c9da86 [tools] Add redirect gdb helper
Redirect forwards stdout to a file for the duration of a gdb command.
This is useful when inspecting very large objects that generate several pages
of output in a gdb session.

If the GDB_EXTERNAL_EDITOR environment variable is set, popup will
automatically open the generated temporary file in the provided editor.
A simple default that works is GDB_EXTERNAL_EDITOR="gnome-open". Note that
this should be a GUI editor since you would otherwise interrupt the
active gdb session.

    redirect jco 0x12345678
    redirect x/2000xg 0x12345678

Examples: 
Change-Id: I2db78112a0141427c83813d16d94a19bc2cffddf
Reviewed-on: https://chromium-review.googlesource.com/788861
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49620}
2017-11-24 16:55:16 +00:00
honggyu.kp
c52685a516 gdb-v8-support.py: Fix old style print statement
Since python3 does not use the old print statement, it may not be able
to load gdb-v8-support.py script in gdb as below:

  (gdb) source tools/gdb-v8-support.py
    File "tools/gdb-v8-support.py", line 170
      print result
                 ^
  SyntaxError: Missing parentheses in call to 'print'

This fixes print statement for both python2 and python3.

R=jochen@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2084163004
Cr-Commit-Position: refs/heads/master@{#37488}
2016-07-03 07:11:47 +00:00
aperez
abcab811b4 Fix missing "re" module import in GDB support script
The gdb-v8-support.py script uses the "re" module to match regular expression,
but it does not import it, resulting in an error when loading the script from
GDB. This patch adds the missing import.

BUG=

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

Cr-Commit-Position: refs/heads/master@{#29770}
2015-07-21 09:28:50 +00:00
jochen
aac18f3927 Extend find-anywhere so it also works while debugging a live process
R=yangguo@chromium.org
BUG=none
LOG=n

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

Cr-Commit-Position: refs/heads/master@{#29110}
2015-06-18 11:57:03 +00:00
vegorov
e85f979ed3 gdb-v8-support.py: add FindAnywhere helper.
R=jkummerow@chromium.org
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#28653}
2015-05-27 13:49:10 +00:00
yangguo@chromium.org
86a62d0da3 Added check for trailing whitespaces and corrected existing violations.
Review URL: http://codereview.chromium.org/7826007

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9094 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-09-01 11:28:10 +00:00
vegorov@chromium.org
64c897b5cb Extend gdb-jit support (OSX/locals+parameters/prettyprint)
Generate Mach-O in-memory objects for OSX. Dump locals and parameters
for non-optimized frames.

Unfortunately, it seems like more-recent-GDB on OSX there is a little
temperamental (eg, the version from macports will be missing symbols
from gdb-integration_g when the version included in xcode will not--
and this is with --gdbjit off).

Includes some Python scripts to make dealing with V8 values in gdb more
pleasant.

Patch by Luke Zarko.

Review URL: http://codereview.chromium.org/6995161

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8483 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-30 11:52:00 +00:00