Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] Get rid of DEPRECATED_PC_IN_CALL_DUMMY in i386-tdep.c
@ 2002-12-11  6:56 Mark Kettenis
  2002-12-11  9:38 ` Andrew Cagney
  0 siblings, 1 reply; 4+ messages in thread
From: Mark Kettenis @ 2002-12-11  6:56 UTC (permalink / raw)
  To: gdb-patches

Committed.

Mark


Index: ChangeLog
from  Mark Kettenis  <kettenis@gnu.org>

	* i386-tdep.c: Include "dummy-frame.h".
	(i386_frame_chain, i386_frame_saved_pc): Replace
	DEPRECATED_PC_IN_CALL_DUMMY with call to pc_in_dummy_frame.
	(i386_gdbarch_init): Don't set deprecated_pc_in_call_dummy.

Index: i386-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/i386-tdep.c,v
retrieving revision 1.102
diff -u -p -r1.102 i386-tdep.c
--- i386-tdep.c 11 Dec 2002 02:26:36 -0000 1.102
+++ i386-tdep.c 11 Dec 2002 14:36:53 -0000
@@ -38,6 +38,7 @@
 #include "value.h"
 #include "gdb_assert.h"
 #include "reggroups.h"
+#include "dummy-frame.h"
 
 #include "i386-tdep.h"
 #include "i387-tdep.h"
@@ -509,7 +510,7 @@ i386_frameless_signal_p (struct frame_in
 static CORE_ADDR
 i386_frame_chain (struct frame_info *frame)
 {
-  if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, 0, 0))
+  if (pc_in_dummy_frame (frame->pc))
     return frame->frame;
 
   if (get_frame_type (frame) == SIGTRAMP_FRAME
@@ -566,7 +567,7 @@ i386_sigtramp_saved_sp (struct frame_inf
 static CORE_ADDR
 i386_frame_saved_pc (struct frame_info *frame)
 {
-  if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, 0, 0))
+  if (pc_in_dummy_frame (frame->pc))
     {
       ULONGEST pc;
 
@@ -1597,8 +1598,6 @@ i386_gdbarch_init (struct gdbarch_info i
   set_gdbarch_register_convert_to_virtual (gdbarch,
 					   i386_register_convert_to_virtual);
   set_gdbarch_register_convert_to_raw (gdbarch, i386_register_convert_to_raw);
-
-  set_gdbarch_deprecated_pc_in_call_dummy (gdbarch, deprecated_pc_in_call_dummy_at_entry_point);
 
   /* "An argument's size is increased, if necessary, to make it a
      multiple of [32-bit] words.  This may require tail padding,


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Get rid of DEPRECATED_PC_IN_CALL_DUMMY in i386-tdep.c
  2002-12-11  6:56 [PATCH] Get rid of DEPRECATED_PC_IN_CALL_DUMMY in i386-tdep.c Mark Kettenis
@ 2002-12-11  9:38 ` Andrew Cagney
  2002-12-12  3:06   ` Richard Earnshaw
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Cagney @ 2002-12-11  9:38 UTC (permalink / raw)
  To: Mark Kettenis; +Cc: gdb-patches

Mark,

> @@ -566,7 +567,7 @@ i386_sigtramp_saved_sp (struct frame_inf
>  static CORE_ADDR
>  i386_frame_saved_pc (struct frame_info *frame)
>  {
> -  if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, 0, 0))
> +  if (pc_in_dummy_frame (frame->pc))
>      {
>        ULONGEST pc;
>  

What happens if you simply delete the above?  This function should now
only be called on non-dummy frames.

> @@ -509,7 +510,7 @@ i386_frameless_signal_p (struct frame_in
>  static CORE_ADDR
>  i386_frame_chain (struct frame_info *frame)
>  {
> -  if (DEPRECATED_PC_IN_CALL_DUMMY (frame->pc, 0, 0))
> +  if (pc_in_dummy_frame (frame->pc))
>      return frame->frame;
>  
>    if (get_frame_type (frame) == SIGTRAMP_FRAME

This test hasn't quite been eliminated.  I need to add
frame_id_unwind() to the frame object.

Andrew


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Get rid of DEPRECATED_PC_IN_CALL_DUMMY in i386-tdep.c
  2002-12-11  9:38 ` Andrew Cagney
