+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.
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;
&& (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");
#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);
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
|| 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