Blame .lldbinit

Packit f0b94e
# .lldbinit file for debugging Mozilla
Packit f0b94e
Packit f0b94e
# -----------------------------------------------------------------------------
Packit f0b94e
# For documentation on all of the commands and type summaries defined here and
Packit f0b94e
# in the accompanying Python scripts, see third_party/python/lldbutils/README.txt.
Packit f0b94e
# -----------------------------------------------------------------------------
Packit f0b94e
Packit f0b94e
# Import the module that defines complex Gecko debugging commands.  This assumes
Packit f0b94e
# you are either running lldb from the top level source directory, the objdir,
Packit f0b94e
# or the dist/bin directory.  (.lldbinit files in the objdir and dist/bin set
Packit f0b94e
# topsrcdir appropriately.)
Packit f0b94e
script topsrcdir = topsrcdir if locals().has_key("topsrcdir") else os.getcwd(); sys.path.append(os.path.join(topsrcdir, "third_party/python/lldbutils")); import lldbutils; lldbutils.init()
Packit f0b94e
Packit f0b94e
# Mozilla's use of UNIFIED_SOURCES to include multiple source files into a
Packit f0b94e
# single compiled file breaks lldb breakpoint setting. This works around that.
Packit f0b94e
# See http://lldb.llvm.org/troubleshooting.html for more info.
Packit f0b94e
settings set target.inline-breakpoint-strategy always
Packit f0b94e
Packit f0b94e
# Show the dynamic type of an object when using "expr".  This, for example,
Packit f0b94e
# will show a variable declared as "nsIFrame *" that points to an nsBlockFrame
Packit f0b94e
# object as being of type "nsBlockFrame *" rather than "nsIFrame *".
Packit f0b94e
settings set target.prefer-dynamic-value run-target
Packit f0b94e
Packit f0b94e
# Show the string value in atoms.
Packit f0b94e
type summary add nsAtom --summary-string "${var.mString}"
Packit f0b94e
Packit f0b94e
# Show the value of text nodes.
Packit f0b94e
type summary add nsTextNode --summary-string "${var.mText}"
Packit f0b94e
Packit f0b94e
# Dump the current JS stack.
Packit f0b94e
command alias js expr DumpJSStack()