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]

[obish] Delete DEPRECATED_PC_IN_CALL_DUMMY


Hello,

The architecture method DEPRECATED_PC_IN_CALL_DUMMY is no longer defined, this eliminates that macro replacing any references with the default implementation.

I'll look to commit this in a day or so once all my cross builds have finished.

Andrew
2004-06-09  Andrew Cagney  <cagney@gnu.org>

	* frame.h (deprecated_pc_in_call_dummy): Delete "sp" and "fp"
	parameters.
	* dummy-frame.c (deprecated_pc_in_call_dummy): Update.
	* gdbarch.sh (DEPRECATED_PC_IN_CALL_DUMMY): Delete.
	* gdbarch.h, gdbarch.c: Re-generate.
	* arm-tdep.c (arm_pc_is_thumb_dummy): Call
	deprecated_pc_in_call_dummy instead of
	DEPRECATED_PC_IN_CALL_DUMMY.
	(arm_skip_prologue): Ditto.
	* xstormy16-tdep.c (xstormy16_pop_frame, xstormy16_scan_prologue)
	(xstormy16_frame_saved_pc, xstormy16_frame_chain): Ditto.
	* v850-tdep.c (v850_find_callers_reg, v850_frame_chain)
	(v850_pop_frame, v850_frame_saved_pc, v850_frame_init_saved_regs):
	Ditto.
	* sh64-tdep.c (sh64_frame_chain, sh64_get_saved_pr) 
	(sh64_init_extra_frame_info, sh64_get_saved_register) 
	(sh64_pop_frame): Ditto.
	* mips-tdep.c (non_heuristic_proc_desc): Ditto.
	* mcore-tdep.c (mcore_find_callers_reg, mcore_frame_saved_pc) 
	(mcore_pop_frame, mcore_init_extra_frame_info): Ditto.
	* h8300-tdep.c (h8300_frame_chain, h8300_frame_saved_pc) 
	(h8300_pop_frame): Ditto.
	* blockframe.c (legacy_inside_entry_func) 
	(legacy_frame_chain_valid): Ditto.
	
Index: arm-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/arm-tdep.c,v
retrieving revision 1.174
diff -p -u -r1.174 arm-tdep.c
--- arm-tdep.c	7 Jun 2004 02:02:45 -0000	1.174
+++ arm-tdep.c	9 Jun 2004 22:10:45 -0000
@@ -234,7 +234,7 @@ arm_pc_is_thumb_dummy (CORE_ADDR memaddr
      frame location (true if we have not pushed large data structures or
      gone too many levels deep) and that our 1024 is not enough to consider
      code regions as part of the stack (true for most practical purposes).  */
-  if (DEPRECATED_PC_IN_CALL_DUMMY (memaddr, sp, sp + 1024))
+  if (deprecated_pc_in_call_dummy (memaddr))
     return caller_is_thumb;
   else
     return 0;
@@ -407,7 +407,7 @@ arm_skip_prologue (CORE_ADDR pc)
   struct symtab_and_line sal;
 
   /* If we're in a dummy frame, don't even try to skip the prologue.  */
-  if (DEPRECATED_PC_IN_CALL_DUMMY (pc, 0, 0))
+  if (deprecated_pc_in_call_dummy (pc))
     return pc;
 
   /* See what the symbol table says.  */
Index: blockframe.c
===================================================================
RCS file: /cvs/src/src/gdb/blockframe.c,v
retrieving revision 1.100
diff -p -u -r1.100 blockframe.c
--- blockframe.c	8 May 2004 19:03:04 -0000	1.100
+++ blockframe.c	9 Jun 2004 22:10:45 -0000
@@ -147,9 +147,7 @@ legacy_inside_entry_func (CORE_ADDR pc)
     {
       /* Do not stop backtracing if the program counter is in the call
          dummy at the entry point.  */
-      /* FIXME: This won't always work with zeros for the last two
-         arguments.  */
-      if (DEPRECATED_PC_IN_CALL_DUMMY (pc, 0, 0))
+      if (deprecated_pc_in_call_dummy (pc))
 	return 0;
     }
 
@@ -527,7 +525,7 @@ int
 legacy_frame_chain_valid (CORE_ADDR fp, struct frame_info *fi)
 {
   /* Don't prune CALL_DUMMY frames.  */
-  if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), 0, 0))
+  if (deprecated_pc_in_call_dummy (get_frame_pc (fi)))
     return 1;
 
   /* If the new frame pointer is zero, then it isn't valid.  */
