Author: zoltan
Date: 2008-01-24 11:29:01 -0500 (Thu, 24 Jan 2008)
New Revision: 93813

Modified:
   trunk/mono/mono/mini/driver.c
   trunk/mono/mono/mini/mini.c
   trunk/mono/mono/mini/mini.h
Log:
2008-01-24  Zoltan Varga  <[EMAIL PROTECTED]>

        * driver.c (mono_main): Add a --break-at-bb command line argument for 
JIT
        debugging.


Modified: trunk/mono/mono/mini/driver.c
===================================================================
--- trunk/mono/mono/mini/driver.c       2008-01-24 16:22:42 UTC (rev 93812)
+++ trunk/mono/mono/mini/driver.c       2008-01-24 16:29:01 UTC (rev 93813)
@@ -898,6 +898,7 @@
                 "Runtime and JIT debugging options:\n"
                 "    --breakonex            Inserts a breakpoint on 
exceptions\n"
                 "    --break METHOD         Inserts a breakpoint at METHOD 
entry\n"
+                "    --break-at-bb METHOD N Inserts a breakpoint in METHOD at 
BB N\n"
                 "    --compile METHOD       Just compile METHOD in assembly\n"
                 "    --compile-all          Compiles all the methods in the 
assembly\n"
                 "    --ncompile N           Number of times to compile METHOD 
(default: 1)\n"
@@ -1127,6 +1128,17 @@
                        
                        if (!mono_debugger_insert_breakpoint (argv [++i], 
FALSE))
                                fprintf (stderr, "Error: invalid method name 
'%s'\n", argv [i]);
+               } else if (strcmp (argv [i], "--break-at-bb") == 0) {
+                       if (i + 2 >= argc) {
+                               fprintf (stderr, "Missing method name or bb num 
in --break-at-bb command line option.");
+                               return 1;
+                       }
+                       mono_break_at_bb_method = mono_method_desc_new (argv 
[++i], TRUE);
+                       if (mono_break_at_bb_method == NULL) {
+                               fprintf (stderr, "Method name is in a bad 
format in --break-at-bb command line option.");
+                               return 1;
+                       }
+                       mono_break_at_bb_bb_num = atoi (argv [++i]);
                } else if (strcmp (argv [i], "--inject-async-exc") == 0) {
                        if (i + 2 >= argc) {
                                fprintf (stderr, "Missing method name or 
position in --inject-async-exc command line option\n");

Modified: trunk/mono/mono/mini/mini.c
===================================================================
--- trunk/mono/mono/mini/mini.c 2008-01-24 16:22:42 UTC (rev 93812)
+++ trunk/mono/mono/mini/mini.c 2008-01-24 16:29:01 UTC (rev 93813)
@@ -156,6 +156,8 @@
 #endif
 MonoMethodDesc *mono_inject_async_exc_method = NULL;
 int mono_inject_async_exc_pos;
+MonoMethodDesc *mono_break_at_bb_method = NULL;
+int mono_break_at_bb_bb_num;
 
 static int mini_verbose = 0;
 

Modified: trunk/mono/mono/mini/mini.h
===================================================================
--- trunk/mono/mono/mini/mini.h 2008-01-24 16:22:42 UTC (rev 93812)
+++ trunk/mono/mono/mini/mini.h 2008-01-24 16:29:01 UTC (rev 93813)
@@ -142,6 +142,9 @@
 #endif
 extern MonoMethodDesc *mono_inject_async_exc_method;
 extern int mono_inject_async_exc_pos;
+extern MonoMethodDesc *mono_break_at_bb_method;
+extern int mono_break_at_bb_bb_num;
+extern gboolean check_for_pending_exc;
 
 struct MonoInstList {
        struct MonoInstList *next, *prev;

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to