add an lldb python module for debugging Gecko

RESOLVED FIXED in mozilla29

Status

()

Core
General
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: heycam, Assigned: heycam)

Tracking

Trunk
mozilla29
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [qa-])

Attachments

(1 attachment, 1 obsolete attachment)

Created attachment 8359019 [details] [diff] [review]
patch

All of the functionality that's currently in .gdbinit should be ported over to lldb commands too.  Let's start by making a Python module that .lldbinit imports, and add two of the command from .gdbinit -- frametree and frametreelimited.

I'm adding a new DumpFrameTreeLimited method to nsIFrame since the way you need to pass in stdout to nsIFrame::List varies depending on platform (e.g. you have to write "(FILE*)__stdoutp" on OS X).

(frametreelimited isn't in the in-tree .gdbinit, though it's in my years-ago copied .gdbinit from bz.)

I'm not a Python expert, so let me know if you see anything strange or unidiomatic.
Attachment #8359019 - Flags: review?(ehsan)
Created attachment 8359064 [details] [diff] [review]
patch v2

Initialize the modules a bit differently.
Assignee: nobody → cam
Attachment #8359064 - Flags: review?(ehsan)

Updated

4 years ago
Attachment #8359019 - Attachment is obsolete: true
Attachment #8359019 - Flags: review?(ehsan)

Comment 2

4 years ago
Comment on attachment 8359064 [details] [diff] [review]
patch v2

Review of attachment 8359064 [details] [diff] [review]:
-----------------------------------------------------------------

::: layout/generic/nsIFrame.h
@@ +3260,5 @@
>     */
>    static void RootFrameList(nsPresContext* aPresContext,
>                              FILE* out, int32_t aIndent);
>    virtual void DumpFrameTree();
> +  virtual void DumpFrameTreeLimited();

This doesn't need to be virtual.
Attachment #8359064 - Flags: review?(ehsan) → review+
https://hg.mozilla.org/mozilla-central/rev/481e4766030e
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29

Updated

4 years ago
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.