Index: dummy-frame.c
===================================================================
RCS file: /cvs/src/src/gdb/dummy-frame.c,v
retrieving revision 1.33
diff -p -u -r1.33 dummy-frame.c
--- dummy-frame.c	8 May 2004 20:16:33 -0000	1.33
+++ dummy-frame.c	9 Jun 2004 22:10:45 -0000
@@ -131,7 +131,7 @@ deprecated_generic_find_dummy_frame (COR
   return deprecated_grub_regcache_for_registers (regcache);
 }
 
-/* Function: pc_in_call_dummy (pc, sp, fp)
+/* Function: pc_in_call_dummy (pc)
 
    Return true if the PC falls in a dummy frame created by gdb for an
    inferior call.  The code below which allows DECR_PC_AFTER_BREAK is
@@ -139,7 +139,7 @@ deprecated_generic_find_dummy_frame (COR
    subtracted out.  */
 
 int
-deprecated_pc_in_call_dummy (CORE_ADDR pc, CORE_ADDR sp, CORE_ADDR fp)
+deprecated_pc_in_call_dummy (CORE_ADDR pc)
 {
   return pc_in_dummy_frame (pc);
 }
Index: frame.h
===================================================================
RCS file: /cvs/src/src/gdb/frame.h,v
retrieving revision 1.133
diff -p -u -r1.133 frame.h
--- frame.h	7 May 2004 23:19:14 -0000	1.133
+++ frame.h	9 Jun 2004 22:10:45 -0000
@@ -578,8 +578,7 @@ extern CORE_ADDR deprecated_read_registe
 extern void generic_push_dummy_frame (void);
 extern void deprecated_pop_dummy_frame (void);
 
-extern int deprecated_pc_in_call_dummy (CORE_ADDR pc, CORE_ADDR sp,
-					CORE_ADDR fp);
+extern int deprecated_pc_in_call_dummy (CORE_ADDR pc);
 
 /* NOTE: cagney/2002-06-26: Targets should no longer use this
    function.  Instead, the contents of a dummy frame register can be
Index: gdbarch.sh
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.sh,v
retrieving revision 1.320
diff -p -u -r1.320 gdbarch.sh
--- gdbarch.sh	9 Jun 2004 21:26:48 -0000	1.320
+++ gdbarch.sh	9 Jun 2004 22:10:48 -0000
@@ -539,12 +539,6 @@ f:2:CANNOT_FETCH_REGISTER:int:cannot_fet
 f:2:CANNOT_STORE_REGISTER:int:cannot_store_register:int regnum:regnum:::cannot_register_not::0
 # setjmp/longjmp support.
 F:2:GET_LONGJMP_TARGET:int:get_longjmp_target:CORE_ADDR *pc:pc
-# NOTE: cagney/2002-11-24: This function with predicate has a valid
-# (callable) initial value.  As a consequence, even when the predicate
-# is false, the corresponding function works.  This simplifies the
-# migration process - old code, calling DEPRECATED_PC_IN_CALL_DUMMY(),
-# doesn't need to be modified.
-F::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::deprecated_pc_in_call_dummy:deprecated_pc_in_call_dummy
 F:2:DEPRECATED_INIT_FRAME_PC:CORE_ADDR:deprecated_init_frame_pc:int fromleaf, struct frame_info *prev:fromleaf, prev
 #
 v:2:BELIEVE_PCC_PROMOTION:int:believe_pcc_promotion:::::::
Index: h8300-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/h8300-tdep.c,v
retrieving revision 1.94
diff -p -u -r1.94 h8300-tdep.c
--- h8300-tdep.c	7 Jun 2004 02:02:47 -0000	1.94
+++ h8300-tdep.c	9 Jun 2004 22:10:48 -0000
@@ -519,9 +519,7 @@ h8300_frame_init_saved_regs (struct fram
 static CORE_ADDR
 h8300_frame_chain (struct frame_info *thisframe)
 {
-  if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (thisframe),
-				   get_frame_base (thisframe),
-				   get_frame_base (thisframe)))
+  if (deprecated_pc_in_call_dummy (get_frame_pc (thisframe)))
     {				/* initialize the from_pc now */
       get_frame_extra_info (thisframe)->from_pc =
 	deprecated_read_register_dummy (get_frame_pc (thisframe),
@@ -540,9 +538,7 @@ h8300_frame_chain (struct frame_info *th
 static CORE_ADDR
 h8300_frame_saved_pc (struct frame_info *frame)
 {
-  if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame),
-				   get_frame_base (frame),
-				   get_frame_base (frame)))
+  if (deprecated_pc_in_call_dummy (get_frame_pc (frame)))
     return deprecated_read_register_dummy (get_frame_pc (frame),
 					   get_frame_base (frame),
 					   E_PC_REGNUM);
