* config/i386/tm-i386.h (PARM_BOUNDARY, CALL_DUMMY,

CALL_DUMMY_LENGTH, CALL_DUMMY_START_OFFSET,
CALL_DUMMY_BREAKPOINT_OFFSET, FIX_CALL_DUMMY): Remove defines.
(i386_fix_call_dummy): Remove prototype.
* i386-tdep.c (i386_call_dummy_words): New variable.
(i386_gdbarch_init): Adjust for removal of the
macros mentioned above.
This commit is contained in:
Mark Kettenis 2002-06-15 22:10:58 +00:00
parent e9e68a56bc
commit 8758dec1c5
3 changed files with 34 additions and 30 deletions

View File

@ -1,3 +1,13 @@
2002-06-16 Mark Kettenis <kettenis@gnu.org>
* config/i386/tm-i386.h (PARM_BOUNDARY, CALL_DUMMY,
CALL_DUMMY_LENGTH, CALL_DUMMY_START_OFFSET,
CALL_DUMMY_BREAKPOINT_OFFSET, FIX_CALL_DUMMY): Remove defines.
(i386_fix_call_dummy): Remove prototype.
* i386-tdep.c (i386_call_dummy_words): New variable.
(i386_gdbarch_init): Adjust for removal of the
macros mentioned above.
2002-06-15 Andrew Cagney <ac131313@redhat.com>
* command.h (add_setshow_auto_boolean_cmd): Replace

View File

@ -65,36 +65,6 @@ extern void i387_float_info (void);
#define FLOAT_INFO { i387_float_info (); }
/* Things needed for making the inferior call functions. */
/* "An argument's size is increased, if necessary, to make it a
multiple of [32 bit] words. This may require tail padding,
depending on the size of the argument" - from the x86 ABI. */
#define PARM_BOUNDARY 32
/* this is
* call 11223344 (32 bit relative)
* int3
*/
#define CALL_DUMMY { 0x223344e8, 0xcc11 }
#define CALL_DUMMY_LENGTH 8
#define CALL_DUMMY_START_OFFSET 0 /* Start execution at beginning of dummy */
#define CALL_DUMMY_BREAKPOINT_OFFSET 5
/* Insert the specified number of args and function address
into a call sequence of the above form stored at DUMMYNAME. */
#define FIX_CALL_DUMMY(dummyname, pc, fun, nargs, args, type, gcc_p) \
i386_fix_call_dummy (dummyname, pc, fun, nargs, args, type, gcc_p)
extern void i386_fix_call_dummy (char *dummy, CORE_ADDR pc, CORE_ADDR fun,
int nargs, struct value **args,
struct type *type, int gcc_p);
/* FIXME: kettenis/2000-06-12: These do not belong here. */
extern void print_387_control_word (unsigned int);
extern void print_387_status_word (unsigned int);

View File

@ -787,6 +787,19 @@ i386_push_dummy_frame (void)
write_register (FP_REGNUM, fp);
}
/* The i386 call dummy sequence:
call 11223344 (32-bit relative)
int 3
It is 8 bytes long. */
static LONGEST i386_call_dummy_words[] =
{
0x223344e8,
0xcc11
};
/* Insert the (relative) function address into the call sequence
stored at DYMMY. */
@ -1407,16 +1420,27 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* Call dummy code. */
set_gdbarch_call_dummy_location (gdbarch, ON_STACK);
set_gdbarch_call_dummy_start_offset (gdbarch, 0);
set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 5);
set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1);
set_gdbarch_call_dummy_length (gdbarch, 8);
set_gdbarch_call_dummy_p (gdbarch, 1);
set_gdbarch_call_dummy_words (gdbarch, i386_call_dummy_words);
set_gdbarch_sizeof_call_dummy_words (gdbarch,
sizeof (i386_call_dummy_words));
set_gdbarch_call_dummy_stack_adjust_p (gdbarch, 0);
set_gdbarch_fix_call_dummy (gdbarch, i386_fix_call_dummy);
set_gdbarch_get_saved_register (gdbarch, generic_get_saved_register);
set_gdbarch_push_arguments (gdbarch, i386_push_arguments);
set_gdbarch_pc_in_call_dummy (gdbarch, pc_in_call_dummy_on_stack);
/* "An argument's size is increased, if necessary, to make it a
multiple of [32-bit] words. This may require tail padding,
depending on the size of the argument" -- from the x86 ABI. */
set_gdbarch_parm_boundary (gdbarch, 32);
set_gdbarch_deprecated_extract_return_value (gdbarch,
i386_extract_return_value);
set_gdbarch_push_arguments (gdbarch, i386_push_arguments);