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

Issue 5980006: Misc debugger enhancements and bug fixes.... (Closed)

Created:
10 years ago by marklam
Modified:
9 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

Description

Misc debugger enhancements and bug fixes. 1. Added gdb style debugger commands (and their shortcuts) for d8. These include: - s[tep] : step into the current statement. - s[tep]i[n]: step into the current statement with the minimum step. - n[ext] : step to the next statement. - fin[ish] : step out of the current function. - cond : setting conditions on breakpoints. - d[elete] : deletes breakpoints. - en[able]|dis[able]: enables/disables breakpoints including exception breakpoints. - ignore : ignores a breakpoint for a specified period. - inf[o] ar[gs] : info on arguments of the current function. - inf[o] lo[cals] : info on local vars of the current function. - inf[o] br[eakpoints] : info on breakpoints. - l[ist] : similar to source, but allows the user to continually dump subsequent lines of source code either in the forward or backward direction. - quit / exit / disconnect : terminates the remote debugger session. NOTE: Active breakpoints will automatically be disabled when the remote debugger detaches. This allows v8 to continue to run without worrying about a loss of a debugger session. 2. Added support for breaking the debugger by simply typing ENTER. The break command is now optional. 3. Once the debugger is broken, the user can now just type ENTER to repeat the last command. This is useful to functionality that needs to be invoked repeatedly e.g. step, list. 4. Added more verbose descriptions in d8's help. 5. Fixed a line and column number offset bug in the listing of breakpoint line and column numbers. 6. Added a gc command to allow GCs to be requested from the debugger interface. The plumbing for requesting different types of GCs is there, but the underlying implementation currently only triggers a full mark-compact GC. The command also returns the before and after sizes of the heap. 7. Added trace json, and flags commands that are not published in help. trace json is used for tracing the debugger packets send from and received by d8. flags is for setting v8 flags. These are useful for people debugging v8 itself, but not necessarily users of v8. 8. Added the ability to enable and disable break on all / uncaught exceptions in to d8. 9. Added a fix to prevent the Debugger Agent from being re-instantiated if one already exists. 10. Added the ability to filter results of the script command by matching text or numbers on the results. 11. Added v8 flags to enable/disable the sending of debugger BeforeCompile, AfterCompile, and ScriptCollected events. 12. Fixed some undefined value bugs that resulted in v8 or the debugger failing. 13. Added a few minor WEBOS__ customizations (analogous to ANDROID customizations). Committed: http://code.google.com/p/v8/source/detail?r=6180 Reverted: http://code.google.com/p/v8/source/detail?r=6183 Committed: http://code.google.com/p/v8/source/detail?r=6180

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Total comments: 48

Patch Set 4 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+771 lines, -72 lines) Patch
M src/d8.js View 1 2 3 30 chunks +554 lines, -57 lines 0 comments Download
M src/debug.h View 1 2 3 2 chunks +10 lines, -0 lines 0 comments Download
M src/debug.cc View 1 2 3 2 chunks +5 lines, -3 lines 0 comments Download
M src/debug-agent.cc View 1 2 3 3 chunks +26 lines, -7 lines 0 comments Download
M src/debug-debugger.js View 1 2 3 8 chunks +133 lines, -3 lines 0 comments Download
M src/flag-definitions.h View 1 2 3 1 chunk +10 lines, -0 lines 0 comments Download
M src/runtime.h View 1 2 3 1 chunk +6 lines, -1 line 0 comments Download
M src/runtime.cc View 1 2 3 1 chunk +27 lines, -1 line 0 comments Download

Messages

Total messages: 5 (0 generated)
marklam
Hi Søren, Here are most of the debugger changes I had said that I wanted ...
10 years ago (2010-12-24 01:05:13 UTC) #1
marklam
Søren, I forgot to mention one detail: I think most of these changes are probably ...
9 years, 12 months ago (2010-12-27 00:47:34 UTC) #2
Søren Thygesen Gjesse
http://codereview.chromium.org/5980006/diff/10002/src/d8.js File src/d8.js (right): http://codereview.chromium.org/5980006/diff/10002/src/d8.js#newcode302 src/d8.js:302: cmd_line = 'break'; // If not in debugger mode, ...
9 years, 11 months ago (2011-01-03 08:56:07 UTC) #3
marklam
I've made all the necessary changes except for breaking up long lines which are purely ...
9 years, 11 months ago (2011-01-04 20:12:13 UTC) #4
Søren Thygesen Gjesse
9 years, 11 months ago (2011-01-05 13:57:32 UTC) #5
LGTM

We are not linting the line lengths of the JS files, so I accepted the long
lines in d8.js.

Committed: http://code.google.com/p/v8/source/detail?r=6180

Thank you for the patch!

It would be nice if you could follow up with some tests of the new debug
protocol messages like we already have for the current messages in
test/mjsumit/debug-*

We also need to update http://code.google.com/p/v8/wiki/DebuggerProtocol with
information on the new messages and changes to the existing ones. Actually you
will not be able to edit http://code.google.com/p/v8/wiki/DebuggerProtocol
online, but you can send a update and I will put it in.

Powered by Google App Engine
This is Rietveld 408576698