forked from mozilla/gecko-dev
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 959016 - Add lldb Python command handlers for debugging Gecko, st…
…arting with frametree and frametreelimited. (DONTBUILD) r=ehsan
- Loading branch information
Showing
6 changed files
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
lldb debugging functionality for Gecko | ||
-------------------------------------- | ||
|
||
This directory contains a module, lldbutils, which is imported by the | ||
in-tree .lldbinit file. The lldbutil modules define some lldb commands | ||
that are handy for debugging Gecko. | ||
|
||
If you want to add a new command or Python-implemented type summary, either add | ||
it to one of the existing broad area Python files (such as lldbutils/layout.py | ||
for layout-related commands) or create a new file if none of the existing files | ||
is appropriate. If you add a new file, make sure you add it to __all__ in | ||
lldbutils/__init__.py. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import lldb | ||
|
||
__all__ = ['layout'] | ||
|
||
def init(): | ||
for name in __all__: | ||
__import__('lldbutils.' + name, globals(), locals(), ['init']).init(lldb.debugger) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import lldb | ||
|
||
def frametree(debugger, command, result, dict): | ||
"""Dumps the frame tree containing the given nsIFrame*.""" | ||
debugger.HandleCommand('expr (' + command + ')->DumpFrameTree()') | ||
|
||
def frametreelimited(debugger, command, result, dict): | ||
"""Dumps the subtree of a frame tree rooted at the given nsIFrame*.""" | ||
debugger.HandleCommand('expr (' + command + ')->DumpFrameTreeLimited()') | ||
|
||
def init(debugger): | ||
debugger.HandleCommand('command script add -f lldbutils.layout.frametree frametree') | ||
debugger.HandleCommand('command script add -f lldbutils.layout.frametree frametreelimited') | ||
debugger.HandleCommand('command alias ft frametree') | ||
debugger.HandleCommand('command alias ftl frametree') |