Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMartin Baulig <martin@novell.com>2002-03-13 22:43:08 +0300
committerMartin Baulig <martin@novell.com>2002-03-13 22:43:08 +0300
commit77ca896936ac56e303d99c871aac72190922d81f (patch)
tree5a9fc608973287b0d75306a38d4023debfecbcfc /docs
parent54c971af13334baaf60f9f97f82bcc93816378f0 (diff)
Added a few words about DWARF 2.
svn path=/trunk/mono/; revision=3091
Diffstat (limited to 'docs')
-rw-r--r--docs/jit-debug34
1 files changed, 30 insertions, 4 deletions
diff --git a/docs/jit-debug b/docs/jit-debug
index 18652c1596d..a895a6fbdff 100644
--- a/docs/jit-debug
+++ b/docs/jit-debug
@@ -5,31 +5,54 @@ You need to run mono inside gdb. The following command line swicthes
are available:
--stabs
- --debug methodName
+ --dwarf
+ --debug className:methodName
--stabs will create an assemblyname-stabs.s file for each assembly the
CLR program uses. Note that to properly display source code lines,
you need to disassemble the CLR executables with monodis before running
mono. Each IL assembly file needs to have the name <assemblyname>.il.
---debug methodName will insert a breakpoin at the beginning of
+--dwarf will create an assemblyname-dwarf.s file for each assembly the
+CLR program uses. Note that to properly display source code lines,
+you need to disassemble the CLR executables with monodis before running
+mono. Each IL assembly file needs to have the name <assemblyname>.il.
+
+--debug className:methodName will insert a breakpoin at the beginning of
methodName's code, so that control is trasnfered to the debugger as soon
as it is entered. You may use this switch multiple times.
So, suppose you use the --debug switch, or hit a segfault inside a
-jitted method. In a shell you need to compile the stab information
-created with the --stabs option with the assembler:
+jitted method. In a shell you need to compile the stab/dwarf information
+created with the --stabs or --dwarf option with the assembler:
as assemblyname-stabs.s -o assemblyname-stabs.o
+or
+
+ as assemblyname-dwarf.s -o assemblyname-dwarf.o
+
Now, inside gdb, you can load the debug information with:
add-symbol-file assemblyname-stabs.o 0
+or
+
+ add-symbol-file assemblyname-dwarf.o 0
+
And at this point the debugger should be able to print a correct
backtrace, you should be able to inspect method parameters and local
variables, disassemble methods and step through the code.
+Using the DWARF 2 debugging format (with the --dwarf) argument is the
+recommended one since it supports source files with more than 65.536
+lines (for instance corlib.il) and you'll also get much better type
+support with it. [FIXME: I'm still working on this, but it's already
+making good progress. Martin].
+
+However, some systems or debuggers may not support the DWARF 2 format,
+in this case just use stabs.
+
Note that apparently you can't unload a symbol file from gdb, so you
need to restart it if you restart the program to debug.
@@ -45,3 +68,6 @@ MonoMethod from wich the method was created is appended to the end of
the name (i's also handy since you can use the address in gdb to inspect
the MonoMethod).
+[This will change with DWARF 2 since this format is capable of storing
+ the full type name as it's seen by the programming language and doesn't
+ need any mangling. Martin]