aboutsummaryrefslogtreecommitdiff
path: root/gdb/values.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>1998-11-23 12:35:23 +0000
committerAndrew Cagney <cagney@redhat.com>1998-11-23 12:35:23 +0000
commit98760eab33f4963e075077cb094f9f195ca33d01 (patch)
tree60590f385f7cdd40ccf6ce14fa0437140b19686a /gdb/values.c
parent554eb429e4555ceaa7892a8ab93c7a41045a6824 (diff)
downloadgdb-98760eab33f4963e075077cb094f9f195ca33d01.zip
gdb-98760eab33f4963e075077cb094f9f195ca33d01.tar.gz
gdb-98760eab33f4963e075077cb094f9f195ca33d01.tar.bz2
CARP: Convert macro definitions of USE_STRUCT_CONVENTION into target
specific functions.
Diffstat (limited to 'gdb/values.c')
-rw-r--r--gdb/values.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/gdb/values.c b/gdb/values.c
index efa6f40..db6f204 100644
--- a/gdb/values.c
+++ b/gdb/values.c
@@ -1381,14 +1381,21 @@ value_being_returned (valtype, retbuf, struct_return)
2.0-2.3.3. This is somewhat unfortunate, but changing gcc2_compiled
would cause more chaos than dealing with some struct returns being
handled wrong. */
-#if !defined (USE_STRUCT_CONVENTION)
-#define USE_STRUCT_CONVENTION(gcc_p, type)\
- (!((gcc_p == 1) && (TYPE_LENGTH (value_type) == 1 \
- || TYPE_LENGTH (value_type) == 2 \
- || TYPE_LENGTH (value_type) == 4 \
- || TYPE_LENGTH (value_type) == 8 \
- ) \
- ))
+
+int
+generic_use_struct_convention (gcc_p, value_type)
+ int gcc_p;
+ struct type *value_type;
+{
+ return !((gcc_p == 1)
+ && (TYPE_LENGTH (value_type) == 1
+ || TYPE_LENGTH (value_type) == 2
+ || TYPE_LENGTH (value_type) == 4
+ || TYPE_LENGTH (value_type) == 8));
+}
+
+#ifndef USE_STRUCT_CONVENTION
+#define USE_STRUCT_CONVENTION(gcc_p,type) generic_use_struct_convention (gcc_p, type)
#endif
/* Some fundamental types (such as long double) are returned on the stack for