From 86884b3733ff6a828afe732e7b43ce23c5d0ea6b Mon Sep 17 00:00:00 2001 From: Michael Snyder Date: Thu, 15 Nov 2001 02:18:46 +0000 Subject: [PATCH] 2001-11-14 Michael Snyder * d10v-tdep.c (d10v_pointer_to_address): Use new type flag TYPE_FLAG_CODE_SPACE to recognize a pointer that has been cast into the instruction address space. * Makefile.in (doublest.o): Add dependency on gdbtypes.h. --- gdb/ChangeLog | 7 +++++++ gdb/d10v-tdep.c | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 9a60f6af65f..fc02819e8b5 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2001-11-14 Michael Snyder + + * d10v-tdep.c (d10v_pointer_to_address): Use new type flag + TYPE_FLAG_CODE_SPACE to recognize a pointer that has been cast + into the instruction address space. + * Makefile.in (doublest.o): Add dependency on gdbtypes.h. + 2001-11-14 Michael Snyder Add address space identifiers to expression language for types. * c-exp.y (space_identifier, cv_with_space_id, diff --git a/gdb/d10v-tdep.c b/gdb/d10v-tdep.c index e9c926995b0..fb4c635330f 100644 --- a/gdb/d10v-tdep.c +++ b/gdb/d10v-tdep.c @@ -413,7 +413,8 @@ d10v_pointer_to_address (struct type *type, void *buf) /* Is it a code address? */ if (TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_FUNC - || TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_METHOD) + || TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_METHOD || + (TYPE_FLAGS (TYPE_TARGET_TYPE (type)) & TYPE_FLAG_CODE_SPACE) != 0) return d10v_make_iaddr (addr); else return d10v_make_daddr (addr); -- 2.30.2