aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2001-11-07 22:42:29 +0000
committerAndrew Cagney <cagney@redhat.com>2001-11-07 22:42:29 +0000
commit56f127518feeed8b7576b176a0d3b0f4ff3d7ca1 (patch)
tree663acee6e62f4055401bebb5161a7ef16162a187
parent2b0f7ef92ee30445837f86ca0149ec6c6c01dc93 (diff)
downloadgdb-56f127518feeed8b7576b176a0d3b0f4ff3d7ca1.zip
gdb-56f127518feeed8b7576b176a0d3b0f4ff3d7ca1.tar.gz
gdb-56f127518feeed8b7576b176a0d3b0f4ff3d7ca1.tar.bz2
gdbarch.sh provides default for USE_STRUCT_CONVENTION.
-rw-r--r--gdb/ChangeLog8
-rw-r--r--gdb/gdbarch.c5
-rw-r--r--gdb/gdbarch.h5
-rwxr-xr-xgdb/gdbarch.sh2
-rw-r--r--gdb/values.c5
5 files changed, 16 insertions, 9 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 5123cfd..0cd341d 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,11 @@
+2001-11-07 Andrew Cagney <ac131313@redhat.com>
+
+ * gdbarch.sh (USE_STRUCT_CONVENTION): Default to
+ generic_use_struct_convention.
+ * gdbarch.h, gdbarch.c: Regenerate.
+ * values.c (USE_STRUCT_CONVENTION): Delete definition, moved to
+ gdbarch.h.
+
2001-11-06 Andrew Cagney <ac131313@redhat.com>
* gdbarch.sh (PC_IN_CALL_DUMMY): Require a value.
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index 65d18d2..ee4512e 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -486,6 +486,7 @@ gdbarch_alloc (const struct gdbarch_info *info,
current_gdbarch->pointer_to_address = unsigned_pointer_to_address;
current_gdbarch->address_to_pointer = unsigned_address_to_pointer;
current_gdbarch->return_value_on_stack = generic_return_value_on_stack_not;
+ current_gdbarch->use_struct_convention = generic_use_struct_convention;
current_gdbarch->prologue_frameless_p = generic_prologue_frameless_p;
current_gdbarch->breakpoint_from_pc = legacy_breakpoint_from_pc;
current_gdbarch->memory_insert_breakpoint = default_memory_insert_breakpoint;
@@ -689,9 +690,7 @@ verify_gdbarch (struct gdbarch *gdbarch)
&& (gdbarch->store_return_value == 0))
fprintf_unfiltered (log, "\n\tstore_return_value");
/* Skip verify of extract_struct_value_address, has predicate */
- if ((GDB_MULTI_ARCH >= 2)
- && (gdbarch->use_struct_convention == 0))
- fprintf_unfiltered (log, "\n\tuse_struct_convention");
+ /* Skip verify of use_struct_convention, invalid_p == 0 */
if ((GDB_MULTI_ARCH >= 2)
&& (gdbarch->frame_init_saved_regs == 0))
fprintf_unfiltered (log, "\n\tframe_init_saved_regs");
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index 2ed6b21..c639476 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -1442,6 +1442,11 @@ extern void set_gdbarch_extract_struct_value_address (struct gdbarch *gdbarch, g
#endif
#endif
+/* Default (function) for non- multi-arch platforms. */
+#if (!GDB_MULTI_ARCH) && !defined (USE_STRUCT_CONVENTION)
+#define USE_STRUCT_CONVENTION(gcc_p, value_type) (generic_use_struct_convention (gcc_p, value_type))
+#endif
+
typedef int (gdbarch_use_struct_convention_ftype) (int gcc_p, struct type *value_type);
extern int gdbarch_use_struct_convention (struct gdbarch *gdbarch, int gcc_p, struct type *value_type);
extern void set_gdbarch_use_struct_convention (struct gdbarch *gdbarch, gdbarch_use_struct_convention_ftype *use_struct_convention);
diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh
index 85e94af..e469460 100755
--- a/gdb/gdbarch.sh
+++ b/gdb/gdbarch.sh
@@ -484,7 +484,7 @@ f:2:POP_FRAME:void:pop_frame:void:-:::0
f:2:STORE_STRUCT_RETURN:void:store_struct_return:CORE_ADDR addr, CORE_ADDR sp:addr, sp:::0
f:2:STORE_RETURN_VALUE:void:store_return_value:struct type *type, char *valbuf:type, valbuf:::0
F:2:EXTRACT_STRUCT_VALUE_ADDRESS:CORE_ADDR:extract_struct_value_address:char *regbuf:regbuf:::0
-f:2:USE_STRUCT_CONVENTION:int:use_struct_convention:int gcc_p, struct type *value_type:gcc_p, value_type:::0
+f:2:USE_STRUCT_CONVENTION:int:use_struct_convention:int gcc_p, struct type *value_type:gcc_p, value_type:::generic_use_struct_convention::0
#
f:2:FRAME_INIT_SAVED_REGS:void:frame_init_saved_regs:struct frame_info *frame:frame::0:0
F:2:INIT_EXTRA_FRAME_INFO:void:init_extra_frame_info:int fromleaf, struct frame_info *frame:fromleaf, frame:::0
diff --git a/gdb/values.c b/gdb/values.c
index eedeaf9..639f7bf 100644
--- a/gdb/values.c
+++ b/gdb/values.c
@@ -1382,11 +1382,6 @@ generic_use_struct_convention (int gcc_p, struct type *value_type)
|| TYPE_LENGTH (value_type) == 8));
}
-#ifndef USE_STRUCT_CONVENTION
-#define USE_STRUCT_CONVENTION(gcc_p,type) generic_use_struct_convention (gcc_p, type)
-#endif
-
-
/* Return true if the function specified is using the structure returning
convention on this machine to return arguments, or 0 if it is using
the value returning convention. FUNCTION is the value representing