mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2025-03-03 15:07:59 +00:00
* utils.c (request_quit): Re-establish signal handler regardless
of USG. * config/mips/xm-irix4.h: Define HAVE_TERMIOS.
This commit is contained in:
parent
9850662034
commit
44a09a68f2
@ -1,3 +1,10 @@
|
|||||||
|
Fri Jan 14 14:17:06 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
|
||||||
|
|
||||||
|
* utils.c (request_quit): Re-establish signal handler regardless
|
||||||
|
of USG.
|
||||||
|
|
||||||
|
* config/mips/xm-irix4.h: Define HAVE_TERMIOS.
|
||||||
|
|
||||||
Fri Jan 14 21:55:39 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
|
Fri Jan 14 21:55:39 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
|
||||||
|
|
||||||
* i960-tdep.c: Include target.h.
|
* i960-tdep.c: Include target.h.
|
||||||
@ -13,6 +20,7 @@ Fri Jan 14 11:06:10 1994 Jim Kingdon (kingdon@deneb.cygnus.com)
|
|||||||
* config/nm-lynx.h: Fix child_wait prototype and include target.h.
|
* config/nm-lynx.h: Fix child_wait prototype and include target.h.
|
||||||
|
|
||||||
Fri Jan 14 14:17:06 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
|
Fri Jan 14 14:17:06 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
|
||||||
|
>>>>>>> 1.2118
|
||||||
|
|
||||||
* Makefile.in (ALLPARAM): Add config/nm-lynx.h.
|
* Makefile.in (ALLPARAM): Add config/nm-lynx.h.
|
||||||
|
|
||||||
|
@ -28,3 +28,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
#define PSIGNAL_IN_SIGNAL_H
|
#define PSIGNAL_IN_SIGNAL_H
|
||||||
|
|
||||||
#define BROKEN_SIGINFO_H /* <sys/siginfo.h> si_pid & si_uid are bogus */
|
#define BROKEN_SIGINFO_H /* <sys/siginfo.h> si_pid & si_uid are bogus */
|
||||||
|
|
||||||
|
/* Irix 4.0.1 and later have termios. Not sure about earlier versions. */
|
||||||
|
#undef HAVE_TERMIO
|
||||||
|
#define HAVE_TERMIOS
|
||||||
|
88
gdb/utils.c
88
gdb/utils.c
@ -402,6 +402,9 @@ print_sys_errmsg (string, errcode)
|
|||||||
strcat (combined, ": ");
|
strcat (combined, ": ");
|
||||||
strcat (combined, err);
|
strcat (combined, err);
|
||||||
|
|
||||||
|
/* We want anything which was printed on stdout to come out first, before
|
||||||
|
this message. */
|
||||||
|
gdb_flush (gdb_stdout);
|
||||||
fprintf_unfiltered (gdb_stderr, "%s.\n", combined);
|
fprintf_unfiltered (gdb_stderr, "%s.\n", combined);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -413,10 +416,21 @@ quit ()
|
|||||||
serial_t gdb_stdout_serial = serial_fdopen (1);
|
serial_t gdb_stdout_serial = serial_fdopen (1);
|
||||||
|
|
||||||
target_terminal_ours ();
|
target_terminal_ours ();
|
||||||
wrap_here ((char *)0); /* Force out any pending output */
|
|
||||||
|
|
||||||
|
/* We want all output to appear now, before we print "Quit". We
|
||||||
|
have 3 levels of buffering we have to flush (it's possible that
|
||||||
|
some of these should be changed to flush the lower-level ones
|
||||||
|
too): */
|
||||||
|
|
||||||
|
/* 1. The _filtered buffer. */
|
||||||
|
wrap_here ((char *)0);
|
||||||
|
|
||||||
|
/* 2. The stdio buffer. */
|
||||||
|
gdb_flush (gdb_stdout);
|
||||||
|
gdb_flush (gdb_stderr);
|
||||||
|
|
||||||
|
/* 3. The system-level buffer. */
|
||||||
SERIAL_FLUSH_OUTPUT (gdb_stdout_serial);
|
SERIAL_FLUSH_OUTPUT (gdb_stdout_serial);
|
||||||
|
|
||||||
SERIAL_UN_FDOPEN (gdb_stdout_serial);
|
SERIAL_UN_FDOPEN (gdb_stdout_serial);
|
||||||
|
|
||||||
/* Don't use *_filtered; we don't want to prompt the user to continue. */
|
/* Don't use *_filtered; we don't want to prompt the user to continue. */
|
||||||
@ -446,16 +460,49 @@ pollquit()
|
|||||||
if (kbhit ())
|
if (kbhit ())
|
||||||
{
|
{
|
||||||
int k = getkey ();
|
int k = getkey ();
|
||||||
if (k == 1)
|
if (k == 1) {
|
||||||
quit_flag = 1;
|
quit_flag = 1;
|
||||||
else if (k == 2)
|
quit();
|
||||||
|
}
|
||||||
|
else if (k == 2) {
|
||||||
immediate_quit = 1;
|
immediate_quit = 1;
|
||||||
quit ();
|
quit ();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* We just ignore it */
|
||||||
|
fprintf_unfiltered (gdb_stderr, "CTRL-A to quit, CTRL-B to quit harder\n");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
#endif
|
||||||
|
#ifdef __GO32__
|
||||||
|
void notice_quit()
|
||||||
|
{
|
||||||
|
if (kbhit ())
|
||||||
|
{
|
||||||
|
int k = getkey ();
|
||||||
|
if (k == 1) {
|
||||||
|
quit_flag = 1;
|
||||||
|
}
|
||||||
|
else if (k == 2)
|
||||||
|
{
|
||||||
|
immediate_quit = 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fprintf_unfiltered (gdb_stderr, "CTRL-A to quit, CTRL-B to quit harder\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
void notice_quit()
|
||||||
|
{
|
||||||
|
/* Done by signals */
|
||||||
|
}
|
||||||
|
#endif
|
||||||
/* Control C comes here */
|
/* Control C comes here */
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -464,10 +511,10 @@ request_quit (signo)
|
|||||||
{
|
{
|
||||||
quit_flag = 1;
|
quit_flag = 1;
|
||||||
|
|
||||||
#ifdef USG
|
/* Restore the signal handler. Harmless with BSD-style signals, needed
|
||||||
/* Restore the signal handler. */
|
for System V-style signals. So just always do it, rather than worrying
|
||||||
|
about USG defines and stuff like that. */
|
||||||
signal (signo, request_quit);
|
signal (signo, request_quit);
|
||||||
#endif
|
|
||||||
|
|
||||||
if (immediate_quit)
|
if (immediate_quit)
|
||||||
quit ();
|
quit ();
|
||||||
@ -1075,16 +1122,6 @@ gdb_fopen (name, mode)
|
|||||||
return fopen (name, mode);
|
return fopen (name, mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Like fputs but pause after every screenful, and can wrap at points
|
|
||||||
other than the final character of a line.
|
|
||||||
Unlike fputs, fputs_filtered does not return a value.
|
|
||||||
It is OK for LINEBUFFER to be NULL, in which case just don't print
|
|
||||||
anything.
|
|
||||||
|
|
||||||
Note that a longjmp to top level may occur in this routine
|
|
||||||
(since prompt_for_continue may do so) so this routine should not be
|
|
||||||
called when cleanups are not in place. */
|
|
||||||
|
|
||||||
void
|
void
|
||||||
gdb_flush (stream)
|
gdb_flush (stream)
|
||||||
FILE *stream;
|
FILE *stream;
|
||||||
@ -1092,6 +1129,19 @@ gdb_flush (stream)
|
|||||||
fflush (stream);
|
fflush (stream);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Like fputs but if FILTER is true, pause after every screenful.
|
||||||
|
|
||||||
|
Regardless of FILTER can wrap at points other than the final
|
||||||
|
character of a line.
|
||||||
|
|
||||||
|
Unlike fputs, fputs_maybe_filtered does not return a value.
|
||||||
|
It is OK for LINEBUFFER to be NULL, in which case just don't print
|
||||||
|
anything.
|
||||||
|
|
||||||
|
Note that a longjmp to top level may occur in this routine (only if
|
||||||
|
FILTER is true) (since prompt_for_continue may do so) so this
|
||||||
|
routine should not be called when cleanups are not in place. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
fputs_maybe_filtered (linebuffer, stream, filter)
|
fputs_maybe_filtered (linebuffer, stream, filter)
|
||||||
const char *linebuffer;
|
const char *linebuffer;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user