From: Andrew Cagney <ac131313@cygnus.com>
To: GDB Patches <gdb-patches@sourceware.cygnus.com>,
"Insight (GDB GUI)" <insight@sourceware.cygnus.com>
Subject: Eliminate flush_hook...
Date: Wed, 13 Oct 1999 01:47:00 -0000 [thread overview]
Message-ID: <3804470B.4B043B05@cygnus.com> (raw)
OK?
This eliminates the flush_hook. New code should be implementing the
``struct gdb_file'' object. The old code never did anything useful with
flush_hook.
Andrew
--
The patch is in three parts: gdb, tui, insight.
Wed Oct 13 17:58:20 1999 Andrew Cagney <cagney@b1.cygnus.com>
* gdb-events.sh: Update
* utils.c (tui_file_flush): Don't call flush_hook. Don't try to
flush ``astring''.
* top.c (flush_hook): Delete.
Wed Oct 13 18:01:52 1999 Andrew Cagney <cagney@b1.cygnus.com>
* tui.c (tuiInit): Don't initialize ``flush_hook''.
Wed Oct 13 17:57:17 1999 Andrew Cagney <cagney@b1.cygnus.com>
* gdbtk-hooks.c (gdbtk_flush): Delete.
(gdbtk_add_hooks): Don't initialize flush_hook.
--
Wed Oct 13 17:58:20 1999 Andrew Cagney <cagney@b1.cygnus.com>
* gdb-events.sh: Update
* utils.c (tui_file_flush): Don't call flush_hook. Don't try to
flush ``astring''.
* top.c (flush_hook): Delete.
Index: gdb-events.sh
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/gdb-events.sh,v
retrieving revision 2.1
diff -p -r2.1 gdb-events.sh
*** gdb-events.sh 1999/08/29 00:06:42 2.1
--- gdb-events.sh 1999/10/13 08:29:52
*************** f:void:breakpoint_modify:int b:b
*** 77,83 ****
#*:void:print_frame_info_listing_hook:struct symtab *s, int line, int stopline, int noerror:s, line, stopline, noerror
#*:int:query_hook:const char *query, va_list args:query, args
#*:void:warning_hook:const char *string, va_list args:string, args
- #*:void:flush_hook:GDB_FILE *stream:stream
#*:void:target_output_hook:char *b:b
#*:void:interactive_hook:void
#*:void:registers_changed_hook:void
--- 77,82 ----
Index: top.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/top.c,v
retrieving revision 2.164
diff -p -r2.164 top.c
*** top.c 1999/10/04 18:47:16 2.164
--- top.c 1999/10/13 08:30:05
*************** int (*query_hook) PARAMS ((const char *,
*** 397,406 ****
void (*warning_hook) PARAMS ((const char *, va_list));
- /* Called from gdb_flush to flush output. */
-
- void (*flush_hook) PARAMS ((GDB_FILE * stream));
-
/* These three functions support getting lines of text from the user. They
are used in sequence. First readline_begin_hook is called with a text
string that might be (for example) a message for the user to type in a
--- 397,402 ----
Index: utils.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/utils.c,v
retrieving revision 1.211
diff -p -r1.211 utils.c
*** utils.c 1999/10/04 18:47:16 1.211
--- utils.c 1999/10/13 08:30:12
*************** tui_file_fputs (linebuffer, file)
*** 1875,1886 ****
#if defined(TUI)
extern int tui_owns_terminal;
#endif
! /* If anything (GUI, TUI) wants to capture GDB output, this is
! * the place... the way to do it is to set up
! * fputs_unfiltered_hook.
! * Our TUI ("gdb -tui") used to hook output, but in the
! * new (XDB style) scheme, we do not do that anymore... - RT
! */
if (fputs_unfiltered_hook
&& (file == gdb_stdout
|| file == gdb_stderr))
--- 1875,1884 ----
#if defined(TUI)
extern int tui_owns_terminal;
#endif
! /* NOTE: cagney/1999-10-13: The use of fputs_unfiltered_hook is
! seriously discouraged. Those wanting to hook output should
! instead implement their own gdb_file object and install that. See
! also tui_file_flush(). */
if (fputs_unfiltered_hook
&& (file == gdb_stdout
|| file == gdb_stderr))
*************** tui_file_flush (file)
*** 2028,2043 ****
{
struct tui_stream *stream = gdb_file_data (file);
if (stream->ts_magic != &tui_file_magic)
! error ("Internal error: bad magic number");
! if (flush_hook
! && (file == gdb_stdout
! || file == gdb_stderr))
{
! flush_hook (file);
! return;
}
-
- fflush (stream->ts_filestream);
}
void
--- 2026,2046 ----
{
struct tui_stream *stream = gdb_file_data (file);
if (stream->ts_magic != &tui_file_magic)
! internal_error ("tui_file_flush: bad magic number");
!
! /* NOTE: cagney/1999-10-12: If this was hooked then don't bother
! with flush. */
! if (fputs_unfiltered_hook)
! return;
!
! switch (stream->ts_streamtype)
{
! case astring:
! break;
! case afile:
! fflush (stream->ts_filestream);
! break;
}
}
void
next reply other threads:[~1999-10-13 1:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-10-13 1:47 Andrew Cagney [this message]
1999-10-13 9:47 ` James Ingham
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3804470B.4B043B05@cygnus.com \
--to=ac131313@cygnus.com \
--cc=gdb-patches@sourceware.cygnus.com \
--cc=insight@sourceware.cygnus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).