This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[commit:d10v, gdbarch] Don't supply call_dummy_words


Hello,

This patch modifies the d10v target so that it doesn't supply call_dummy_words or sizeof_call_dummy_words. Instead defaults are picked up (but they are actually never used :-).

The architecture vector is also updated so that it is very clear that no value needs to be provided.

Any other architecture also using AT_ENTRY_POINT generic dummy frames can probably be given the same treatment.

committed,
Andrew
2003-03-29  Andrew Cagney  <cagney at redhat dot com>

	* d10v-tdep.c (d10v_gdbarch_init): Do not set call_dummy_words or
	sizeof_call_dummy_words.
	* gdbarch.sh (CALL_DUMMY_WORDS, SIZEOF_CALL_DUMMY_WORDS): Always
	define.
	* gdbarch.h: Regenerate.
	
Index: d10v-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/d10v-tdep.c,v
retrieving revision 1.93
diff -u -r1.93 d10v-tdep.c
--- d10v-tdep.c	29 Mar 2003 01:40:00 -0000	1.93
+++ d10v-tdep.c	29 Mar 2003 23:57:12 -0000
@@ -1586,8 +1586,6 @@
 static struct gdbarch *
 d10v_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
 {
-  static LONGEST d10v_call_dummy_words[] =
-  {0};
   struct gdbarch *gdbarch;
   int d10v_num_regs;
   struct gdbarch_tdep *tdep;
@@ -1680,8 +1678,6 @@
   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_words (gdbarch, d10v_call_dummy_words);
-  set_gdbarch_sizeof_call_dummy_words (gdbarch, sizeof (d10v_call_dummy_words));
   set_gdbarch_call_dummy_p (gdbarch, 1);
   set_gdbarch_fix_call_dummy (gdbarch, generic_fix_call_dummy);
 
Index: gdbarch.c
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.c,v
retrieving revision 1.196
diff -u -r1.196 gdbarch.c
--- gdbarch.c	26 Mar 2003 22:39:52 -0000	1.196
+++ gdbarch.c	29 Mar 2003 23:57:33 -0000
@@ -2255,8 +2255,8 @@
                       "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS # %s\n",
                       XSTRING (SIZEOF_CALL_DUMMY_WORDS));
   fprintf_unfiltered (file,
-                      "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = 0x%08lx\n",
-                      (long) SIZEOF_CALL_DUMMY_WORDS);
+                      "gdbarch_dump: SIZEOF_CALL_DUMMY_WORDS = %d\n",
+                      SIZEOF_CALL_DUMMY_WORDS);
 #endif
 #ifdef SKIP_PROLOGUE
   fprintf_unfiltered (file,
Index: gdbarch.h
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.h,v
retrieving revision 1.159
diff -u -r1.159 gdbarch.h
--- gdbarch.h	26 Mar 2003 22:39:52 -0000	1.159
+++ gdbarch.h	29 Mar 2003 23:57:47 -0000
@@ -1238,11 +1238,9 @@
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (CALL_DUMMY_WORDS)
 #error "Non multi-arch definition of CALL_DUMMY_WORDS"
 #endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (CALL_DUMMY_WORDS)
+#if !defined (CALL_DUMMY_WORDS)
 #define CALL_DUMMY_WORDS (gdbarch_call_dummy_words (current_gdbarch))
 #endif
-#endif
 
 /* Default (value) for non- multi-arch platforms. */
 #if (!GDB_MULTI_ARCH) && !defined (SIZEOF_CALL_DUMMY_WORDS)
@@ -1254,10 +1252,8 @@
 #if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (SIZEOF_CALL_DUMMY_WORDS)
 #error "Non multi-arch definition of SIZEOF_CALL_DUMMY_WORDS"
 #endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (SIZEOF_CALL_DUMMY_WORDS)
+#if !defined (SIZEOF_CALL_DUMMY_WORDS)
 #define SIZEOF_CALL_DUMMY_WORDS (gdbarch_sizeof_call_dummy_words (current_gdbarch))
-#endif
 #endif
 
 #if defined (DEPRECATED_CALL_DUMMY_STACK_ADJUST)
Index: gdbarch.sh
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.sh,v
retrieving revision 1.211
diff -u -r1.211 gdbarch.sh
--- gdbarch.sh	26 Mar 2003 22:39:52 -0000	1.211
+++ gdbarch.sh	29 Mar 2003 23:57:57 -0000
@@ -531,8 +531,8 @@
 # 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:2:CALL_DUMMY_WORDS:LONGEST *:call_dummy_words::::0:legacy_call_dummy_words::0:0x%08lx
-v:2:SIZEOF_CALL_DUMMY_WORDS:int:sizeof_call_dummy_words::::0:legacy_sizeof_call_dummy_words::0:0x%08lx
+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
 f:2:FIX_CALL_DUMMY:void:fix_call_dummy:char *dummy, CORE_ADDR pc, CORE_ADDR fun, int nargs, struct value **args, struct type *type, int gcc_p:dummy, pc, fun, nargs, args, type, gcc_p:::0
 F:2:DEPRECATED_INIT_FRAME_PC_FIRST:CORE_ADDR:deprecated_init_frame_pc_first:int fromleaf, struct frame_info *prev:fromleaf, prev

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]