aboutsummaryrefslogtreecommitdiff
path: root/gdb/dbxread.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2001-07-07 17:19:50 +0000
committerAndrew Cagney <cagney@redhat.com>2001-07-07 17:19:50 +0000
commit51cc5b073771099289e43e0d4a15f71fb0515f0b (patch)
tree8d4feb1344264b42785f9edf0e4c330a9380f427 /gdb/dbxread.c
parentc72e73889f2075d648af94c52687d306befd8fbf (diff)
downloadgdb-51cc5b073771099289e43e0d4a15f71fb0515f0b.zip
gdb-51cc5b073771099289e43e0d4a15f71fb0515f0b.tar.gz
gdb-51cc5b073771099289e43e0d4a15f71fb0515f0b.tar.bz2
* symtab.c (main_name): New function.
(set_main_name): New function. * symtab.h: Declare. * TODO: Update From 2000-03-05 Anthony Green <green@redhat.com>: * dbxread.c (process_one_symbol): Handle the N_MAIN stab by setting main_name. * blockframe.c (inside_main_func): Use main_name instead of "main". * symtab.c (find_main_psymtab): Ditto. * source.c (select_source_symtab): Ditto. * nlmread.c (nlm_symfile_read): Ditto. * rs6000-tdep.c (skip_prologue): Ditto.
Diffstat (limited to 'gdb/dbxread.c')
-rw-r--r--gdb/dbxread.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/gdb/dbxread.c b/gdb/dbxread.c
index d3a1489..5d7ed74 100644
--- a/gdb/dbxread.c
+++ b/gdb/dbxread.c
@@ -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;
}