@@ -739,9 +735,7 @@ h8300_pop_frame (void)
   unsigned regno;
   struct frame_info *frame = get_current_frame ();
 
-  if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame),
-				   get_frame_base (frame),
-				   get_frame_base (frame)))
+  if (deprecated_pc_in_call_dummy (get_frame_pc (frame)))
     {
       deprecated_pop_dummy_frame ();
     }
Index: mcore-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/mcore-tdep.c,v
retrieving revision 1.88
diff -p -u -r1.88 mcore-tdep.c
--- mcore-tdep.c	8 May 2004 22:19:30 -0000	1.88
+++ mcore-tdep.c	9 Jun 2004 22:10:48 -0000
@@ -713,8 +713,7 @@ mcore_find_callers_reg (struct frame_inf
 {
   for (; fi != NULL; fi = get_next_frame (fi))
     {
-      if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
-				       get_frame_base (fi)))
+      if (deprecated_pc_in_call_dummy (get_frame_pc (fi)))
 	return deprecated_read_register_dummy (get_frame_pc (fi),
 					       get_frame_base (fi), regnum);
       else if (deprecated_get_frame_saved_regs (fi)[regnum] != 0)
@@ -731,8 +730,7 @@ static CORE_ADDR
 mcore_frame_saved_pc (struct frame_info * fi)
 {
 
-  if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
-				   get_frame_base (fi)))
+  if (deprecated_pc_in_call_dummy (get_frame_pc (fi)))
     return deprecated_read_register_dummy (get_frame_pc (fi),
 					   get_frame_base (fi), PC_REGNUM);
   else
@@ -750,8 +748,7 @@ mcore_pop_frame (void)
   int rn;
   struct frame_info *fi = get_current_frame ();
 
