aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2002-06-15 22:10:58 +0000
committerMark Kettenis <kettenis@gnu.org>2002-06-15 22:10:58 +0000
commit8758dec1c5c5119a4f9cb59da8375596f0314f94 (patch)
tree0251a61630b6be0fd717074256271df878ed0a91
parente9e68a56bc8f22dd3234810e0b39edfeb81f81f4 (diff)
downloadgdb-8758dec1c5c5119a4f9cb59da8375596f0314f94.zip
gdb-8758dec1c5c5119a4f9cb59da8375596f0314f94.tar.gz
gdb-8758dec1c5c5119a4f9cb59da8375596f0314f94.tar.bz2
* 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.
-rw-r--r--gdb/ChangeLog10
-rw-r--r--gdb/config/i386/tm-i386.h30
-rw-r--r--gdb/i386-tdep.c24
3 files changed, 34 insertions, 30 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 5e50b0f..725ae61 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -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
diff --git a/gdb/config/i386/tm-i386.h b/gdb/config/i386/tm-i386.h
index ad292f5..74c465e 100644
--- a/gdb/config/i386/tm-i386.h
+++ b/gdb/config/i386/tm-i386.h
@@ -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);
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
index 00a01bd..41c565d 100644
--- a/gdb/i386-tdep.c
+++ b/gdb/i386-tdep.c
@@ -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);