summaryrefslogtreecommitdiff
path: root/gdb/source.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
commit88acfd247878c3f48b60011921a1cb70a514e2d6 (patch)
tree859278631fb57458d79fee7ccb3007f94d904f87 /gdb/source.c
parent59db63f867bed862cc7cc8d04e3e809ba5af4e86 (diff)
downloadgdb-88acfd247878c3f48b60011921a1cb70a514e2d6.tar.gz
* 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/source.c')
-rw-r--r--gdb/source.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/source.c b/gdb/source.c
index 2895dd388f6..417d5886a5c 100644
--- a/gdb/source.c
+++ b/gdb/source.c
@@ -153,9 +153,9 @@ select_source_symtab (register struct symtab *s)
/* Make the default place to list be the function `main'
if one exists. */
- if (lookup_symbol ("main", 0, VAR_NAMESPACE, 0, NULL))
+ if (lookup_symbol (main_name (), 0, VAR_NAMESPACE, 0, NULL))
{
- sals = decode_line_spec ("main", 1);
+ sals = decode_line_spec (main_name (), 1);
sal = sals.sals[0];
xfree (sals.sals);
current_source_symtab = sal.symtab;