This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
Re: For review: delete write_fp() and TARGET_WRITE_FP()
- To: cagney@cygnus.com
- Subject: Re: For review: delete write_fp() and TARGET_WRITE_FP()
- From: Stan Shebs <shebs@cygnus.com>
- Date: Tue, 13 Jul 1999 09:08:08 -0700
- CC: gdb-patches@sourceware.cygnus.com
From: Andrew Cagney <ac131313@cygnus.com>
Date: Tue, 13 Jul 1999 21:11:08 +1000
The attached patch is my initial cut at deleting the function
write_fp(). To the best of my knowledge it is only used in
sparc-tdep.c!
Can anyone think of why this code should hang around?
It would seem to me that the need to add a deprecated GDB_TARGET_IS_
ifdef is your evidence of why write_fp needs to be part of the arch
description...
if (strcmp (target_shortname, "sim") != 0)
{
! #ifdef GDB_TARGET_IS_SPARC64
! sparc64_write_fp (old_sp);
! #else
! write_register (FP_REGNUM, old_sp);
! #endif
On the other hand, I notice that this is under a string match on
target_shortname, which just screams KLUDGE! :-) So maybe this one is
in code that would all go away if we were to be harder-nosed about
letting yuck stuff into GDB....
As much as I like to get rid of useless code, I have mixed feelings
about deleting this particular capability. Not only is there a
symmetry argument - pc, sp, and fp are the three registers about which
GDB must know and be able to handle specially - but systems with
virtual frame pointers and such may need to define write_fp in the
future. (Right now we don't need to because we define fake fp regs
for the frame-pointer-less systems.)
Stan