Explorar el Código

2003-02-16 Martin Baulig <[email protected]>

	* doc/jit-debug-sample
	* doc/jit-debug-sample2: Removed.

	* doc/jit-debug: Updated.

svn path=/trunk/mono/; revision=11618
Martin Baulig hace 23 años
padre
commit
1408deaa7d
Se han modificado 7 ficheros con 11 adiciones y 316 borrados
  1. 7 0
      ChangeLog
  2. 2 2
      doc/jit-debug
  3. 0 86
      doc/jit-debug-sample
  4. 0 70
      doc/jit-debug-sample2
  5. 2 2
      web/jit-debug
  6. 0 86
      web/jit-debug-sample
  7. 0 70
      web/jit-debug-sample2

+ 7 - 0
ChangeLog

@@ -1,3 +1,10 @@
+2003-02-16  Martin Baulig  <[email protected]>
+
+	* doc/jit-debug-sample
+	* doc/jit-debug-sample2: Removed.
+
+	* doc/jit-debug: Updated.
+
 2003-02-13  Daniel Morgan <[email protected]>
 
 	* doc/screenshots

+ 2 - 2
doc/jit-debug

@@ -1,7 +1,7 @@
 * Debugging information
 
-	Compile your programs using the `-g' flag in MCS, that will generate a file
-	with the extension .dbg containing the dwarf symbols for your executable.
+	Compile your programs using the `-g' flag in MCS, that will all a special
+	resource containing debugging information to your executable.
 
 	To get stack traces with line number information, you need to run your 
 	program like this:

+ 0 - 86
doc/jit-debug-sample

@@ -1,86 +0,0 @@
-* A debugging session using a dynamically generated symbol file.
-
-	Let's assume we have the following C# application which we want to debug:
-
-	<pre>
-	using System;
-
-	public class Foo
-	{
-		public struct MyStruct {
-			int a;
-			long b;
-			double c;
-		}
-
-		public static void Main ()
-		{
-			Int32 value = 5;
-			long test = 512;
-
-			MyStruct my_struct;
-			my_struct.a = 5;
-			my_struct.b = test;
-			my_struct.c = 23323.5235;
-		}
-	}
-	</pre>
-
-	First of all, we need to compile it and create the .il files:
-
-	<pre>
-	$ mcs ./Foo.cs
-	$ monodis /home/export/martin/MONO-LINUX/lib/corlib.dll > corlib.il
-	$ monodis Foo.exe > Foo.il
-	</pre>
-
-	Now we can start the JIT in the debugger:
-
-	<pre>
-	$ gdb ~/monocvs/mono/mono/jit/mono
-	(gdb) r --debug=dwarf --break Foo:Main ./Foo.exe
-	Starting program: /home/martin/monocvs/mono/mono/jit/mono --debug=dwarf --break Foo:Main ./Foo.exe
-	0x081e8911 in ?? ()
-	(gdb) call mono_debug_make_symbols ()
-	(gdb) add-symbol-file /tmp/Foo.o
-	Reading symbols from /tmp/Foo.o...done.
-	Current language:  auto; currently c++
-	(gdb) frame
-	#0  Foo.Main () at Foo.il:26
-	26          // method line 2
-	(gdb) n
-	Foo.Main () at Foo.il:38
-	38              IL_0000: ldc.i4.5
-	(gdb) list
-	33              .maxstack 2
-	34              .locals (
-	35                      int32   V_0,
-	36                      int64   V_1,
-	37                      valuetype MyStruct      V_2)
-	38              IL_0000: ldc.i4.5
-	39              IL_0001: stloc.0
-	40              IL_0002: ldc.i4 512
-	41              IL_0007: conv.i8
-	42              IL_0008: stloc.1
-	43              IL_0009: ldloca.s 2
-	44              IL_000b: ldc.i4.5
-	45              IL_000c: stfld  int32 .MyStruct::a
-	46              IL_0011: ldloca.s 2
-	47              IL_0013: ldloc.1
-	48              IL_0014: stfld  int64 .MyStruct::b
-	49              IL_0019: ldloca.s 2
-	50              IL_001b: ldc.r8 23323.5
-	51              IL_0024: stfld  float64 .MyStruct::c
-	52              IL_0029: ret
-	(gdb) until 52
-	Foo.Main () at Foo.il:53
-	53          }
-	(gdb) info locals
-	V_0 = 5
-	V_1 = 512
-	V_2 = {a = 5, b = 512, c = 23323.523499999999}
-	</pre>
-
-	As you see in this example, you need to know IL code to use this debugging method - but
-	it may be the only way to debug a library.
-

+ 0 - 70
doc/jit-debug-sample2

@@ -1,70 +0,0 @@
-* A debugging session using a symbol file which has been created by MCS.
-
-	Let's assume we have the following C# application which we want to debug:
-
-	<pre>
-	using System;
-
-	public class Foo
-	{
-		public struct MyStruct {
-			int a;
-			long b;
-			double c;
-		}
-
-		public static void Main ()
-		{
-			Int32 value = 5;
-			long test = 512;
-
-			MyStruct my_struct;
-			my_struct.a = 5;
-			my_struct.b = test;
-			my_struct.c = 23323.5235;
-		}
-	}
-	</pre>
-
-	First of all, we need to compile it with MCS, assemble the generated .s file and
-	create the .il files for all referenced assemblies which were not compiled with MCS:
-
-	<pre>
-	$ mcs -g ./Foo.cs
-	$ as -o Foo-debug.o Foo-debug.s
-	$ monodis /home/export/martin/MONO-LINUX/lib/corlib.dll > corlib.il
-	</pre>
-
-	Now we can start the JIT in the debugger:
-
-	<pre>
-	$ gdb ~/monocvs/mono/mono/jit/mono
-	(gdb) r --debug=dwarf-plus --break Foo:Main ./Foo.exe
-	Starting program: /home/martin/monocvs/mono/mono/jit/mono --debug=dwarf-plus --break Foo:Main ./Foo.exe
-	Program received signal SIGTRAP, Trace/breakpoint trap.
-	0x081e8681 in ?? ()
-	(gdb) call mono_debug_make_symbols ()
-	(gdb) add-symbol-file Foo-debug.o
-	(gdb) add-symbol-file /tmp/corlib.o
-`	(gdb) frame
-	#0  Main () at ./Foo.cs:11
-	11              public static void Main ()
-	(gdb) n
-	Main () at ./Foo.cs:13
-	13                      Int32 value = 5;
-	(gdb)
-	14                      long test = 512;
-	(gdb)
-	17                      my_struct.a = 5;
-	(gdb)
-	18                      my_struct.b = test;
-	(gdb)
-	19                      my_struct.c = 23323.5235;
-	(gdb)
-	20              }
-	(gdb) info locals
-	value = 5
-	test = 512
-	my_struct = { a = 5, b = 512, c = 23323.5235 }
-	</pre>
-

+ 2 - 2
web/jit-debug

@@ -1,7 +1,7 @@
 * Debugging information
 
-	Compile your programs using the `-g' flag in MCS, that will generate a file
-	with the extension .dbg containing the dwarf symbols for your executable.
+	Compile your programs using the `-g' flag in MCS, that will all a special
+	resource containing debugging information to your executable.
 
 	To get stack traces with line number information, you need to run your 
 	program like this:

+ 0 - 86
web/jit-debug-sample

@@ -1,86 +0,0 @@
-* A debugging session using a dynamically generated symbol file.
-
-	Let's assume we have the following C# application which we want to debug:
-
-	<pre>
-	using System;
-
-	public class Foo
-	{
-		public struct MyStruct {
-			int a;
-			long b;
-			double c;
-		}
-
-		public static void Main ()
-		{
-			Int32 value = 5;
-			long test = 512;
-
-			MyStruct my_struct;
-			my_struct.a = 5;
-			my_struct.b = test;
-			my_struct.c = 23323.5235;
-		}
-	}
-	</pre>
-
-	First of all, we need to compile it and create the .il files:
-
-	<pre>
-	$ mcs ./Foo.cs
-	$ monodis /home/export/martin/MONO-LINUX/lib/corlib.dll > corlib.il
-	$ monodis Foo.exe > Foo.il
-	</pre>
-
-	Now we can start the JIT in the debugger:
-
-	<pre>
-	$ gdb ~/monocvs/mono/mono/jit/mono
-	(gdb) r --debug=dwarf --break Foo:Main ./Foo.exe
-	Starting program: /home/martin/monocvs/mono/mono/jit/mono --debug=dwarf --break Foo:Main ./Foo.exe
-	0x081e8911 in ?? ()
-	(gdb) call mono_debug_make_symbols ()
-	(gdb) add-symbol-file /tmp/Foo.o
-	Reading symbols from /tmp/Foo.o...done.
-	Current language:  auto; currently c++
-	(gdb) frame
-	#0  Foo.Main () at Foo.il:26
-	26          // method line 2
-	(gdb) n
-	Foo.Main () at Foo.il:38
-	38              IL_0000: ldc.i4.5
-	(gdb) list
-	33              .maxstack 2
-	34              .locals (
-	35                      int32   V_0,
-	36                      int64   V_1,
-	37                      valuetype MyStruct      V_2)
-	38              IL_0000: ldc.i4.5
-	39              IL_0001: stloc.0
-	40              IL_0002: ldc.i4 512
-	41              IL_0007: conv.i8
-	42              IL_0008: stloc.1
-	43              IL_0009: ldloca.s 2
-	44              IL_000b: ldc.i4.5
-	45              IL_000c: stfld  int32 .MyStruct::a
-	46              IL_0011: ldloca.s 2
-	47              IL_0013: ldloc.1
-	48              IL_0014: stfld  int64 .MyStruct::b
-	49              IL_0019: ldloca.s 2
-	50              IL_001b: ldc.r8 23323.5
-	51              IL_0024: stfld  float64 .MyStruct::c
-	52              IL_0029: ret
-	(gdb) until 52
-	Foo.Main () at Foo.il:53
-	53          }
-	(gdb) info locals
-	V_0 = 5
-	V_1 = 512
-	V_2 = {a = 5, b = 512, c = 23323.523499999999}
-	</pre>
-
-	As you see in this example, you need to know IL code to use this debugging method - but
-	it may be the only way to debug a library.
-

+ 0 - 70
web/jit-debug-sample2

@@ -1,70 +0,0 @@
-* A debugging session using a symbol file which has been created by MCS.
-
-	Let's assume we have the following C# application which we want to debug:
-
-	<pre>
-	using System;
-
-	public class Foo
-	{
-		public struct MyStruct {
-			int a;
-			long b;
-			double c;
-		}
-
-		public static void Main ()
-		{
-			Int32 value = 5;
-			long test = 512;
-
-			MyStruct my_struct;
-			my_struct.a = 5;
-			my_struct.b = test;
-			my_struct.c = 23323.5235;
-		}
-	}
-	</pre>
-
-	First of all, we need to compile it with MCS, assemble the generated .s file and
-	create the .il files for all referenced assemblies which were not compiled with MCS:
-
-	<pre>
-	$ mcs -g ./Foo.cs
-	$ as -o Foo-debug.o Foo-debug.s
-	$ monodis /home/export/martin/MONO-LINUX/lib/corlib.dll > corlib.il
-	</pre>
-
-	Now we can start the JIT in the debugger:
-
-	<pre>
-	$ gdb ~/monocvs/mono/mono/jit/mono
-	(gdb) r --debug=dwarf-plus --break Foo:Main ./Foo.exe
-	Starting program: /home/martin/monocvs/mono/mono/jit/mono --debug=dwarf-plus --break Foo:Main ./Foo.exe
-	Program received signal SIGTRAP, Trace/breakpoint trap.
-	0x081e8681 in ?? ()
-	(gdb) call mono_debug_make_symbols ()
-	(gdb) add-symbol-file Foo-debug.o
-	(gdb) add-symbol-file /tmp/corlib.o
-`	(gdb) frame
-	#0  Main () at ./Foo.cs:11
-	11              public static void Main ()
-	(gdb) n
-	Main () at ./Foo.cs:13
-	13                      Int32 value = 5;
-	(gdb)
-	14                      long test = 512;
-	(gdb)
-	17                      my_struct.a = 5;
-	(gdb)
-	18                      my_struct.b = test;
-	(gdb)
-	19                      my_struct.c = 23323.5235;
-	(gdb)
-	20              }
-	(gdb) info locals
-	value = 5
-	test = 512
-	my_struct = { a = 5, b = 512, c = 23323.5235 }
-	</pre>
-