* gdbarch.sh (CALL_DUMMY_P): Delete.
* gdbarch.h, gdbarch.c: Re-generate.
* inferior.h (CALL_DUMMY_P): Delete macro.
* xstormy16-tdep.c (xstormy16_gdbarch_init): Update.
* vax-tdep.c (vax_gdbarch_init): Update.
* v850-tdep.c (v850_gdbarch_init): Update.
* sparc-tdep.c (sparc_gdbarch_init): Update.
* sh-tdep.c (sh_gdbarch_init): Update.
* s390-tdep.c (s390_gdbarch_init): Update.
* rs6000-tdep.c (rs6000_gdbarch_init): Update.
* ns32k-tdep.c (ns32k_gdbarch_init): Update.
* mn10300-tdep.c (mn10300_gdbarch_init): Update.
* mips-tdep.c (mips_gdbarch_init): Update.
* mcore-tdep.c (mcore_gdbarch_init): Update.
* m68k-tdep.c (m68k_gdbarch_init): Update.
* m68hc11-tdep.c (m68hc11_gdbarch_init): Update.
* ia64-tdep.c (ia64_gdbarch_init): Update.
* i386-tdep.c (i386_gdbarch_init): Update.
* h8300-tdep.c (h8300_gdbarch_init): Update.
* frv-tdep.c (frv_gdbarch_init): Update.
* d10v-tdep.c (d10v_gdbarch_init): Update.
* cris-tdep.c (cris_gdbarch_init): Update.
* breakpoint.c (deprecated_frame_in_dummy): Update.
* avr-tdep.c (avr_gdbarch_init): Update.
* alpha-tdep.c (alpha_gdbarch_init): Update.
* arm-tdep.c (arm_gdbarch_init): Update.
* dummy-frame.c (dummy_frame_this_id): Update comments.
* rs6000-tdep.c (rs6000_extract_struct_value_address): Ditto.
* frame.c (legacy_get_prev_frame): Ditto.
* valops.c (call_function_by_hand): Delete function.
(hand_function_call): Rename to call_function_by_hand
2003-03-31 Andrew Cagney <cagney@redhat.com>
* gdbint.texinfo (Target Architecture Definition): Delete
references to CALL_DUMMY_P.
+2003-03-31 Andrew Cagney <cagney@redhat.com>
+
+ * gdbarch.sh (CALL_DUMMY_P): Delete.
+ * gdbarch.h, gdbarch.c: Re-generate.
+ * inferior.h (CALL_DUMMY_P): Delete macro.
+ * xstormy16-tdep.c (xstormy16_gdbarch_init): Update.
+ * vax-tdep.c (vax_gdbarch_init): Update.
+ * v850-tdep.c (v850_gdbarch_init): Update.
+ * sparc-tdep.c (sparc_gdbarch_init): Update.
+ * sh-tdep.c (sh_gdbarch_init): Update.
+ * s390-tdep.c (s390_gdbarch_init): Update.
+ * rs6000-tdep.c (rs6000_gdbarch_init): Update.
+ * ns32k-tdep.c (ns32k_gdbarch_init): Update.
+ * mn10300-tdep.c (mn10300_gdbarch_init): Update.
+ * mips-tdep.c (mips_gdbarch_init): Update.
+ * mcore-tdep.c (mcore_gdbarch_init): Update.
+ * m68k-tdep.c (m68k_gdbarch_init): Update.
+ * m68hc11-tdep.c (m68hc11_gdbarch_init): Update.
+ * ia64-tdep.c (ia64_gdbarch_init): Update.
+ * i386-tdep.c (i386_gdbarch_init): Update.
+ * h8300-tdep.c (h8300_gdbarch_init): Update.
+ * frv-tdep.c (frv_gdbarch_init): Update.
+ * d10v-tdep.c (d10v_gdbarch_init): Update.
+ * cris-tdep.c (cris_gdbarch_init): Update.
+ * breakpoint.c (deprecated_frame_in_dummy): Update.
+ * avr-tdep.c (avr_gdbarch_init): Update.
+ * alpha-tdep.c (alpha_gdbarch_init): Update.
+ * arm-tdep.c (arm_gdbarch_init): Update.
+ * dummy-frame.c (dummy_frame_this_id): Update comments.
+ * rs6000-tdep.c (rs6000_extract_struct_value_address): Ditto.
+ * frame.c (legacy_get_prev_frame): Ditto.
+ * valops.c (call_function_by_hand): Delete function.
+ (hand_function_call): Rename to call_function_by_hand
+
2003-03-30 Andrew Cagney <cagney@redhat.com>
2002-11-10 Klee Dienes <kdienes@apple.com>
stopping the user call is achieved via a bp_call_dummy breakpoint.
But we need a fake CALL_DUMMY definition to enable the proper
call_function_by_hand and to avoid zero length array warnings. */
- set_gdbarch_call_dummy_p (gdbarch, 1);
set_gdbarch_call_dummy_words (gdbarch, alpha_call_dummy_words);
set_gdbarch_sizeof_call_dummy_words (gdbarch, 0);
set_gdbarch_frame_args_address (gdbarch, alpha_frame_args_address);
set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1);
set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0);
- set_gdbarch_call_dummy_p (gdbarch, 1);
-
set_gdbarch_call_dummy_words (gdbarch, arm_call_dummy_words);
set_gdbarch_sizeof_call_dummy_words (gdbarch, 0);
set_gdbarch_call_dummy_start_offset (gdbarch, 0);
set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1);
set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0);
set_gdbarch_call_dummy_length (gdbarch, 0);
- set_gdbarch_call_dummy_p (gdbarch, 1);
set_gdbarch_call_dummy_words (gdbarch, avr_call_dummy_words);
set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
{
struct breakpoint *b;
- if (!CALL_DUMMY_P)
- return 0;
-
/* This function is used by two files: get_frame_type(), after first
checking that !DEPRECATED_USE_GENERIC_DUMMY_FRAMES; and
sparc-tdep.c, which doesn't yet use generic dummy frames anyway. */
/* Defined to 1 to indicate that the target supports inferior function
calls. */
- set_gdbarch_call_dummy_p (gdbarch, 1);
set_gdbarch_call_dummy_words (gdbarch, 0);
set_gdbarch_sizeof_call_dummy_words (gdbarch, 0);
set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1);
set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0);
set_gdbarch_call_dummy_start_offset (gdbarch, 0);
- set_gdbarch_call_dummy_p (gdbarch, 1);
set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
set_gdbarch_extract_return_value (gdbarch, d10v_extract_return_value);
+2003-03-31 Andrew Cagney <cagney@redhat.com>
+
+ * gdbint.texinfo (Target Architecture Definition): Delete
+ references to CALL_DUMMY_P.
+
2003-03-30 Andrew Cagney <cagney@redhat.com>
* gdbint.texinfo (Target Architecture Definition): Remove
@code{BREAKPOINT_FROM_PC} needs to read the target's memory for some
reason.
-@item CALL_DUMMY_P
-@findex CALL_DUMMY_P
-A C expression that is non-zero when the target supports inferior function
-calls.
-
@item CALL_DUMMY_WORDS
@findex CALL_DUMMY_WORDS
Pointer to an array of @code{LONGEST} words of data containing
@item SIZEOF_CALL_DUMMY_WORDS
@findex SIZEOF_CALL_DUMMY_WORDS
-The size of @code{CALL_DUMMY_WORDS}. When @code{CALL_DUMMY_P} this must
-return a positive value. See also @code{CALL_DUMMY_LENGTH}.
+The size of @code{CALL_DUMMY_WORDS}. This must return a positive value.
+See also @code{CALL_DUMMY_LENGTH}.
@item CALL_DUMMY
@findex CALL_DUMMY
just asking for trouble. */
if (gdbarch_unwind_dummy_id_p (current_gdbarch))
{
- /* Assume hand_function_call(), via SAVE_DUMMY_FRAME_TOS,
+ /* Assume call_function_by_hand(), via SAVE_DUMMY_FRAME_TOS,
previously saved the dummy frame's ID. Things only work if
the two return the same value. */
gdb_assert (SAVE_DUMMY_FRAME_TOS_P ());
or some random address on the stack. Trying to use that
PC to apply standard frame ID unwind techniques is just
asking for trouble. */
- /* Assume hand_function_call(), via SAVE_DUMMY_FRAME_TOS,
+ /* Assume call_function_by_hand(), via SAVE_DUMMY_FRAME_TOS,
previously saved the dummy frame's ID. Things only work
if the two return the same value. */
gdb_assert (SAVE_DUMMY_FRAME_TOS_P ());
set_gdbarch_deprecated_push_return_address (gdbarch, frv_push_return_address);
set_gdbarch_deprecated_pop_frame (gdbarch, frv_pop_frame);
- set_gdbarch_call_dummy_p (gdbarch, 1);
set_gdbarch_call_dummy_words (gdbarch, frv_call_dummy_words);
set_gdbarch_sizeof_call_dummy_words (gdbarch, sizeof (frv_call_dummy_words));
set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1);
int call_dummy_breakpoint_offset_p;
int call_dummy_length;
gdbarch_deprecated_pc_in_call_dummy_ftype *deprecated_pc_in_call_dummy;
- int call_dummy_p;
LONGEST * call_dummy_words;
int sizeof_call_dummy_words;
int deprecated_call_dummy_stack_adjust;
0,
0,
0,
- 0,
generic_in_function_epilogue_p,
construct_inferior_arguments,
0,
current_gdbarch->call_dummy_breakpoint_offset_p = -1;
current_gdbarch->call_dummy_length = -1;
current_gdbarch->deprecated_pc_in_call_dummy = generic_pc_in_call_dummy;
- current_gdbarch->call_dummy_p = -1;
current_gdbarch->call_dummy_words = legacy_call_dummy_words;
current_gdbarch->sizeof_call_dummy_words = legacy_sizeof_call_dummy_words;
current_gdbarch->register_convertible = generic_register_convertible_not;
&& (gdbarch->call_dummy_length == -1))
fprintf_unfiltered (log, "\n\tcall_dummy_length");
/* Skip verify of deprecated_pc_in_call_dummy, has predicate */
- if ((GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL)
- && (gdbarch->call_dummy_p == -1))
- fprintf_unfiltered (log, "\n\tcall_dummy_p");
/* Skip verify of call_dummy_words, invalid_p == 0 */
/* Skip verify of sizeof_call_dummy_words, invalid_p == 0 */
/* Skip verify of deprecated_call_dummy_stack_adjust, has predicate */
"gdbarch_dump: CALL_DUMMY_LOCATION = %d\n",
CALL_DUMMY_LOCATION);
#endif
-#ifdef CALL_DUMMY_P
- fprintf_unfiltered (file,
- "gdbarch_dump: CALL_DUMMY_P # %s\n",
- XSTRING (CALL_DUMMY_P));
- fprintf_unfiltered (file,
- "gdbarch_dump: CALL_DUMMY_P = %d\n",
- CALL_DUMMY_P);
-#endif
#ifdef CALL_DUMMY_START_OFFSET
fprintf_unfiltered (file,
"gdbarch_dump: CALL_DUMMY_START_OFFSET # %s\n",
gdbarch->deprecated_pc_in_call_dummy = deprecated_pc_in_call_dummy;
}
-int
-gdbarch_call_dummy_p (struct gdbarch *gdbarch)
-{
- gdb_assert (gdbarch != NULL);
- if (gdbarch->call_dummy_p == -1)
- internal_error (__FILE__, __LINE__,
- "gdbarch: gdbarch_call_dummy_p invalid");
- if (gdbarch_debug >= 2)
- fprintf_unfiltered (gdb_stdlog, "gdbarch_call_dummy_p called\n");
- return gdbarch->call_dummy_p;
-}
-
-void
-set_gdbarch_call_dummy_p (struct gdbarch *gdbarch,
- int call_dummy_p)
-{
- gdbarch->call_dummy_p = call_dummy_p;
-}
-
LONGEST *
gdbarch_call_dummy_words (struct gdbarch *gdbarch)
{
#endif
#endif
-extern int gdbarch_call_dummy_p (struct gdbarch *gdbarch);
-extern void set_gdbarch_call_dummy_p (struct gdbarch *gdbarch, int call_dummy_p);
-#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_P)
-#error "Non multi-arch definition of CALL_DUMMY_P"
-#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL) || !defined (CALL_DUMMY_P)
-#define CALL_DUMMY_P (gdbarch_call_dummy_p (current_gdbarch))
-#endif
-#endif
-
/* Default (value) for non- multi-arch platforms. */
#if (!GDB_MULTI_ARCH) && !defined (CALL_DUMMY_WORDS)
#define CALL_DUMMY_WORDS (legacy_call_dummy_words)
# migration process - old code, calling DEPRECATED_PC_IN_CALL_DUMMY(),
# doesn't need to be modified.
F:1:DEPRECATED_PC_IN_CALL_DUMMY:int:deprecated_pc_in_call_dummy:CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR frame_address:pc, sp, frame_address::generic_pc_in_call_dummy:generic_pc_in_call_dummy
-v:1:CALL_DUMMY_P:int:call_dummy_p::::0:-1
v::CALL_DUMMY_WORDS:LONGEST *:call_dummy_words::::0:legacy_call_dummy_words::0:0x%08lx
v::SIZEOF_CALL_DUMMY_WORDS:int:sizeof_call_dummy_words::::0:legacy_sizeof_call_dummy_words::0
V:2:DEPRECATED_CALL_DUMMY_STACK_ADJUST:int:deprecated_call_dummy_stack_adjust::::0
set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0);
set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1);
set_gdbarch_call_dummy_length (gdbarch, 0);
- set_gdbarch_call_dummy_p (gdbarch, 1);
set_gdbarch_call_dummy_words (gdbarch, call_dummy_words);
set_gdbarch_sizeof_call_dummy_words (gdbarch, 0);
set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0);
set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1);
set_gdbarch_call_dummy_length (gdbarch, 0);
- set_gdbarch_call_dummy_p (gdbarch, 1);
set_gdbarch_call_dummy_words (gdbarch, NULL);
set_gdbarch_sizeof_call_dummy_words (gdbarch, 0);
set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
set_gdbarch_deprecated_push_return_address (gdbarch, ia64_push_return_address);
set_gdbarch_deprecated_pop_frame (gdbarch, ia64_pop_frame);
- set_gdbarch_call_dummy_p (gdbarch, 1);
set_gdbarch_call_dummy_words (gdbarch, ia64_call_dummy_words);
set_gdbarch_sizeof_call_dummy_words (gdbarch, sizeof (ia64_call_dummy_words));
set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1);
/* FIXME: cagney/2000-04-17: gdbarch should manage this. The default
shouldn't be necessary. */
-#if !defined (CALL_DUMMY_P)
-#if defined (CALL_DUMMY)
-#define CALL_DUMMY_P 1
-#else
-#define CALL_DUMMY_P 0
-#endif
-#endif
-
#if !defined PUSH_DUMMY_FRAME
#define PUSH_DUMMY_FRAME (internal_error (__FILE__, __LINE__, "PUSH_DUMMY_FRAME"), 0)
#endif
set_gdbarch_call_dummy_words (gdbarch, m68hc11_call_dummy_words);
set_gdbarch_sizeof_call_dummy_words (gdbarch,
sizeof (m68hc11_call_dummy_words));
- set_gdbarch_call_dummy_p (gdbarch, 1);
set_gdbarch_deprecated_get_saved_register (gdbarch, deprecated_generic_get_saved_register);
set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
set_gdbarch_deprecated_extract_return_value (gdbarch, m68hc11_extract_return_value);
set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1);
set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 24);
set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_on_stack);
- set_gdbarch_call_dummy_p (gdbarch, 1);
set_gdbarch_call_dummy_length (gdbarch, 28);
set_gdbarch_call_dummy_start_offset (gdbarch, 12);
/* Call Dummies: */
- set_gdbarch_call_dummy_p (gdbarch, 1);
set_gdbarch_call_dummy_words (gdbarch, call_dummy_words);
set_gdbarch_sizeof_call_dummy_words (gdbarch, 0);
set_gdbarch_call_dummy_start_offset (gdbarch, 0);
/* MIPS version of CALL_DUMMY */
- set_gdbarch_call_dummy_p (gdbarch, 1);
set_gdbarch_call_dummy_address (gdbarch, mips_call_dummy_address);
set_gdbarch_deprecated_push_return_address (gdbarch, mips_push_return_address);
set_gdbarch_deprecated_pop_frame (gdbarch, mips_pop_frame);
set_gdbarch_read_fp (gdbarch, generic_target_read_sp);
/* Calling functions in the inferior from GDB. */
- set_gdbarch_call_dummy_p (gdbarch, 1);
set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1);
set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0);
set_gdbarch_call_dummy_address (gdbarch, entry_point_address);
set_gdbarch_deprecated_push_dummy_frame (gdbarch, ns32k_push_dummy_frame);
set_gdbarch_deprecated_pop_frame (gdbarch, ns32k_pop_frame);
set_gdbarch_call_dummy_location (gdbarch, ON_STACK);
- set_gdbarch_call_dummy_p (gdbarch, 1);
set_gdbarch_call_dummy_words (gdbarch, ns32k_call_dummy_words);
set_gdbarch_sizeof_call_dummy_words (gdbarch, sizeof_ns32k_call_dummy_words);
set_gdbarch_fix_call_dummy (gdbarch, ns32k_fix_call_dummy);
/* FIXME: cagney/2002-09-26: PR gdb/724: When making an inferior
function call GDB knows the address of the struct return value
and hence, should not need to call this function. Unfortunately,
- the current hand_function_call() code only saves the most recent
- struct address leading to occasional calls. The code should
- instead maintain a stack of such addresses (in the dummy frame
- object). */
+ the current call_function_by_hand() code only saves the most
+ recent struct address leading to occasional calls. The code
+ should instead maintain a stack of such addresses (in the dummy
+ frame object). */
/* NOTE: cagney/2002-09-26: Return 0 which indicates that we've
really got no idea where the return value is being stored. While
r3, on function entry, contained the address it will have since
set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1);
set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0);
set_gdbarch_call_dummy_start_offset (gdbarch, 0);
- set_gdbarch_call_dummy_p (gdbarch, 1);
set_gdbarch_fix_call_dummy (gdbarch, rs6000_fix_call_dummy);
set_gdbarch_frame_align (gdbarch, rs6000_frame_align);
set_gdbarch_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos);
(gdbarch, generic_cannot_extract_struct_value_address);
/* Parameters for inferior function calls. */
- set_gdbarch_call_dummy_p (gdbarch, 1);
set_gdbarch_call_dummy_length (gdbarch, 0);
set_gdbarch_call_dummy_address (gdbarch, entry_point_address);
set_gdbarch_call_dummy_start_offset (gdbarch, 0);
set_gdbarch_call_dummy_start_offset (gdbarch, 0);
set_gdbarch_call_dummy_words (gdbarch, sh_call_dummy_words);
set_gdbarch_sizeof_call_dummy_words (gdbarch, sizeof (sh_call_dummy_words));
- set_gdbarch_call_dummy_p (gdbarch, 1);
set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
set_gdbarch_deprecated_push_return_address (gdbarch, sh_push_return_address);
set_gdbarch_believe_pcc_promotion (gdbarch, 1);
set_gdbarch_breakpoint_from_pc (gdbarch, memory_breakpoint_from_pc);
set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1);
- set_gdbarch_call_dummy_p (gdbarch, 1);
set_gdbarch_decr_pc_after_break (gdbarch, 0);
set_gdbarch_double_bit (gdbarch, 8 * TARGET_CHAR_BIT);
set_gdbarch_deprecated_extract_struct_value_address (gdbarch, sparc_extract_struct_value_address);
set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0);
set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1);
set_gdbarch_call_dummy_length (gdbarch, 0);
- set_gdbarch_call_dummy_p (gdbarch, 1);
set_gdbarch_call_dummy_words (gdbarch, call_dummy_nil);
set_gdbarch_sizeof_call_dummy_words (gdbarch, 0);
set_gdbarch_fix_call_dummy (gdbarch, v850_fix_call_dummy);
ARGS is modified to contain coerced values. */
-static struct value *
-hand_function_call (struct value *function, int nargs, struct value **args)
+struct value *
+call_function_by_hand (struct value *function, int nargs, struct value **args)
{
register CORE_ADDR sp;
register int i;
}
}
-struct value *
-call_function_by_hand (struct value *function, int nargs, struct value **args)
-{
- if (CALL_DUMMY_P)
- {
- return hand_function_call (function, nargs, args);
- }
- else
- {
- error ("Cannot invoke functions on this machine.");
- }
-}
-\f
-
-
/* Create a value for an array by allocating space in the inferior, copying
the data into that space, and then setting up an array value.
set_gdbarch_deprecated_push_dummy_frame (gdbarch, vax_push_dummy_frame);
set_gdbarch_deprecated_pop_frame (gdbarch, vax_pop_frame);
set_gdbarch_call_dummy_location (gdbarch, ON_STACK);
- set_gdbarch_call_dummy_p (gdbarch, 1);
set_gdbarch_call_dummy_words (gdbarch, vax_call_dummy_words);
set_gdbarch_sizeof_call_dummy_words (gdbarch, sizeof_vax_call_dummy_words);
set_gdbarch_fix_call_dummy (gdbarch, vax_fix_call_dummy);
set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0);
set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1);
set_gdbarch_call_dummy_length (gdbarch, 0);
- set_gdbarch_call_dummy_p (gdbarch, 1);
set_gdbarch_call_dummy_words (gdbarch, call_dummy_words);
set_gdbarch_sizeof_call_dummy_words (gdbarch, 0);
set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);