summaryrefslogtreecommitdiff
path: root/gdb/language.h
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2004-07-28 02:46:24 +0000
committerAndrew Cagney <cagney@redhat.com>2004-07-28 02:46:24 +0000
commitb24c0b75d70c257d401db7b01b1bfebb0aaca9ed (patch)
treeb0135cce4649af9d4d30885d0c3dfdc0e931ce65 /gdb/language.h
parentd24791018e9b053ec43820b7fdb30ace85265ace (diff)
downloadgdb-b24c0b75d70c257d401db7b01b1bfebb0aaca9ed.tar.gz
2004-07-27 Andrew Cagney <cagney@gnu.org>
* defs.h (enum language): Add nr_languages. * language.h (struct language_arch_info): Define. (struct language_defn): Add la_language_arch_info. (language_lookup_primative_type_by_name): Declare. (language_string_char_type): Declare. * language.c (_initialize_language, language_gdbarch_post_init) (struct language_gdbarch, language_gdbarch_data): Implement per-architecture language information. (unknown_language_arch_info, language_string_char_type) (language_lookup_primative_type_by_name): New functions. (unknown_language_defn, auto_language_defn) (local_language_defn): Set la_language_arch_info to unknown_language_arch_info. (unknown_builtin_types): Delete. * gdbtypes.c (lookup_primitive_typename): Use language_lookup_primative_type_by_name. (create_string_type): Use language_string_char_type. * values.c (value_from_string): Use language_string_char_type. * scm-lang.c (scm_language_defn): Add NULL la_language_arch_info. * p-lang.c (pascal_language_defn): Ditto. * m2-lang.c (m2_language_defn): Ditto. * jv-lang.c (java_language_defn): Ditto. * objc-lang.c (objc_language_defn): Ditto. * f-lang.c (f_language_defn): Ditto. * c-lang.c (c_language_defn, cplus_language_defn) (asm_language_defn, minimal_language_defn): Ditto.
Diffstat (limited to 'gdb/language.h')
-rw-r--r--gdb/language.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/gdb/language.h b/gdb/language.h
index bbb45f6c7b8..511c1cbe0ea 100644
--- a/gdb/language.h
+++ b/gdb/language.h
@@ -137,6 +137,26 @@ struct language_format_info
char *la_format_suffix; /* Suffix for custom format string */
};
+/* Per architecture (OS/ABI) language information. */
+
+struct language_arch_info
+{
+ /* Its primative types. This is a vector ended by a NULL pointer.
+ These types can be specified by name in parsing types in
+ expressions, regardless of whether the program being debugged
+ actually defines such a type. */
+ struct type **primative_type_vector;
+ /* Type of elements of strings. */
+ struct type *string_char_type;
+};
+
+struct type *language_string_char_type (const struct language_defn *l,
+ struct gdbarch *gdbarch);
+
+struct type *language_lookup_primative_type_by_name (const struct language_defn *l,
+ struct gdbarch *gdbarch,
+ const char *name);
+
/* Structure tying together assorted information about a language. */
struct language_defn
@@ -284,6 +304,10 @@ struct language_defn
/* The list of characters forming word boundaries. */
char *(*la_word_break_characters) (void);
+ /* The per-architecture (OS/ABI) language information. */
+ void (*la_language_arch_info) (struct gdbarch *,
+ struct language_arch_info *);
+
/* Add fields above this point, so the magic number is always last. */
/* Magic number for compat checking */