* Renamed init_exceptions to signal_init
[cacao.git] / src / cacao / cacao.c
index 86e6c91876a34b9e9bd6551f2b83d63387faaa0c..9a25bc56821d626efb6e62f07e10772df871240b 100644 (file)
@@ -37,7 +37,7 @@
      - Calling the class loader
      - Running the main method
 
-   $Id: cacao.c 2550 2005-06-06 14:44:06Z twisti $
+   $Id: cacao.c 2798 2005-06-23 09:52:06Z twisti $
 
 */
 
@@ -58,6 +58,7 @@
 #include "vm/initialize.h"
 #include "vm/loader.h"
 #include "vm/options.h"
+#include "vm/signallocal.h"
 #include "vm/statistics.h"
 #include "vm/stringlocal.h"
 #include "vm/tables.h"
@@ -260,6 +261,7 @@ static void usage()
        printf("                 d(atasegment).. show data segment listing\n");
        printf("                 i(ntermediate). show intermediate representation\n");
        printf("                 m(ethods)...... show class fields and methods\n");
+       printf("                 n(ative)....... show disassembled native stubs\n");
        printf("                 u(tf) ......... show the utf - hash\n");
        printf("          -i     n ............. activate inlining\n");
        printf("                 v ............. inline virtual methods\n");
@@ -719,6 +721,9 @@ int main(int argc, char **argv)
                                case 'm':
                                        showmethods = true;
                                        break;
+                               case 'n':
+                                       opt_shownativestub = true;
+                                       break;
                                case 'u':
                                        showutf = true;
                                        break;
@@ -861,7 +866,7 @@ int main(int argc, char **argv)
 
        /* install architecture dependent signal handler used for exceptions */
 
-       init_exceptions();
+       signal_init();
 
        /* initialize the codegen sub systems */
 
@@ -926,7 +931,7 @@ int main(int argc, char **argv)
 
                /* load the main class */
 
-               if (!load_class_from_sysloader(utf_new_char(mainstring),&mainclass))
+               if (!(mainclass = load_class_from_sysloader(utf_new_char(mainstring))))
                        throw_main_exception_exit();
 
                /* error loading class, clear exceptionptr for new exception */
@@ -1061,7 +1066,8 @@ int main(int argc, char **argv)
                methodinfo *m;
 
                /* create, load and link the main class */
-               if (!load_class_bootstrap(utf_new_char(mainstring), &mainclass))
+
+               if (!(mainclass = load_class_bootstrap(utf_new_char(mainstring))))
                        throw_main_exception_exit();
 
                if (!link_class(mainclass))