* symtab.c (main_name): New function.
[deliverable/binutils-gdb.git] / gdb / dbxread.c
index d3a1489bc8159314ab6910921d124d11db063f73..5d7ed74e8af4cddbb135ffbe1a09e10c8f035ebc 100644 (file)
@@ -2390,13 +2390,25 @@ process_one_symbol (int type, int desc, CORE_ADDR valu, char *name,
        }
       break;
 
+    case N_MAIN:               /* Name of main routine.  */
+      /* FIXME: If one has a symbol file with N_MAIN and then replaces
+        it with a symbol file with "main" and without N_MAIN.  I'm
+        not sure exactly what rule to follow but probably something
+        like: N_MAIN takes precedence over "main" no matter what
+        objfile it is in; If there is more than one N_MAIN, choose
+        the one in the symfile_objfile; If there is more than one
+        N_MAIN within a given objfile, complain() and choose
+        arbitrarily. (kingdon) */
+      if (name != NULL)
+       set_main_name (name);
+      break;
+
       /* The following symbol types can be ignored.  */
     case N_OBJ:                /* Solaris 2:  Object file dir and name */
       /*   N_UNDF:                   Solaris 2:  file separator mark */
       /*   N_UNDF: -- we will never encounter it, since we only process one
          file's symbols at once.  */
     case N_ENDM:               /* Solaris 2:  End of module */
-    case N_MAIN:               /* Name of main routine.  */
     case N_ALIAS:              /* SunPro F77: alias name, ignore for now.  */
       break;
     }
This page took 0.025385 seconds and 4 git commands to generate.