aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2003-03-31 21:58:23 +0000
committerAndrew Cagney <cagney@redhat.com>2003-03-31 21:58:23 +0000
commite9a2674e1d04f307ae4ffb7e4571c9878f63ff66 (patch)
treef1279778d8ff7f07428a43dda8c9448284dcba4e
parent566b0d53de10b751449ab26f6d8f905cbe4f3a27 (diff)
downloadgdb-e9a2674e1d04f307ae4ffb7e4571c9878f63ff66.zip
gdb-e9a2674e1d04f307ae4ffb7e4571c9878f63ff66.tar.gz
gdb-e9a2674e1d04f307ae4ffb7e4571c9878f63ff66.tar.bz2
2003-03-31 Andrew Cagney <cagney@redhat.com>
* gdbarch.sh: Include "symfile.h". (CALL_DUMMY_ADDRESS): Default to entry_point_address. * gdbarch.h, gdbarch.c: Re-generate. * inferior.h (CALL_DUMMY_ADDRESS): Delete macro. * xstormy16-tdep.c (xstormy16_gdbarch_init): Do not set call_dummy_address, the default is at entry_point_address. * v850-tdep.c (v850_gdbarch_init): Ditto. * sparc-tdep.c (sparc_gdbarch_init): Ditto. * sh-tdep.c (sh_gdbarch_init): Ditto. * s390-tdep.c (s390_gdbarch_init): Ditto. * rs6000-tdep.c (rs6000_gdbarch_init): Ditto. * mn10300-tdep.c (mn10300_gdbarch_init): Ditto. * mcore-tdep.c (mcore_gdbarch_init): Ditto. * ia64-tdep.c (ia64_gdbarch_init): Ditto. * i386-tdep.c (i386_gdbarch_init): Ditto. * h8300-tdep.c (h8300_gdbarch_init): Ditto. * frv-tdep.c (frv_gdbarch_init): Ditto. * d10v-tdep.c (d10v_gdbarch_init): Ditto. * cris-tdep.c (cris_gdbarch_init): Ditto. * arm-tdep.c (arm_gdbarch_init): Ditto.
-rw-r--r--gdb/ChangeLog23
-rw-r--r--gdb/arm-tdep.c2
-rw-r--r--gdb/cris-tdep.c3
-rw-r--r--gdb/d10v-tdep.c1
-rw-r--r--gdb/frv-tdep.c1
-rw-r--r--gdb/gdbarch.c6
-rw-r--r--gdb/gdbarch.h6
-rwxr-xr-xgdb/gdbarch.sh4
-rw-r--r--gdb/h8300-tdep.c1
-rw-r--r--gdb/i386-tdep.c1
-rw-r--r--gdb/ia64-tdep.c1
-rw-r--r--gdb/inferior.h3
-rw-r--r--gdb/mcore-tdep.c1
-rw-r--r--gdb/mn10300-tdep.c1
-rw-r--r--gdb/rs6000-tdep.c1
-rw-r--r--gdb/s390-tdep.c1
-rw-r--r--gdb/sh-tdep.c1
-rw-r--r--gdb/sparc-tdep.c2
-rw-r--r--gdb/v850-tdep.c1
-rw-r--r--gdb/xstormy16-tdep.c1
20 files changed, 35 insertions, 26 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index c7bca87..ed13cfd 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,28 @@
2003-03-31 Andrew Cagney <cagney@redhat.com>
+ * gdbarch.sh: Include "symfile.h".
+ (CALL_DUMMY_ADDRESS): Default to entry_point_address.
+ * gdbarch.h, gdbarch.c: Re-generate.
+ * inferior.h (CALL_DUMMY_ADDRESS): Delete macro.
+ * xstormy16-tdep.c (xstormy16_gdbarch_init): Do not set
+ call_dummy_address, the default is at entry_point_address.
+ * v850-tdep.c (v850_gdbarch_init): Ditto.
+ * sparc-tdep.c (sparc_gdbarch_init): Ditto.
+ * sh-tdep.c (sh_gdbarch_init): Ditto.
+ * s390-tdep.c (s390_gdbarch_init): Ditto.
+ * rs6000-tdep.c (rs6000_gdbarch_init): Ditto.
+ * mn10300-tdep.c (mn10300_gdbarch_init): Ditto.
+ * mcore-tdep.c (mcore_gdbarch_init): Ditto.
+ * ia64-tdep.c (ia64_gdbarch_init): Ditto.
+ * i386-tdep.c (i386_gdbarch_init): Ditto.
+ * h8300-tdep.c (h8300_gdbarch_init): Ditto.
+ * frv-tdep.c (frv_gdbarch_init): Ditto.
+ * d10v-tdep.c (d10v_gdbarch_init): Ditto.
+ * cris-tdep.c (cris_gdbarch_init): Ditto.
+ * arm-tdep.c (arm_gdbarch_init): Ditto.
+
+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.
diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index 6102a69..73113cf 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -2940,8 +2940,6 @@ arm_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
- set_gdbarch_call_dummy_address (gdbarch, entry_point_address);
-
set_gdbarch_push_dummy_call (gdbarch, arm_push_dummy_call);
/* Frame handling. */
diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c
index ca79b47..d0b1fc9 100644
--- a/gdb/cris-tdep.c
+++ b/gdb/cris-tdep.c
@@ -4255,9 +4255,6 @@ cris_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* Use generic dummy frames. */
- /* Where to execute the call in the memory segments. */
- set_gdbarch_call_dummy_address (gdbarch, entry_point_address);
-
/* Start execution at the beginning of dummy. */
set_gdbarch_call_dummy_start_offset (gdbarch, 0);
set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0);
diff --git a/gdb/d10v-tdep.c b/gdb/d10v-tdep.c
index 405df3a..e438b96 100644
--- a/gdb/d10v-tdep.c
+++ b/gdb/d10v-tdep.c
@@ -1673,7 +1673,6 @@ d10v_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
}
set_gdbarch_call_dummy_length (gdbarch, 0);
- set_gdbarch_call_dummy_address (gdbarch, entry_point_address);
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);
diff --git a/gdb/frv-tdep.c b/gdb/frv-tdep.c
index 6a46419..7b40865 100644
--- a/gdb/frv-tdep.c
+++ b/gdb/frv-tdep.c
@@ -1107,7 +1107,6 @@ frv_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_read_sp (gdbarch, generic_target_read_sp);
set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
- set_gdbarch_call_dummy_address (gdbarch, entry_point_address);
set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0);
set_gdbarch_call_dummy_start_offset (gdbarch, 0);
set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_at_entry_point);
diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c
index 1caf81e..c12b9c7 100644
--- a/gdb/gdbarch.c
+++ b/gdb/gdbarch.c
@@ -66,6 +66,7 @@
#include "gdb-events.h"
#include "reggroups.h"
#include "osabi.h"
+#include "symfile.h" /* For entry_point_address. */
/* Static function declarations */
@@ -527,6 +528,7 @@ gdbarch_alloc (const struct gdbarch_info *info,
current_gdbarch->cannot_store_register = cannot_register_not;
current_gdbarch->deprecated_use_generic_dummy_frames = 1;
current_gdbarch->call_dummy_location = AT_ENTRY_POINT;
+ current_gdbarch->call_dummy_address = entry_point_address;
current_gdbarch->call_dummy_start_offset = -1;
current_gdbarch->call_dummy_breakpoint_offset = -1;
current_gdbarch->call_dummy_breakpoint_offset_p = -1;
@@ -672,9 +674,7 @@ verify_gdbarch (struct gdbarch *gdbarch)
/* Skip verify of get_longjmp_target, has predicate */
/* Skip verify of deprecated_use_generic_dummy_frames, invalid_p == 0 */
/* Skip verify of call_dummy_location, invalid_p == 0 */
- if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
- && (gdbarch->call_dummy_location == AT_ENTRY_POINT && gdbarch->call_dummy_address == 0))
- fprintf_unfiltered (log, "\n\tcall_dummy_address");
+ /* Skip verify of call_dummy_address, invalid_p == 0 */
if ((GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL)
&& (gdbarch->call_dummy_start_offset == -1))
fprintf_unfiltered (log, "\n\tcall_dummy_start_offset");
diff --git a/gdb/gdbarch.h b/gdb/gdbarch.h
index 9cbedf7..261a849 100644
--- a/gdb/gdbarch.h
+++ b/gdb/gdbarch.h
@@ -39,6 +39,7 @@
#if !GDB_MULTI_ARCH
/* Pull in function declarations refered to, indirectly, via macros. */
#include "inferior.h" /* For unsigned_address_to_pointer(). */
+#include "symfile.h" /* For entry_point_address(). */
#endif
struct frame_info;
@@ -1140,6 +1141,11 @@ extern void set_gdbarch_call_dummy_location (struct gdbarch *gdbarch, int call_d
#endif
#endif
+/* Default (function) for non- multi-arch platforms. */
+#if (!GDB_MULTI_ARCH) && !defined (CALL_DUMMY_ADDRESS)
+#define CALL_DUMMY_ADDRESS() (entry_point_address ())
+#endif
+
typedef CORE_ADDR (gdbarch_call_dummy_address_ftype) (void);
extern CORE_ADDR gdbarch_call_dummy_address (struct gdbarch *gdbarch);
extern void set_gdbarch_call_dummy_address (struct gdbarch *gdbarch, gdbarch_call_dummy_address_ftype *call_dummy_address);
diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh
index 8adfb13..3d47f56 100755
--- a/gdb/gdbarch.sh
+++ b/gdb/gdbarch.sh
@@ -520,7 +520,7 @@ F:2:GET_LONGJMP_TARGET:int:get_longjmp_target:CORE_ADDR *pc:pc::0:0
# avoids any potential problems with moving beyond multi-arch partial.
v:1:DEPRECATED_USE_GENERIC_DUMMY_FRAMES:int:deprecated_use_generic_dummy_frames:::::1::0
v:1:CALL_DUMMY_LOCATION:int:call_dummy_location:::::AT_ENTRY_POINT::0
-f:2:CALL_DUMMY_ADDRESS:CORE_ADDR:call_dummy_address:void:::0:0::gdbarch->call_dummy_location == AT_ENTRY_POINT && gdbarch->call_dummy_address == 0
+f::CALL_DUMMY_ADDRESS:CORE_ADDR:call_dummy_address:void::::entry_point_address::0
v:2:CALL_DUMMY_START_OFFSET:CORE_ADDR:call_dummy_start_offset::::0:-1:::0x%08lx
v:2:CALL_DUMMY_BREAKPOINT_OFFSET:CORE_ADDR:call_dummy_breakpoint_offset::::0:-1::gdbarch->call_dummy_breakpoint_offset_p && gdbarch->call_dummy_breakpoint_offset == -1:0x%08lx::CALL_DUMMY_BREAKPOINT_OFFSET_P
v:1:CALL_DUMMY_BREAKPOINT_OFFSET_P:int:call_dummy_breakpoint_offset_p::::0:-1
@@ -805,6 +805,7 @@ cat <<EOF
#if !GDB_MULTI_ARCH
/* Pull in function declarations refered to, indirectly, via macros. */
#include "inferior.h" /* For unsigned_address_to_pointer(). */
+#include "symfile.h" /* For entry_point_address(). */
#endif
struct frame_info;
@@ -1305,6 +1306,7 @@ cat <<EOF
#include "gdb-events.h"
#include "reggroups.h"
#include "osabi.h"
+#include "symfile.h" /* For entry_point_address. */
/* Static function declarations */
diff --git a/gdb/h8300-tdep.c b/gdb/h8300-tdep.c
index ab32197..789d2a5 100644
--- a/gdb/h8300-tdep.c
+++ b/gdb/h8300-tdep.c
@@ -1156,7 +1156,6 @@ h8300_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_store_return_value (gdbarch, h8300_store_return_value);
set_gdbarch_deprecated_extract_struct_value_address (gdbarch, h8300_extract_struct_value_address);
set_gdbarch_use_struct_convention (gdbarch, h8300_use_struct_convention);
- set_gdbarch_call_dummy_address (gdbarch, entry_point_address);
set_gdbarch_call_dummy_start_offset (gdbarch, 0);
set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0);
set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1);
diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c
index 3466c51..02d3ddd 100644
--- a/gdb/i386-tdep.c
+++ b/gdb/i386-tdep.c
@@ -1559,7 +1559,6 @@ i386_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_get_longjmp_target (gdbarch, i386_get_longjmp_target);
/* Call dummy code. */
- set_gdbarch_call_dummy_address (gdbarch, entry_point_address);
set_gdbarch_call_dummy_start_offset (gdbarch, 0);
set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0);
set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1);
diff --git a/gdb/ia64-tdep.c b/gdb/ia64-tdep.c
index ced9119..474a392 100644
--- a/gdb/ia64-tdep.c
+++ b/gdb/ia64-tdep.c
@@ -2238,7 +2238,6 @@ ia64_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_read_sp (gdbarch, generic_target_read_sp);
set_gdbarch_deprecated_dummy_write_sp (gdbarch, generic_target_write_sp);
- set_gdbarch_call_dummy_address (gdbarch, entry_point_address);
set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0);
set_gdbarch_call_dummy_start_offset (gdbarch, 0);
set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
diff --git a/gdb/inferior.h b/gdb/inferior.h
index 08ee81d..0674ab7 100644
--- a/gdb/inferior.h
+++ b/gdb/inferior.h
@@ -418,9 +418,6 @@ extern int attach_flag;
#define ON_STACK 1
#define AT_ENTRY_POINT 4
-#if !defined (CALL_DUMMY_ADDRESS)
-#define CALL_DUMMY_ADDRESS() (internal_error (__FILE__, __LINE__, "CALL_DUMMY_ADDRESS"), 0)
-#endif
#if !defined (CALL_DUMMY_START_OFFSET)
#define CALL_DUMMY_START_OFFSET (internal_error (__FILE__, __LINE__, "CALL_DUMMY_START_OFFSET"), 0)
#endif
diff --git a/gdb/mcore-tdep.c b/gdb/mcore-tdep.c
index 1398b14..0786b31 100644
--- a/gdb/mcore-tdep.c
+++ b/gdb/mcore-tdep.c
@@ -1122,7 +1122,6 @@ mcore_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1);
set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0);
set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
- set_gdbarch_call_dummy_address (gdbarch, entry_point_address);
set_gdbarch_save_dummy_frame_tos (gdbarch, generic_save_dummy_frame_tos);
set_gdbarch_saved_pc_after_call (gdbarch, mcore_saved_pc_after_call);
set_gdbarch_function_start_offset (gdbarch, 0);
diff --git a/gdb/mn10300-tdep.c b/gdb/mn10300-tdep.c
index c744a77..0cdc273 100644
--- a/gdb/mn10300-tdep.c
+++ b/gdb/mn10300-tdep.c
@@ -1187,7 +1187,6 @@ mn10300_gdbarch_init (struct gdbarch_info info,
/* Calling functions in the inferior from GDB. */
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_call_dummy_words (gdbarch, mn10300_call_dummy_words);
set_gdbarch_sizeof_call_dummy_words (gdbarch,
sizeof (mn10300_call_dummy_words));
diff --git a/gdb/rs6000-tdep.c b/gdb/rs6000-tdep.c
index 237072c..5d873bc 100644
--- a/gdb/rs6000-tdep.c
+++ b/gdb/rs6000-tdep.c
@@ -2901,7 +2901,6 @@ rs6000_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_char_signed (gdbarch, 0);
set_gdbarch_call_dummy_length (gdbarch, 0);
- set_gdbarch_call_dummy_address (gdbarch, entry_point_address);
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);
diff --git a/gdb/s390-tdep.c b/gdb/s390-tdep.c
index 30e1e95..b8341cf 100644
--- a/gdb/s390-tdep.c
+++ b/gdb/s390-tdep.c
@@ -1862,7 +1862,6 @@ s390_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
/* Parameters for inferior function calls. */
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_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_at_entry_point);
set_gdbarch_deprecated_push_arguments (gdbarch, s390_push_arguments);
diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c
index a111171..d02325b 100644
--- a/gdb/sh-tdep.c
+++ b/gdb/sh-tdep.c
@@ -4654,7 +4654,6 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_long_double_bit (gdbarch, 8 * TARGET_CHAR_BIT);
set_gdbarch_call_dummy_length (gdbarch, 0);
- set_gdbarch_call_dummy_address (gdbarch, entry_point_address);
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);
diff --git a/gdb/sparc-tdep.c b/gdb/sparc-tdep.c
index 2b8038c..c8748fd 100644
--- a/gdb/sparc-tdep.c
+++ b/gdb/sparc-tdep.c
@@ -3245,7 +3245,6 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_call_dummy_words (gdbarch, call_dummy_32);
#else
set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_at_entry_point);
- set_gdbarch_call_dummy_address (gdbarch, entry_point_address);
set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0);
set_gdbarch_call_dummy_length (gdbarch, 0);
set_gdbarch_call_dummy_words (gdbarch, call_dummy_nil);
@@ -3301,7 +3300,6 @@ sparc_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_call_dummy_words (gdbarch, call_dummy_64);
#else
set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_at_entry_point);
- set_gdbarch_call_dummy_address (gdbarch, entry_point_address);
set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0);
set_gdbarch_call_dummy_length (gdbarch, 0);
set_gdbarch_call_dummy_start_offset (gdbarch, 0);
diff --git a/gdb/v850-tdep.c b/gdb/v850-tdep.c
index f91d102..6d969a4 100644
--- a/gdb/v850-tdep.c
+++ b/gdb/v850-tdep.c
@@ -1276,7 +1276,6 @@ v850_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_store_return_value (gdbarch, v850_store_return_value);
set_gdbarch_deprecated_extract_struct_value_address (gdbarch, v850_extract_struct_value_address);
set_gdbarch_use_struct_convention (gdbarch, v850_use_struct_convention);
- set_gdbarch_call_dummy_address (gdbarch, entry_point_address);
set_gdbarch_call_dummy_start_offset (gdbarch, 0);
set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0);
set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1);
diff --git a/gdb/xstormy16-tdep.c b/gdb/xstormy16-tdep.c
index a6c939a..68d885e 100644
--- a/gdb/xstormy16-tdep.c
+++ b/gdb/xstormy16-tdep.c
@@ -1093,7 +1093,6 @@ xstormy16_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
set_gdbarch_deprecated_extract_struct_value_address (gdbarch, xstormy16_extract_struct_value_address);
set_gdbarch_use_struct_convention (gdbarch,
xstormy16_use_struct_convention);
- set_gdbarch_call_dummy_address (gdbarch, entry_point_address);
set_gdbarch_call_dummy_start_offset (gdbarch, 0);
set_gdbarch_call_dummy_breakpoint_offset (gdbarch, 0);
set_gdbarch_call_dummy_breakpoint_offset_p (gdbarch, 1);