# Define a "pu" command to display PRUnichar * strings (100 chars max)
# Also allows an optional argument for how many chars to print as long as
@@ -232,14 +226,14 @@ You can call the ToNewCString() method on the nsString. It leaks a
little memory but it shouldn't hurt anything if you only do it a few
times in one gdb session. (via akkana@netscape.com)
.. code:: eval
.. code::
(gdb) p string.ToNewCString()
Another method (via bent) is the following (replace ``n`` with: the
returned length of your string):
::
.. code::
(gdb) p string.Length()
$1 = n
@@ -266,7 +260,7 @@ You can determine the concrete type of any object pointed to, by an
XPCOM interface pointer, by looking at the mangled name of the symbol
for the object's vtable:
.. code:: eval
.. code::
(gdb) p aKidFrame
$1 = (nsIFrame *) 0x85058d4
@@ -291,11 +285,11 @@ How can I debug JavaScript from gdb?
If you have JavaScript Engine code on the stack, you'll probably want a
JS stack in addition to the C++ stack.
::
.. code::
(gdb) call DumpJSStack()
See `https://developer.mozilla.org/en-US/docs/Mozilla/Debugging/Debugging_JavaScript </en-US/docs/Mozilla/Debugging/Debugging_JavaScript>`__
See `https://developer.mozilla.org/en-US/docs/Mozilla/Debugging/Debugging_JavaScript <https://developer.mozilla.org/en-US/docs/Mozilla/Debugging/Debugging_JavaScript>`__
for more JS debugging tricks.
How can I debug race conditions and/or how can I make something different happen at NS_ASSERTION time?
@@ -320,7 +314,7 @@ build. This script sets up the environment to run the editor, shell,
debugger, or defining a preferred setup and running any commands you