From: Andrew Cagney Date: Sun, 10 Feb 2002 05:50:34 +0000 (+0000) Subject: * valops.c (PUSH_ARGUMENTS): Delete definition. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c203844d97c1b8ac317a9ef79f06f2261eda6594;p=binutils-gdb.git * valops.c (PUSH_ARGUMENTS): Delete definition. * gdbarch.sh (PUSH_ARGUMENTS): Don't require when multi-arch partial. Default to default_push_arguments. * gdbarch.h, gdbarch.c: Regenerate. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 4a3ae393ea7..5effe2f2bd7 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2002-02-10 Andrew Cagney + + * valops.c (PUSH_ARGUMENTS): Delete definition. + * gdbarch.sh (PUSH_ARGUMENTS): Don't require when multi-arch + partial. Default to default_push_arguments. + * gdbarch.h, gdbarch.c: Regenerate. + 2002-02-09 Andrew Cagney * defs.h (throw_exception): Rename return_to_top_level. Update diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index 1493c00cf83..96f10dd9b6c 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -693,9 +693,8 @@ verify_gdbarch (struct gdbarch *gdbarch) if ((GDB_MULTI_ARCH >= 2) && (gdbarch->extract_return_value == 0)) fprintf_unfiltered (log, "\n\textract_return_value"); - if ((GDB_MULTI_ARCH >= 1) - && (gdbarch->push_arguments == 0)) - fprintf_unfiltered (log, "\n\tpush_arguments"); + if (gdbarch->push_arguments == 0) + gdbarch->push_arguments = default_push_arguments; if ((GDB_MULTI_ARCH >= 2) && (gdbarch->push_dummy_frame == 0)) fprintf_unfiltered (log, "\n\tpush_dummy_frame"); diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h index f03882ad76c..7a1fa804d44 100644 --- a/gdb/gdbarch.h +++ b/gdb/gdbarch.h @@ -1368,6 +1368,11 @@ extern void set_gdbarch_extract_return_value (struct gdbarch *gdbarch, gdbarch_e #endif #endif +/* Default (function) for non- multi-arch platforms. */ +#if (!GDB_MULTI_ARCH) && !defined (PUSH_ARGUMENTS) +#define PUSH_ARGUMENTS(nargs, args, sp, struct_return, struct_addr) (default_push_arguments (nargs, args, sp, struct_return, struct_addr)) +#endif + typedef CORE_ADDR (gdbarch_push_arguments_ftype) (int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr); extern CORE_ADDR gdbarch_push_arguments (struct gdbarch *gdbarch, int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr); extern void set_gdbarch_push_arguments (struct gdbarch *gdbarch, gdbarch_push_arguments_ftype *push_arguments); diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh index 12c84745bc8..7409508000b 100755 --- a/gdb/gdbarch.sh +++ b/gdb/gdbarch.sh @@ -498,7 +498,7 @@ F:2:INTEGER_TO_ADDRESS:CORE_ADDR:integer_to_address:struct type *type, void *buf # f:2:RETURN_VALUE_ON_STACK:int:return_value_on_stack:struct type *type:type:::generic_return_value_on_stack_not::0 f:2:EXTRACT_RETURN_VALUE:void:extract_return_value:struct type *type, char *regbuf, char *valbuf:type, regbuf, valbuf::0:0 -f:1:PUSH_ARGUMENTS:CORE_ADDR:push_arguments:int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr:nargs, args, sp, struct_return, struct_addr::0:0 +f:2:PUSH_ARGUMENTS:CORE_ADDR:push_arguments:int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr:nargs, args, sp, struct_return, struct_addr::::default_push_arguments f:2:PUSH_DUMMY_FRAME:void:push_dummy_frame:void:-:::0 F:1:PUSH_RETURN_ADDRESS:CORE_ADDR:push_return_address:CORE_ADDR pc, CORE_ADDR sp:pc, sp:::0 f:2:POP_FRAME:void:pop_frame:void:-:::0 diff --git a/gdb/valops.c b/gdb/valops.c index 6f7e25141d6..748ba8fee08 100644 --- a/gdb/valops.c +++ b/gdb/valops.c @@ -1078,10 +1078,6 @@ value_push (register CORE_ADDR sp, struct value *arg) return sp; } -#ifndef PUSH_ARGUMENTS -#define PUSH_ARGUMENTS default_push_arguments -#endif - CORE_ADDR default_push_arguments (int nargs, struct value **args, CORE_ADDR sp, int struct_return, CORE_ADDR struct_addr)