X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdb%2Fm2-lang.c;h=528484f0f27144f56954387704d72792c7a27c70;hb=3c23e6fb7e41ca97c5e25921080f61b1be84d461;hp=fd13349295a8a2e56352674b6868fb1d3832a1a6;hpb=c5aa993b1f4add48fbdc6cc3117059f616e49875;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/m2-lang.c b/gdb/m2-lang.c index fd13349295..528484f0f2 100644 --- a/gdb/m2-lang.c +++ b/gdb/m2-lang.c @@ -1,5 +1,6 @@ /* Modula 2 language support routines for GDB, the GNU debugger. - Copyright 1992 Free Software Foundation, Inc. + Copyright 1992, 1993, 1994, 1995, 1996, 1998, 2000, 2002 + Free Software Foundation, Inc. This file is part of GDB. @@ -26,12 +27,15 @@ #include "language.h" #include "m2-lang.h" #include "c-lang.h" +#include "valprint.h" -extern void _initialize_m2_language PARAMS ((void)); -static struct type *m2_create_fundamental_type PARAMS ((struct objfile *, int)); -static void m2_printstr PARAMS ((GDB_FILE * stream, char *string, unsigned int length, int width, int force_ellipses)); -static void m2_printchar PARAMS ((int, GDB_FILE *)); -static void m2_emit_char PARAMS ((int, GDB_FILE *, int)); +extern void _initialize_m2_language (void); +static struct type *m2_create_fundamental_type (struct objfile *, int); +static void m2_printstr (struct ui_file * stream, char *string, + unsigned int length, int width, + int force_ellipses); +static void m2_printchar (int, struct ui_file *); +static void m2_emit_char (int, struct ui_file *, int); /* Print the character C on STREAM as part of the contents of a literal string whose delimiter is QUOTER. Note that that format for printing @@ -41,10 +45,7 @@ static void m2_emit_char PARAMS ((int, GDB_FILE *, int)); */ static void -m2_emit_char (c, stream, quoter) - register int c; - GDB_FILE *stream; - int quoter; +m2_emit_char (register int c, struct ui_file *stream, int quoter) { c &= 0xFF; /* Avoid sign bit follies */ @@ -93,9 +94,7 @@ m2_emit_char (c, stream, quoter) be replaced with a true Modula version. */ static void -m2_printchar (c, stream) - int c; - GDB_FILE *stream; +m2_printchar (int c, struct ui_file *stream) { fputs_filtered ("'", stream); LA_EMIT_CHAR (c, stream, '\''); @@ -110,20 +109,13 @@ m2_printchar (c, stream) be replaced with a true Modula version. */ static void -m2_printstr (stream, string, length, width, force_ellipses) - GDB_FILE *stream; - char *string; - unsigned int length; - int width; - int force_ellipses; +m2_printstr (struct ui_file *stream, char *string, unsigned int length, + int width, int force_ellipses) { register unsigned int i; unsigned int things_printed = 0; int in_quotes = 0; int need_comma = 0; - extern int inspect_it; - extern int repeat_count_threshold; - extern int print_max; if (length == 0) { @@ -204,9 +196,7 @@ m2_printstr (stream, string, length, width, force_ellipses) by an experienced Modula programmer. */ static struct type * -m2_create_fundamental_type (objfile, typeid) - struct objfile *objfile; - int typeid; +m2_create_fundamental_type (struct objfile *objfile, int typeid) { register struct type *type = NULL; @@ -407,7 +397,7 @@ struct type *builtin_type_m2_card; struct type *builtin_type_m2_real; struct type *builtin_type_m2_bool; -struct type **CONST_PTR (m2_builtin_types[]) = +struct type **const (m2_builtin_types[]) = { &builtin_type_m2_char, &builtin_type_m2_int, @@ -424,6 +414,7 @@ const struct language_defn m2_language_defn = m2_builtin_types, range_check_on, type_check_on, + case_sensitive_on, m2_parse, /* parser */ m2_error, /* parser error function */ evaluate_subexp_standard, @@ -434,6 +425,10 @@ const struct language_defn m2_language_defn = m2_print_type, /* Print a type using appropriate syntax */ m2_val_print, /* Print a value using appropriate syntax */ c_value_print, /* Print a top-level value */ + NULL, /* Language specific skip_trampoline */ + value_of_this, /* value_of_this */ + basic_lookup_symbol_nonlocal, /* lookup_symbol_nonlocal */ + NULL, /* Language specific symbol demangler */ {"", "", "", ""}, /* Binary format info */ {"%loB", "", "o", "B"}, /* Octal format info */ {"%ld", "", "d", ""}, /* Decimal format info */ @@ -448,7 +443,7 @@ const struct language_defn m2_language_defn = /* Initialization for Modula-2 */ void -_initialize_m2_language () +_initialize_m2_language (void) { /* Modula-2 "pervasive" types. NOTE: these can be redefined!!! */ builtin_type_m2_int =