aboutsummaryrefslogtreecommitdiff
path: root/gdb/symtab.c
diff options
context:
space:
mode:
authorPierre Muller <muller@sourceware.org>2007-10-09 06:59:27 +0000
committerPierre Muller <muller@sourceware.org>2007-10-09 06:59:27 +0000
commitcd6c7346a611f2b9f937c9d1e14fb565ab217a3c (patch)
treefe40acb9d57780958b1fa455802561c69ddbe051 /gdb/symtab.c
parent944d6884eaa85a1376240bfcc934d17f6f99a483 (diff)
downloadgdb-cd6c7346a611f2b9f937c9d1e14fb565ab217a3c.zip
gdb-cd6c7346a611f2b9f937c9d1e14fb565ab217a3c.tar.gz
gdb-cd6c7346a611f2b9f937c9d1e14fb565ab217a3c.tar.bz2
2007-10-09 Pierre Muller <muller@ics.u-strasbg.fr>
* p-lang.h (pascal_main_name): Add declaration. * p-lang.c (GPC_P_INITIALIZE, GPC_MAIN_PROGRAM_NAME_1) (GPC_MAIN_PROGRAM_NAME_2): New constants. (pascal_main_name): New function. * symtab.c: Include p-lang.h. (find_main_name): Add call to pascal_main_name. * Makefile.in (symtab.o): Add dependency on p-lang.h.
Diffstat (limited to 'gdb/symtab.c')
-rw-r--r--gdb/symtab.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/gdb/symtab.c b/gdb/symtab.c
index c2726d4..eeddddd 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -40,6 +40,7 @@
#include "filenames.h" /* for FILENAME_CMP */
#include "objc-lang.h"
#include "ada-lang.h"
+#include "p-lang.h"
#include "hashtab.h"
@@ -4126,7 +4127,7 @@ set_main_name (const char *name)
static void
find_main_name (void)
{
- char *new_main_name;
+ const char *new_main_name;
/* Try to see if the main procedure is in Ada. */
/* FIXME: brobecker/2005-03-07: Another way of doing this would
@@ -4151,6 +4152,13 @@ find_main_name (void)
return;
}
+ new_main_name = pascal_main_name ();
+ if (new_main_name != NULL)
+ {
+ set_main_name (new_main_name);
+ return;
+ }
+
/* The languages above didn't identify the name of the main procedure.
Fallback to "main". */
set_main_name ("main");