This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [rfc] Move putchar_filtered() to utils.c
- To: Andrew Cagney <ac131313 at cygnus dot com>
- Subject: Re: [rfc] Move putchar_filtered() to utils.c
- From: Fernando Nasser <fnasser at redhat dot com>
- Date: Tue, 30 Jan 2001 21:52:08 -0500
- CC: Fernando Nasser <fnasser at cygnus dot com>, GDB Patches <gdb-patches at sourceware dot cygnus dot com>
- Organization: Red Hat Canada
- References: <3A775796.6CA11186@cygnus.com> <3A77705F.4F921019@cygnus.com> <3A777926.DE696A4F@cygnus.com>
Andrew Cagney wrote:
>
> Fernando Nasser wrote:
>
> > You just gave the argument. We have hidden it in there so nobody would use
> > it inside libgdb. I agreed with Nick that was acceptable to use it inside
> > the cli due to the current WIP state of things. He used it inside cli-regs.c
>
> I don't know that I've provided an argument for putting
> putchar_filtered() in the wrong place. If a function is being added,
> even as a tempoary hack, it really should be put in the correct place.
>
I don't think it should go to utils.c at all. It is not currently used
anywhere in libgdb so why add a born-deprecated function in there
unecessarily.
The "wrong place" here is a question of opinion.
> > W.r.t. the file, Nick actually created it to expedite things for me as I was
> > planning to move a few cli utility functions there. As I got caught up in some
> > end of project affairs, I had to interrupt my CLI work and that is why the file
> > is so empty...
>
> Yes. We never know when we're going to be forced to drop the ball.
> Consequently it is best to always try to keep GDB in a consistent state.
>
It is consistent in *my* point of view. It is not consistent in
*yours*.
> > If you prefer, just delete it altogether. Nick can add it as a static function
> > to his cli-regs.c if that is really unavoidable and I can re-create the cli-utils
> > files on my next round of CLI separation.
>
> I'll move the function for the moment. If someone does decide to
> cleanup all the *_filtered() functions they are at least in the one
> place.
>
It would be easier not to make it dirtier in the first place...
However, do it anyway you want.
> I'll leave the cli-utils.[hc] as empty files.
>
Thanks.
--
Fernando Nasser
Red Hat Canada Ltd. E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9