2003-03-31 Andrew Cagney <cagney@redhat.com>
authorAndrew Cagney <cagney@redhat.com>
Mon, 31 Mar 2003 21:58:23 +0000 (21:58 +0000)
committerAndrew Cagney <cagney@redhat.com>
Mon, 31 Mar 2003 21:58:23 +0000 (21:58 +0000)
* 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.

20 files changed:
gdb/ChangeLog
gdb/arm-tdep.c
gdb/cris-tdep.c
gdb/d10v-tdep.c
gdb/frv-tdep.c
gdb/gdbarch.c
gdb/gdbarch.h
gdb/gdbarch.sh
gdb/h8300-tdep.c
gdb/i386-tdep.c
gdb/ia64-tdep.c
gdb/inferior.h
gdb/mcore-tdep.c
gdb/mn10300-tdep.c
gdb/rs6000-tdep.c
gdb/s390-tdep.c
gdb/sh-tdep.c
gdb/sparc-tdep.c
gdb/v850-tdep.c
gdb/xstormy16-tdep.c

index c7bca878eceba04ec71330e88bfc6766b5835d29..ed13cfdc22e5ca55e73afc618c81a276db13539f 100644 (file)
@@ -1,3 +1,26 @@
+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.
index 6102a69b40c281d8df930324aa41648fa98be0c3..73113cf5c41af0c7766fb3e40471d4c6a5b06af0 100644 (file)
@@ -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.  */
index ca79b4781dc5ced1e544c2fa18b874b694fddff5..d0b1fc9121a2e01c28e233f774c60028e7277a66 100644 (file)
@@ -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);
index 405df3aba007d94ba207ab2c8b94dbde02b985ce..e438b96d39d3ddd2dbe9e65914376e45e3ca4c2c 100644 (file)
@@ -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);
index 6a464192c59779b79eb5f27dc3a3c3ce5c919904..7b40865ef888bb2a59c6e924f7f92d2dace9ba69 100644 (file)
@@ -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);
index 1caf81efbde51c6980d42f79a69a0aab3884ab90..c12b9c7639dd384713e3f79365b0dbded9f4a7db 100644 (file)
@@ -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");
index 9cbedf792c62f41de5f0e64763d708816c6642c8..261a8492d18c2f0c05c378b8669dd335d0b9316e 100644 (file)
@@ -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);
index 8adfb13485da3cd2f21506f32fd80245cb49fe80..3d47f565a008565453d4fc44414f13d47937b0d0 100755 (executable)
@@ -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 */
 
index ab321974a7be738243c6b10aa50ee7430a46c2d1..789d2a5ecd882812d6fd790d0ce71cf8f3d10257 100644 (file)
@@ -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);
index 3466c514c47cc98db5d267e231049ebc39cfcfc5..02d3ddd130e0db33a5e1218b5182204b41e45d6e 100644 (file)
@@ -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);
index ced9119f38512c818d5c7b47ff9956e1afbdfccd..474a392ead6bae56fcf024f16e62c75086416233 100644 (file)
@@ -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);
index 08ee81d0f2e86221e5bf7dc3e1ba5733a87f6f13..0674ab713dbccd931dfd2fcb906069bc9b422510 100644 (file)
@@ -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
index 1398b14f0dcc9b1fbe27bda45657fe57b4585268..0786b31962205724164ef72d7070acec1742e6b8 100644 (file)
@@ -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);
index c744a77652c176cd436531b8c168729ad1c8356d..0cdc273694262004e47f8b06fde071400653daca 100644 (file)
@@ -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));
index 237072c7aef5047841372458ec6bce3c7ff2a95c..5d873bc394bcec8cfc1a7e7c7060816ea652c665 100644 (file)
@@ -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);
index 30e1e95d8a526cf7e563b876b4e2d079e26c6a5a..b8341cf731513fb97a7e01932fd4670a9579723f 100644 (file)
@@ -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);
index a11117133f9bcc24f11fc317d06a53ddc2ba22a4..d02325bc1e73d6b7e3dd436ee4db8afbadc22faf 100644 (file)
@@ -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);
index 2b8038c360ae9a8ba0e403e5af74da61a01e3f46..c8748fdbd580d5e231fbeabe42ecd5e7b0dce2b9 100644 (file)
@@ -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);
index f91d1021c63f011afb08c1f30c6021057991472f..6d969a4640c2a50421f6212418951894ecf528d9 100644 (file)
@@ -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);
index a6c939a8ea9e5c1fb43ad12d9eb87dce5036c4e7..68d885e0f001dc80b6f5f82559c848b9b995785e 100644 (file)
@@ -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);