aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Weigand <ulrich.weigand@de.ibm.com>2016-09-06 17:26:32 +0200
committerUlrich Weigand <ulrich.weigand@de.ibm.com>2016-09-06 17:26:32 +0200
commit88dfca6c43c11dea69db24cfb87e6821e63e29b2 (patch)
tree0efdcd0b229d16125cbf2423247685231a9bba28 /gdb/gdbtypes.h
parentFix TYPE_SPECIFIC_FIELD for types created via arch_type (diff)
downloadbinutils-gdb-88dfca6c43c11dea69db24cfb87e6821e63e29b2.tar.gz
binutils-gdb-88dfca6c43c11dea69db24cfb87e6821e63e29b2.tar.bz2
binutils-gdb-88dfca6c43c11dea69db24cfb87e6821e63e29b2.zip
Add some missing arch_..._type helpers
gdbtypes provides a number of helper routines that can be called instead of using arch_type directly to create a type of a particular kind. This patch adds two additional such routines that have been missing so far, to allow creation of TYPE_CODE_DECFLOAT and TYPE_CODE_POINTER types. The patch also changes a number of places to use the new helper routines instead of calling arch_type directly. No functional change intended. gdb/ChangeLog: * gdbtypes.h (arch_decfloat_type): New prototype. (arch_pointer_type): Likewise. * gdbtypes.c (arch_decfloat_type): New function. (arch_pointer_type): Likewise. (gdbtypes_post_init): Use arch_decfloat_type. * avr-tdep.c (avr_gdbarch_init): Use arch_pointer_type. * ft32-tdep.c (ft32_gdbarch_init): Likewise. * m32c-tdep.c (make_types): Likewise. * rl78-tdep.c (rl78_gdbarch_init): Likewise. Signed-off-by: Ulrich Weigand <ulrich.weigand@de.ibm.com>
Diffstat (limited to 'gdb/gdbtypes.h')
-rw-r--r--gdb/gdbtypes.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/gdb/gdbtypes.h b/gdb/gdbtypes.h
index 2dda074d737..579a34bc00e 100644
--- a/gdb/gdbtypes.h
+++ b/gdb/gdbtypes.h
@@ -1686,8 +1686,11 @@ extern struct type *arch_boolean_type (struct gdbarch *, int, int,
const char *);
extern struct type *arch_float_type (struct gdbarch *, int, const char *,
const struct floatformat **);
+extern struct type *arch_decfloat_type (struct gdbarch *, int, const char *);
extern struct type *arch_complex_type (struct gdbarch *, const char *,
struct type *);
+extern struct type *arch_pointer_type (struct gdbarch *, int, const char *,
+ struct type *);
/* Helper functions to construct a struct or record type. An
initially empty type is created using arch_composite_type().