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