1# .lldbinit file for debugging Mozilla 2 3# ----------------------------------------------------------------------------- 4# For documentation on all of the commands and type summaries defined here and 5# in the accompanying Python scripts, see third_party/python/lldbutils/README.txt. 6# ----------------------------------------------------------------------------- 7 8# Import the module that defines complex Gecko debugging commands. This assumes 9# you are either running lldb from the top level source directory, the objdir, 10# or the dist/bin directory. (.lldbinit files in the objdir and dist/bin set 11# topsrcdir appropriately.) 12script topsrcdir = topsrcdir if "topsrcdir" in locals() else os.getcwd() 13script sys.path.append(os.path.join(topsrcdir, "python/lldbutils")) 14script import lldbutils 15script lldbutils.init() 16 17# Mozilla's use of UNIFIED_SOURCES to include multiple source files into a 18# single compiled file breaks lldb breakpoint setting. This works around that. 19# See http://lldb.llvm.org/troubleshooting.html for more info. 20settings set target.inline-breakpoint-strategy always 21 22# Show the dynamic type of an object when using "expr". This, for example, 23# will show a variable declared as "nsIFrame *" that points to an nsBlockFrame 24# object as being of type "nsBlockFrame *" rather than "nsIFrame *". 25settings set target.prefer-dynamic-value run-target 26 27# Show the value of text nodes. 28type summary add nsTextNode --summary-string "${var.mText}" 29 30# Dump the current JS stack. 31command alias js expr DumpJSStack() 32