diff options
author | Joel Brobecker <brobecker@gnat.com> | 2003-05-08 17:35:21 +0000 |
---|---|---|
committer | Joel Brobecker <brobecker@gnat.com> | 2003-05-08 17:35:21 +0000 |
commit | da70980424047d7ff8c72b526d2a5ea2b6969b8d (patch) | |
tree | 3af807b021d0ff97758422255c01443e5c1edff5 | |
parent | a81d62fab52ad6c7ecfd0f743774235600a52f69 (diff) | |
download | gdb-da70980424047d7ff8c72b526d2a5ea2b6969b8d.tar.gz |
* defs.h (language): Add language_minimal enum value.
* c-lang.c (minimal_language_defn): New language definition.
(_initialize_c_language): Add the new minimal language to the list
of languages known to GDB.
-rw-r--r-- | gdb/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/c-lang.c | 37 | ||||
-rw-r--r-- | gdb/defs.h | 3 |
3 files changed, 46 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 00cfdaed94b..fd8cb1b75d4 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2003-05-08 J. Brobecker <brobecker@gnat.com> + + * defs.h (language): Add language_minimal enum value. + * c-lang.c (minimal_language_defn): New language definition. + (_initialize_c_language): Add the new minimal language to the list + of languages known to GDB. + 2003-05-08 Kevin Buettner <kevinb@redhat.com> * frame.c (get_frame_type): Don't attempt to lazily initialize diff --git a/gdb/c-lang.c b/gdb/c-lang.c index e492b9a205e..fbdf0054afa 100644 --- a/gdb/c-lang.c +++ b/gdb/c-lang.c @@ -651,10 +651,47 @@ const struct language_defn asm_language_defn = LANG_MAGIC }; +/* The following language_defn does not represent a real language. + It just provides a minimal support a-la-C that should allow users + to do some simple operations when debugging applications that use + a language currently not supported by GDB. */ + +const struct language_defn minimal_language_defn = +{ + "minimal", /* Language name */ + language_minimal, + c_builtin_types, + range_check_off, + type_check_off, + case_sensitive_on, + c_preprocess_and_parse, + c_error, + evaluate_subexp_standard, + c_printchar, /* Print a character constant */ + c_printstr, /* Function to print string constant */ + c_emit_char, /* Print a single char */ + c_create_fundamental_type, /* Create fundamental type in this language */ + c_print_type, /* Print a type using appropriate syntax */ + c_val_print, /* Print a value using appropriate syntax */ + c_value_print, /* Print a top-level value */ + NULL, /* Language specific skip_trampoline */ + NULL, /* Language specific symbol demangler */ + {"", "", "", ""}, /* Binary format info */ + {"0%lo", "0", "o", ""}, /* Octal format info */ + {"%ld", "", "d", ""}, /* Decimal format info */ + {"0x%lx", "0x", "x", ""}, /* Hex format info */ + c_op_print_tab, /* expression operators for printing */ + 1, /* c-style arrays */ + 0, /* String lower bound */ + &builtin_type_char, /* Type of string elements */ + LANG_MAGIC +}; + void _initialize_c_language (void) { add_language (&c_language_defn); add_language (&cplus_language_defn); add_language (&asm_language_defn); + add_language (&minimal_language_defn); } diff --git a/gdb/defs.h b/gdb/defs.h index 35d23df9caa..6024253a17a 100644 --- a/gdb/defs.h +++ b/gdb/defs.h @@ -211,7 +211,8 @@ enum language language_m2, /* Modula-2 */ language_asm, /* Assembly language */ language_scm, /* Scheme / Guile */ - language_pascal /* Pascal */ + language_pascal, /* Pascal */ + language_minimal /* All other languages, minimal support only */ }; enum precision_type |