aboutsummaryrefslogtreecommitdiff
path: root/gdb/avr-tdep.c
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/avr-tdep.c
parentae438bc5c06b770c00f37e4ed244707ce3ab9ff4 (diff)
downloadgdb-88dfca6c43c11dea69db24cfb87e6821e63e29b2.zip
gdb-88dfca6c43c11dea69db24cfb87e6821e63e29b2.tar.gz
gdb-88dfca6c43c11dea69db24cfb87e6821e63e29b2.tar.bz2
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/avr-tdep.c')
-rw-r--r--gdb/avr-tdep.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gdb/avr-tdep.c b/gdb/avr-tdep.c
index f6f43a0..c5f32a6 100644
--- a/gdb/avr-tdep.c
+++ b/gdb/avr-tdep.c
@@ -1466,9 +1466,8 @@ avr_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
be defined. */
tdep->void_type = arch_type (gdbarch, TYPE_CODE_VOID, 1, "void");
tdep->func_void_type = make_function_type (tdep->void_type, NULL);
- tdep->pc_type = arch_type (gdbarch, TYPE_CODE_PTR, 4, NULL);
- TYPE_TARGET_TYPE (tdep->pc_type) = tdep->func_void_type;
- TYPE_UNSIGNED (tdep->pc_type) = 1;
+ tdep->pc_type = arch_pointer_type (gdbarch, 4 * TARGET_CHAR_BIT, NULL,
+ tdep->func_void_type);
set_gdbarch_short_bit (gdbarch, 2 * TARGET_CHAR_BIT);
set_gdbarch_int_bit (gdbarch, 2 * TARGET_CHAR_BIT);