diff options
Diffstat (limited to 'python/lldbutils/lldbutils/layout.py')
-rw-r--r-- | python/lldbutils/lldbutils/layout.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/python/lldbutils/lldbutils/layout.py b/python/lldbutils/lldbutils/layout.py new file mode 100644 index 000000000..a4894699c --- /dev/null +++ b/python/lldbutils/lldbutils/layout.py @@ -0,0 +1,20 @@ +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 pstate(debugger, command, result, dict): + """Displays a frame's state bits symbolically.""" + debugger.HandleCommand('expr mozilla::PrintFrameState(' + command + ')') + +def init(debugger): + debugger.HandleCommand('command script add -f lldbutils.layout.frametree frametree') + debugger.HandleCommand('command script add -f lldbutils.layout.frametreelimited frametreelimited') + debugger.HandleCommand('command alias ft frametree') + debugger.HandleCommand('command alias ftl frametreelimited') + debugger.HandleCommand('command script add -f lldbutils.layout.pstate pstate'); |