-  if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
-				   get_frame_base (fi)))
+  if (deprecated_pc_in_call_dummy (get_frame_pc (fi)))
     deprecated_pop_dummy_frame ();
   else
     {
@@ -995,8 +992,7 @@ mcore_init_extra_frame_info (int fromlea
   get_frame_extra_info (fi)->status = 0;
   get_frame_extra_info (fi)->framesize = 0;
 
-  if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
-				   get_frame_base (fi)))
+  if (deprecated_pc_in_call_dummy (get_frame_pc (fi)))
     {
       /* We need to setup fi->frame here because call_function_by_hand
          gets it wrong by assuming it's always FP.  */
Index: mips-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/mips-tdep.c,v
retrieving revision 1.295
diff -p -u -r1.295 mips-tdep.c
--- mips-tdep.c	7 Jun 2004 02:02:52 -0000	1.295
+++ mips-tdep.c	9 Jun 2004 22:10:48 -0000
@@ -2305,7 +2305,7 @@ non_heuristic_proc_desc (CORE_ADDR pc, C
   struct obj_section *sec;
   struct mips_objfile_private *priv;
 
-  if (DEPRECATED_PC_IN_CALL_DUMMY (pc, 0, 0))
+  if (deprecated_pc_in_call_dummy (pc))
     return NULL;
 
   find_pc_partial_function (pc, NULL, &startaddr, NULL);
Index: sh64-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/sh64-tdep.c,v
retrieving revision 1.27
diff -p -u -r1.27 sh64-tdep.c
--- sh64-tdep.c	8 May 2004 21:27:02 -0000	1.27
+++ sh64-tdep.c	9 Jun 2004 22:10:48 -0000
@@ -736,9 +736,7 @@ translate_insn_rn (int rn, int media_mod
 static CORE_ADDR
 sh64_frame_chain (struct frame_info *frame)
 {
-  if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame),
-				   get_frame_base (frame),
-				   get_frame_base (frame)))
+  if (deprecated_pc_in_call_dummy (get_frame_pc (frame)))
     return get_frame_base (frame);    /* dummy frame same as caller's frame */
   if (get_frame_pc (frame))
     {
@@ -764,8 +762,7 @@ sh64_get_saved_pr (struct frame_info *fi
   int media_mode = 0;
 
   for (; fi; fi = get_next_frame (fi))
-    if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
-				     get_frame_base (fi)))
+    if (deprecated_pc_in_call_dummy (get_frame_pc (fi)))
       /* When the caller requests PR from the dummy frame, we return
          PC because that's where the previous routine appears to have
          done a call from.  */
@@ -1214,8 +1211,7 @@ sh64_init_extra_frame_info (int fromleaf
   if (get_next_frame (fi)) 
     deprecated_update_frame_pc_hack (fi, DEPRECATED_FRAME_SAVED_PC (get_next_frame (fi)));
 
-  if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
-				   get_frame_base (fi)))
+  if (deprecated_pc_in_call_dummy (get_frame_pc (fi)))
     {
       /* We need to setup fi->frame here because call_function_by_hand
          gets it wrong by assuming it's always FP.  */
@@ -1272,9 +1268,7 @@ sh64_get_saved_register (char *raw_buffe
 
   while (frame && ((frame = get_next_frame (frame)) != NULL))
     {
-      if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame),
-				       get_frame_base (frame),
-				       get_frame_base (frame)))
+      if (deprecated_pc_in_call_dummy (get_frame_pc (frame)))
 	{
 	  if (lval)		/* found it in a CALL_DUMMY frame */
 	    *lval = not_lval;
@@ -1369,9 +1363,7 @@ sh64_pop_frame (void)
 
   int media_mode = pc_is_isa32 (get_frame_pc (frame));
 
-  if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame),
-				   get_frame_base (frame),
-				   get_frame_base (frame)))
+  if (deprecated_pc_in_call_dummy (get_frame_pc (frame)))
     deprecated_pop_dummy_frame ();
   else
     {
Index: v850-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/v850-tdep.c,v
retrieving revision 1.86
diff -p -u -r1.86 v850-tdep.c
--- v850-tdep.c	18 May 2004 21:20:28 -0000	1.86
+++ v850-tdep.c	9 Jun 2004 22:10:48 -0000
@@ -797,8 +797,7 @@ static CORE_ADDR
 v850_find_callers_reg (struct frame_info *fi, int regnum)
 {
   for (; fi; fi = get_next_frame (fi))
-    if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
-				     get_frame_base (fi)))
+    if (deprecated_pc_in_call_dummy (get_frame_pc (fi)))
       return deprecated_read_register_dummy (get_frame_pc (fi),
 					     get_frame_base (fi), regnum);
     else if (deprecated_get_frame_saved_regs (fi)[regnum] != 0)
