Reviewers: Søren Gjesse,

Message:
Hi Søren,

Here are most of the debugger changes I had said that I wanted to contribute.
Among other things, these contains some of the ground work laid for the heap
profiler enhancements that I will do in another contribution later after we
square away this set of changes.

If you wish, I can go through the review and make comments on why I made some of
the changes.  Just let me know if that is needed.

Thanks.

Some details: I resolved all the lint issues that seem to make sense.  I
couldn't get the JS files to be lint'ed by the review site.  If there are
issues, please let me know.  This set of changes has been run against the
test.py testsuite from bleeding edge rev 6117 for a release ia32 build with 0
failures.


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).


Please review this at http://codereview.chromium.org/5980006/

SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/

Affected files:
  M     src/d8.js
  M     src/debug-agent.cc
  M     src/debug-debugger.js
  M     src/debug.h
  M     src/debug.cc
  M     src/flag-definitions.h
  M     src/runtime.h
  M     src/runtime.cc


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to