This is the mail archive of the gdb-patches@sourceware.org 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]
Other format: [Raw text]

Re: [patch] event-loop.h cleanup: GDB_READABLE, et.al. -> event-loop.c


On Thursday 29 April 2010 23:08:59, Doug Evans wrote:

> I'm currently working on a fix to gdbserver where it will go to sleep
> even though there is data sitting in readchar's buffer.
> While doing that I was comparing gdb's event-loop with gdbserver's,
> and was wondering why gdb's has these definitions in a .h file.
> 
> #define GDB_READABLE	(1<<1)
> #define GDB_WRITABLE	(1<<2)
> #define GDB_EXCEPTION	(1<<3)
> 
> It turns out there's no need to, and in fact there's some cruft
> associated with that.

It looks like create_file_handler was exported at some point,
but when it was made static, those were left behind:

1999-06-25  Elena Zannoni  <ezannoni@kwikemart.cygnus.com>

        * event-top.c (change_line_handler): Get rid of the global
        variable input_fd, use `fileno (instream)' instead.
        (_initialize_event_loop): Ditto

        * event-loop.c (add_file_handler): New function. Wrapper for
        create_file_handler.
        (create_file_handler): Make static.
        * event-top.c (_initialize_event_loop): Call add_file_handler,
        instead of create_file_handler.
        (change_line_handler): Ditto.
        Remove poll.h include.
        * event-loop.h: Export add_file_handler instead of
        create_file_handler.


> 2010-04-29  Doug Evans  <dje@google.com>
> 
> 	* event-loop.h (GDB_READABLE, GDB_WRITABLE, GDB_EXCEPTION): Move to ...
> 	* event-loop.c: ... here.
> 	* tui/tui-io.c (tui_readline_output): Rename parameter `code' to
> 	`error' for clarity.
> 	(tui_getc): Pass correct value for `error' parameter to
> 	tui_readline_output.

This is fine, go ahead.  Thanks.

-- 
Pedro Alves


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