aboutsummaryrefslogtreecommitdiff
path: root/gdb/language.h
diff options
context:
space:
mode:
authorUlrich Weigand <uweigand@de.ibm.com>2008-09-11 14:11:40 +0000
committerUlrich Weigand <uweigand@de.ibm.com>2008-09-11 14:11:40 +0000
commitfbb06eb1ba120adde645d64133f5a9bbf2d62ec7 (patch)
tree2dc42cd0011089aeca55de8bb8dfa2da1ff77dca /gdb/language.h
parentde7b6b470188ff9f2b8fcfd831d98f8807fdf6c8 (diff)
downloadgdb-fbb06eb1ba120adde645d64133f5a9bbf2d62ec7.zip
gdb-fbb06eb1ba120adde645d64133f5a9bbf2d62ec7.tar.gz
gdb-fbb06eb1ba120adde645d64133f5a9bbf2d62ec7.tar.bz2
* language.h (struct language_arch_info): New members
bool_type_default and bool_type_symbol. (lang_bool_type): Remove prototype. (LA_BOOL_TYPE): Remove macro. (language_bool_type): Add prototype. * language.c (lang_bool_type): Remove. (language_bool_type): New function. * value.h (value_in): Change return value to int. * value.c (value_in): Return int instead of struct value *. * eval.c (evaluate_subexp_standard): Call language_bool_type instead of using LA_BOOL_TYPE. Update call to value_in. * ada-lang.c (ada_evaluate_subexp): Call language_bool_type instead of using LA_BOOL_TYPE or builtin_type_int for boolean values. * language.c (unknown_language_arch_info): Set bool_type_default member of struct language_arch_info. * ada-lang.c (ada_language_arch_info): Set bool_type_symbol and bool_type_default members of struct language_arch_info. * c-lang.c (c_language_arch_info): Set bool_type_default member of struct language_arch_info. (cplus_language_arch_info): Set bool_type_symbol and bool_type_default members of struct language_arch_info. * f-lang.c (f_language_arch_info): Set bool_type_symbol and bool_type_default members of struct language_arch_info. * jv-lang.c (java_language_arch_info): Set bool_type_symbol and bool_type_default members of struct language_arch_info. * m2-lang.c (m2_language_arch_info): Set bool_type_symbol and bool_type_default members of struct language_arch_info. * p-lang.c (p_language_arch_info): Set bool_type_symbol and bool_type_default members of struct language_arch_info.
Diffstat (limited to 'gdb/language.h')
-rw-r--r--gdb/language.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/gdb/language.h b/gdb/language.h
index 8bdc212..04d4da2 100644
--- a/gdb/language.h
+++ b/gdb/language.h
@@ -125,6 +125,11 @@ struct language_arch_info
struct type **primitive_type_vector;
/* Type of elements of strings. */
struct type *string_char_type;
+
+ /* Symbol name of type to use as boolean type, if defined. */
+ const char *bool_type_symbol;
+ /* Otherwise, this is the default boolean builtin type. */
+ struct type *bool_type_default;
};
/* Structure tying together assorted information about a language. */
@@ -306,6 +311,9 @@ extern enum language_mode
}
language_mode;
+struct type *language_bool_type (const struct language_defn *l,
+ struct gdbarch *gdbarch);
+
struct type *language_string_char_type (const struct language_defn *l,
struct gdbarch *gdbarch);
@@ -416,11 +424,6 @@ extern void range_error (const char *, ...) ATTR_FORMAT (printf, 1, 2);
extern int value_true (struct value *);
-extern struct type *lang_bool_type (void);
-
-/* The type used for Boolean values in the current language. */
-#define LA_BOOL_TYPE lang_bool_type ()
-
/* Misc: The string representing a particular enum language. */
extern enum language language_enum (char *str);