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]

Re: [rfc] Move putchar_filtered() to utils.c


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

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