From: Stu Grossman <grossman@cygnus.com>
To: gdb-patches@cygnus.com
Subject: Re: gdb-4.17 patch to fix filehandle-mode for DJGPP
Date: Thu, 01 Apr 1999 00:00:00 -0000 [thread overview]
Message-ID: <13987.26926.288559.877952@babylon-5.cygnus.com> (raw)
In-Reply-To: <003701be4261$47f12700$19a46d86@robby.dittmannsdorf.de>
Robert Hoehne writes:
> On MSDOS, the debugger and the debuggee share file handles.
> If the debuggee switches its stdin to binary mode, the same
> happens to the debugger's stdin, and fgetc loses. We
> need therefore to switch stdin to TEXT mode. When not longer
> needed, the original mode of stdin is reset.
The same situation exists for Unix, and GDB handles that correctly. There are
several target vectore entries which are used to save and restore the console's
state between GDB and the target program. Your fixes need to be applied there,
not in GDB's generic console I/O code. See the following macros in target.h
for details:
/* Initialize the terminal settings we record for the inferior,
before we actually run the inferior. */
#define target_terminal_init() \
(*current_target.to_terminal_init) ()
/* Put the inferior's terminal settings into effect.
This is preparation for starting or resuming the inferior. */
#define target_terminal_inferior() \
(*current_target.to_terminal_inferior) ()
/* Put some of our terminal settings into effect,
enough to get proper results from our output,
but do not change into or out of RAW mode
so that no input is discarded.
After doing this, either terminal_ours or terminal_inferior
should be called to get back to a normal state of affairs. */
#define target_terminal_ours_for_output() \
(*current_target.to_terminal_ours_for_output) ()
/* Put our terminal settings into effect.
First record the inferior's terminal settings
so they can be restored properly later. */
#define target_terminal_ours() \
(*current_target.to_terminal_ours) ()
/* Print useful information about our terminal status, if such a thing
exists. */
#define target_terminal_info(arg, from_tty) \
(*current_target.to_terminal_info) (arg, from_tty)
WARNING: multiple messages have this Message-ID
From: Stu Grossman <grossman@cygnus.com>
To: gdb-patches@cygnus.com
Subject: Re: gdb-4.17 patch to fix filehandle-mode for DJGPP
Date: Mon, 18 Jan 1999 09:02:00 -0000 [thread overview]
Message-ID: <13987.26926.288559.877952@babylon-5.cygnus.com> (raw)
Message-ID: <19990118090200.12s4IoD7-TbviQIPUF-KvqQUsMhrEmZGW4H_zGNfTbY@z> (raw)
In-Reply-To: <003701be4261$47f12700$19a46d86@robby.dittmannsdorf.de>
Robert Hoehne writes:
> On MSDOS, the debugger and the debuggee share file handles.
> If the debuggee switches its stdin to binary mode, the same
> happens to the debugger's stdin, and fgetc loses. We
> need therefore to switch stdin to TEXT mode. When not longer
> needed, the original mode of stdin is reset.
The same situation exists for Unix, and GDB handles that correctly. There are
several target vectore entries which are used to save and restore the console's
state between GDB and the target program. Your fixes need to be applied there,
not in GDB's generic console I/O code. See the following macros in target.h
for details:
/* Initialize the terminal settings we record for the inferior,
before we actually run the inferior. */
#define target_terminal_init() \
(*current_target.to_terminal_init) ()
/* Put the inferior's terminal settings into effect.
This is preparation for starting or resuming the inferior. */
#define target_terminal_inferior() \
(*current_target.to_terminal_inferior) ()
/* Put some of our terminal settings into effect,
enough to get proper results from our output,
but do not change into or out of RAW mode
so that no input is discarded.
After doing this, either terminal_ours or terminal_inferior
should be called to get back to a normal state of affairs. */
#define target_terminal_ours_for_output() \
(*current_target.to_terminal_ours_for_output) ()
/* Put our terminal settings into effect.
First record the inferior's terminal settings
so they can be restored properly later. */
#define target_terminal_ours() \
(*current_target.to_terminal_ours) ()
/* Print useful information about our terminal status, if such a thing
exists. */
#define target_terminal_info(arg, from_tty) \
(*current_target.to_terminal_info) (arg, from_tty)
next prev parent reply other threads:[~1999-04-01 0:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-04-01 0:00 Robert Hoehne
1999-01-17 11:36 ` Robert Hoehne
1999-04-01 0:00 ` Stu Grossman [this message]
1999-01-18 9:02 ` Stu Grossman
-- strict thread matches above, loose matches on Subject: below --
1999-01-20 10:06 Robert Hoehne
1999-04-01 0:00 ` Robert Hoehne
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=13987.26926.288559.877952@babylon-5.cygnus.com \
--to=grossman@cygnus.com \
--cc=gdb-patches@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