@@ -825,7 +824,7 @@ v850_frame_chain (struct frame_info *fi)
   callers_pc = DEPRECATED_FRAME_SAVED_PC (fi);
   /* If caller is a call-dummy, then our FP bears no relation to his FP! */
   fp = v850_find_callers_reg (fi, E_FP_RAW_REGNUM);
-  if (DEPRECATED_PC_IN_CALL_DUMMY (callers_pc, fp, fp))
+  if (deprecated_pc_in_call_dummy (callers_pc))
     return fp;			/* caller is call-dummy: return oldest value of FP */
 
   /* Caller is NOT a call-dummy, so everything else should just work.
@@ -882,9 +881,7 @@ v850_pop_frame (void)
   struct frame_info *frame = get_current_frame ();
   int regnum;
 
-  if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (frame),
-				   get_frame_base (frame),
-				   get_frame_base (frame)))
+  if (deprecated_pc_in_call_dummy (get_frame_pc (frame)))
     deprecated_pop_dummy_frame ();
   else
     {
@@ -1010,8 +1007,7 @@ v850_push_return_address (CORE_ADDR pc, 
 static CORE_ADDR
 v850_frame_saved_pc (struct frame_info *fi)
 {
-  if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
-				   get_frame_base (fi)))
+  if (deprecated_pc_in_call_dummy (get_frame_pc (fi)))
     return deprecated_read_register_dummy (get_frame_pc (fi),
 					   get_frame_base (fi), E_PC_REGNUM);
   else
@@ -1086,8 +1082,7 @@ v850_frame_init_saved_regs (struct frame
 
       /* The call dummy doesn't save any registers on the stack, so we
          can return now.  */
-      if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
-				       get_frame_base (fi)))
+      if (deprecated_pc_in_call_dummy (get_frame_pc (fi)))
 	return;
 
       /* Find the beginning of this function, so we can analyze its
Index: xstormy16-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/xstormy16-tdep.c,v
retrieving revision 1.76
diff -p -u -r1.76 xstormy16-tdep.c
--- xstormy16-tdep.c	8 May 2004 21:27:02 -0000	1.76
+++ xstormy16-tdep.c	9 Jun 2004 22:10:48 -0000
@@ -423,8 +423,7 @@ xstormy16_pop_frame (void)
   if (fi == NULL)
     return;			/* paranoia */
 
-  if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
-				   get_frame_base (fi)))
+  if (deprecated_pc_in_call_dummy (get_frame_pc (fi)))
     {
       deprecated_pop_dummy_frame ();
     }
@@ -560,8 +559,7 @@ xstormy16_scan_prologue (CORE_ADDR start
   if (fi)
     {
       /* In a call dummy, don't touch the frame. */
-      if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
-				       get_frame_base (fi)))
+      if (deprecated_pc_in_call_dummy (get_frame_pc (fi)))
 	return start_addr;
 
       /* Grab the frame-relative values of SP and FP, needed below. 
@@ -849,8 +847,7 @@ xstormy16_frame_saved_pc (struct frame_i
 {
   CORE_ADDR saved_pc;
 
-  if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
-				   get_frame_base (fi)))
+  if (deprecated_pc_in_call_dummy (get_frame_pc (fi)))
     {
       saved_pc = deprecated_read_register_dummy (get_frame_pc (fi),
 						 get_frame_base (fi),
@@ -911,8 +908,7 @@ xstormy16_init_extra_frame_info (int fro
 static CORE_ADDR
 xstormy16_frame_chain (struct frame_info *fi)
 {
-  if (DEPRECATED_PC_IN_CALL_DUMMY (get_frame_pc (fi), get_frame_base (fi),
-				   get_frame_base (fi)))
+  if (deprecated_pc_in_call_dummy (get_frame_pc (fi)))
     {
       /* Call dummy's frame is the same as caller's.  */
       return get_frame_base (fi);

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