@ 2002-12-12  3:06   ` Richard Earnshaw
  2002-12-12 16:19     ` Andrew Cagney
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Earnshaw @ 2002-12-12  3:06 UTC (permalink / raw)
  To: Andrew Cagney; +Cc: Mark Kettenis, gdb-patches, Richard.Earnshaw

I was looking at the DEPRECATED_PC_IN_CALL_DUMMY use in arm-tdep.c last 
night and I came to the conclusion that I hadn't a clue what I was 
supposed to do to remove it.  Is all the code dead?  Does it all need 
translating into pc_in_dummy_frame?  etc, etc.

Could I suggest that when we deprecate a call some documentation is added 
*somewhere* saying what sort of things (I accept that it might not be a 
trivial substitution) should be used to replace existing deprecated code.  
One possible place would be in gdbarch.sh, though that's constrained a 
bit.  doc/deprecated.texinfo?

something of the form

->> DEPRECATED_PC_IN_CALL_DUMMY:  Replace with calls to XXX or YYY as 
appropriate using the new ZZZ methods for doing wibble.

This would then be a key for things to look up in the manual (the new 
methods are documented, right?) to understand how it's all supposed to 
work.

R.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Get rid of DEPRECATED_PC_IN_CALL_DUMMY in i386-tdep.c
  2002-12-12  3:06   ` Richard Earnshaw
@ 2002-12-12 16:19     ` Andrew Cagney
  0 siblings, 0 replies; 4+ messages in thread
From: Andrew Cagney @ 2002-12-12 16:19 UTC (permalink / raw)
  To: Richard.Earnshaw; +Cc: Mark Kettenis, gdb-patches

> I was looking at the DEPRECATED_PC_IN_CALL_DUMMY use in arm-tdep.c last 
> night and I came to the conclusion that I hadn't a clue what I was 
> supposed to do to remove it.  Is all the code dead?  Does it all need 
> translating into pc_in_dummy_frame?  etc, etc.
> 
> Could I suggest that when we deprecate a call some documentation is added 
> *somewhere* saying what sort of things (I accept that it might not be a 
> trivial substitution) should be used to replace existing deprecated code.  
> One possible place would be in gdbarch.sh, though that's constrained a 
> bit.  doc/deprecated.texinfo?

I try to leave a comment with the doco but keep missing them :-(

> something of the form
> 
> ->> DEPRECATED_PC_IN_CALL_DUMMY:  Replace with calls to XXX or YYY as 
> appropriate using the new ZZZ methods for doing wibble.
> 
> This would then be a key for things to look up in the manual (the new 
> methods are documented, right?) to understand how it's all supposed to 
> work.

Things to do during my summer holidays is write said doco (that and the 
register cache).

As for deprecated_pc_in_call_dummy.  It should be dead, not needed, 
redundant, superfulious[sp], irrelevant, gone to meet its creator, 
ceased to be, ....  the only time GDB should call the tdep code is on a 
normal frame.

However, because I've not committed the changes that re-order frame 
initialization to use the sequence:

	frame_pc_unwind()
	frame_id_unwind()
	create frame

The arm may in some way still depend on that macro.  If it does I'd like 
to know.

Andrew



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-12-13  0:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-11  6:56 [PATCH] Get rid of DEPRECATED_PC_IN_CALL_DUMMY in i386-tdep.c Mark Kettenis
2002-12-11  9:38 ` Andrew Cagney
2002-12-12  3:06   ` Richard Earnshaw
2002-12-12 16:19     ` Andrew Cagney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox