aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Buettner <kevinb@redhat.com>2003-02-03 20:35:44 +0000
committerKevin Buettner <kevinb@redhat.com>2003-02-03 20:35:44 +0000
commitffc65945ba8548a7668003732ba1486d0aa40a81 (patch)
tree603a647a830911a82b30048c68c05f16663b754b
parentf211c6d462e551d77447d6af2ba10fc3c08998e5 (diff)
downloadgdb-ffc65945ba8548a7668003732ba1486d0aa40a81.zip
gdb-ffc65945ba8548a7668003732ba1486d0aa40a81.tar.gz
gdb-ffc65945ba8548a7668003732ba1486d0aa40a81.tar.bz2
* s390-tdep.c (s390_address_class_type_flags)
(s390_address_class_type_flags_to_name) (s390_address_class_name_to_type_flags): New functions. (s390_gdbarch_init): Define ADDRESS_CLASS_TYPE_FLAGS_TO_NAME, ADDRESS_CLASS_NAME_TO_TYPE_FLAGS, and ADDRESS_CLASS_TYPE_FLAGS.
-rw-r--r--gdb/ChangeLog8
-rw-r--r--gdb/s390-tdep.c37
2 files changed, 45 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 2cbbc2a..d34e4fb 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,11 @@
+2003-02-03 Kevin Buettner <kevinb@redhat.com>
+
+ * s390-tdep.c (s390_address_class_type_flags)
+ (s390_address_class_type_flags_to_name)
+ (s390_address_class_name_to_type_flags): New functions.
+ (s390_gdbarch_init): Define ADDRESS_CLASS_TYPE_FLAGS_TO_NAME,
+ ADDRESS_CLASS_NAME_TO_TYPE_FLAGS, and ADDRESS_CLASS_TYPE_FLAGS.
+
2003-02-03 Michael Snyder <msnyder@redhat.com>
* arm-tdep.c: Fix spell-o in comment.
diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c
index c313532..21efca8 100644
--- a/gdb/s390-tdep.c
+++ b/gdb/s390-tdep.c
@@ -1748,6 +1748,37 @@ s390_push_return_address (CORE_ADDR pc, CORE_ADDR sp)
return sp;
}
+static int
+s390_address_class_type_flags (int byte_size, int dwarf2_addr_class)
+{
+ if (byte_size == 4)
+ return TYPE_FLAG_ADDRESS_CLASS_1;
+ else
+ return 0;
+}
+
+static const char *
+s390_address_class_type_flags_to_name (struct gdbarch *gdbarch, int type_flags)
+{
+ if (type_flags & TYPE_FLAG_ADDRESS_CLASS_1)
+ return "mode32";
+ else
+ return NULL;
+}
+
+int
+s390_address_class_name_to_type_flags (struct gdbarch *gdbarch, const char *name,
+ int *type_flags_ptr)
+{
+ if (strcmp (name, "mode32") == 0)
+ {
+ *type_flags_ptr = TYPE_FLAG_ADDRESS_CLASS_1;
+ return 1;
+ }
+ else
+ return 0;
+}
+
struct gdbarch *
s390_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
{
@@ -1869,6 +1900,12 @@ s390_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_long_long_bit (gdbarch, 64);
set_gdbarch_ptr_bit (gdbarch, 64);
set_gdbarch_register_bytes (gdbarch, S390X_REGISTER_BYTES);
+ set_gdbarch_address_class_type_flags (gdbarch,
+ s390_address_class_type_flags);
+ set_gdbarch_address_class_type_flags_to_name (gdbarch,
+ s390_address_class_type_flags_to_name);
+ set_gdbarch_address_class_name_to_type_flags (gdbarch,
+ s390_address_class_name_to_type_flags);
break;
}