Re: GDB 5.2 vs. Ada (and probably other unknown languages)

Per Bothner
2002-04-11T21:28:42Z

[-- Attachment #1: Type: text/plain, Size: 611 bytes --]

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/

[-- Attachment #2: lang.diff --]
[-- Type: text/plain, Size: 2186 bytes --]

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 */