This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [rfa] signals 1/3 - move target_signal handling out of target.c
- To: Andrew Cagney <ac131313 at cygnus dot com>
- Subject: Re: [rfa] signals 1/3 - move target_signal handling out of target.c
- From: Daniel Jacobowitz <dmj+ at andrew dot cmu dot edu>
- Date: Wed, 18 Jul 2001 14:47:35 -0700
- Cc: gdb-patches at sources dot redhat dot com
- References: <20010718110700.A1064@nevyn.them.org> <3B55FC9C.3080306@cygnus.com>
On Wed, Jul 18, 2001 at 05:16:12PM -0400, Andrew Cagney wrote:
> > I've also got a few small cleanups that can go in after the code moves (I
> > want to keep them separate for revision history purposes).
>
>
> Very wise move.
See? I do learn :)
> > 2001-07-18 Daniel Jacobowitz <dan@debian.org>
> >
> > * signals.c: New file.
> > * target.c (struct signals): Move to signals.c.
> > * target.c (target_signal_to_name): Likewise.
> > * target.c (target_signal_from_name): Likewise.
> > * target.c (target_signal_from_host): Likewise.
> > * target.c (do_target_signal_to_host): Likewise.
> > * target.c (target_signal_to_host_p): Likewise.
> > * target.c (target_signal_to_host): Likewise.
> > * target.c (target_signal_from_command): Likewise.
> > * target.c (initialize_targets): Move check of
> > struct signals to...
> > * signals.c (_initialize_signals): Here. New function.
>
>
> No problems with the theory. I just wonder about the file name.
> A logical follow-on is to create ``signals.h'' (and put ``enum
> target_signal'' there). Anyone know of a potential conflict?
>
> If, in a later change there is going to be a
> s/target_signal/<something-sensible>/ should the file name reflect that
> intent.
I can't really think of a better name than target_signal. One change I
want to make eventually, but can not now, is to break the file up even
further to the parts which do and do not need <signal.h> - along with
this would be compiling the part that does need signal.h only when
native and doing something else otherwise. But that's a long way down
the road.
I don't know of any conflicts with "signals.h", but I'm not an
authority on such things. I'll wait a day or two and commit this (with
a proper changelog) unless someone expresses preference for another
name.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer