This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: GDB 5.2 vs. Ada (and probably other unknown languages)
- From: Per Bothner <per at bothner dot com>
- To: Michael Snyder <msnyder at redhat dot com>
- Cc: Florian Weimer <fw at deneb dot enyo dot de>, gdb at sources dot redhat dot com
- Date: Thu, 11 Apr 2002 14:28:38 -0700
- Subject: Re: GDB 5.2 vs. Ada (and probably other unknown languages)
- References: <873cyhaubc.fsf@deneb.enyo.de> <3CB5FA8E.BBB64F59@redhat.com>
Michael Snyder wrote:
>>For example, if I try to set a breakpoint in an Ada program, I just
>>get the error message "internal error - unimplemented function
>>unk_lang_create_fundamental_type called."
>
>
> That's bad. GDB should not refuse to debug a source file just because
> it doesn't know the language.
Could you try this patch:
* language.c (unk_lang_create_fundamental_type): Remove.
(unknown_language_defn, auto_language_defn, local_language_defn):
In place of unk_lang_create_fundamental_type use
c_create_fundamental_type.
--
--Per Bothner
per@bothner.com http://www.bothner.com/per/
Index: language.c
===================================================================
RCS file: /cvs/src/src/gdb/language.c,v
retrieving revision 1.23
diff -u -p -r1.23 language.c
--- language.c 28 Mar 2002 01:35:55 -0000 1.23
+++ language.c 11 Apr 2002 21:27:15 -0000
@@ -41,6 +41,7 @@
#include "language.h"
#include "target.h"
#include "parser-defs.h"
+#include "c-lang.h"
#include "jv-lang.h"
extern void _initialize_language (void);
@@ -1416,12 +1417,6 @@ unk_lang_printstr (struct ui_file *strea
error ("internal error - unimplemented function unk_lang_printstr called.");
}
-static struct type *
-unk_lang_create_fundamental_type (struct objfile *objfile, int typeid)
-{
- error ("internal error - unimplemented function unk_lang_create_fundamental_type called.");
-}
-
static void
unk_lang_print_type (struct type *type, char *varstring, struct ui_file *stream,
int show, int level)
@@ -1467,7 +1462,7 @@ const struct language_defn unknown_langu
unk_lang_printchar, /* Print character constant */
unk_lang_printstr,
unk_lang_emit_char,
- unk_lang_create_fundamental_type,
+ c_create_fundamental_type,
unk_lang_print_type, /* Print a type using appropriate syntax */
unk_lang_val_print, /* Print a value using appropriate syntax */
unk_lang_value_print, /* Print a top-level value */
@@ -1497,7 +1492,7 @@ const struct language_defn auto_language
unk_lang_printchar, /* Print character constant */
unk_lang_printstr,
unk_lang_emit_char,
- unk_lang_create_fundamental_type,
+ c_create_fundamental_type,
unk_lang_print_type, /* Print a type using appropriate syntax */
unk_lang_val_print, /* Print a value using appropriate syntax */
unk_lang_value_print, /* Print a top-level value */
@@ -1526,7 +1521,7 @@ const struct language_defn local_languag
unk_lang_printchar, /* Print character constant */
unk_lang_printstr,
unk_lang_emit_char,
- unk_lang_create_fundamental_type,
+ c_create_fundamental_type,
unk_lang_print_type, /* Print a type using appropriate syntax */
unk_lang_val_print, /* Print a value using appropriate syntax */
unk_lang_value_print, /* Print a top-level value */