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:
> 
> Hello,
> 
> The attatched moves the recently added putchar_filtered() function to
> utils.c/defs.h.  That is where all the *_filtered() wrapper functions
> currently live.  I can't think of a good reason to put just one function
> down in cli/cli-utils.c especially when we're hopefully going to delete
> it :-)
> 

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
(that never made it, I believe).

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...

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.

Regards,
Fernando


> People looking at the *_filtered() stuff probably want to look at the
> TODO file vis:
> 
> --
> 
> Send normal output to gdb_stdout.
> Send error messages to gdb_stderror.
> Send debug and log output log gdb_stdlog.
> 
> GDB still contains many cases where (f)printf or printf_filtered () is
> used when it should be sending the messages to gdb_stderror or
> gdb_stdlog.  The thought of #defining printf to something has crossed
> peoples minds ;-)
> 
> --
> 
> Re-do GDB's output pager.
> 
> GDB's output pager still relies on people correctly using *_filtered
> for gdb_stdout and *_unfiltered for gdb_stdlog / gdb_stderr.
> Hopefully, with all normal output going to gdb_stdout, the pager can
> just look at the ui_file that the output is on and then use that to
> decide what to do about paging.  Sounds good in theory.
> 


-- 
Fernando Nasser
Red Hat - Toronto                       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]