Tue Dec 22 10:51:33 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
* top.c: specify directory name for including readline.h * tracepoint.c: ditto. * utils.c: ditto.
This commit is contained in:
parent
329d0a3702
commit
57ac5cfff1
@ -1,3 +1,11 @@
|
|||||||
|
Tue Dec 22 10:51:33 1998 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
|
||||||
|
|
||||||
|
* top.c: specify directory name for including readline.h
|
||||||
|
|
||||||
|
* tracepoint.c: ditto.
|
||||||
|
|
||||||
|
* utils.c: ditto.
|
||||||
|
|
||||||
Mon Dec 21 13:30:34 1998 Mark Alexander <marka@cygnus.com>
|
Mon Dec 21 13:30:34 1998 Mark Alexander <marka@cygnus.com>
|
||||||
|
|
||||||
* value.c (value_virtual_fn_field): Handle the situation where
|
* value.c (value_virtual_fn_field): Handle the situation where
|
||||||
|
@ -36,7 +36,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
|||||||
#include "top.h"
|
#include "top.h"
|
||||||
|
|
||||||
/* readline include files */
|
/* readline include files */
|
||||||
#include "readline.h"
|
#include "readline/readline.h"
|
||||||
#include "history.h"
|
#include "history.h"
|
||||||
|
|
||||||
/* readline defines this. */
|
/* readline defines this. */
|
||||||
|
@ -33,7 +33,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
|||||||
#include "ax-gdb.h"
|
#include "ax-gdb.h"
|
||||||
|
|
||||||
/* readline include files */
|
/* readline include files */
|
||||||
#include "readline.h"
|
#include "readline/readline.h"
|
||||||
#include "history.h"
|
#include "history.h"
|
||||||
|
|
||||||
/* readline defines this. */
|
/* readline defines this. */
|
||||||
|
62
gdb/utils.c
62
gdb/utils.c
@ -1,5 +1,5 @@
|
|||||||
/* General utility routines for GDB, the GNU debugger.
|
/* General utility routines for GDB, the GNU debugger.
|
||||||
Copyright 1986, 89, 90, 91, 92, 95, 1996 Free Software Foundation, Inc.
|
Copyright 1986, 89, 90, 91, 92, 95, 96, 1998 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GDB.
|
This file is part of GDB.
|
||||||
|
|
||||||
@ -18,17 +18,24 @@ along with this program; if not, write to the Free Software
|
|||||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#ifdef ANSI_PROTOTYPES
|
|
||||||
#include <stdarg.h>
|
|
||||||
#else
|
|
||||||
#include <varargs.h>
|
|
||||||
#endif
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include "gdb_string.h"
|
#include "gdb_string.h"
|
||||||
#ifdef HAVE_UNISTD_H
|
#ifdef HAVE_UNISTD_H
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_CURSES_H
|
||||||
|
#include <curses.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_TERM_H
|
||||||
|
#include <term.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* SunOS's curses.h has a '#define reg register' in it. Thank you Sun. */
|
||||||
|
#ifdef reg
|
||||||
|
#undef reg
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "signals.h"
|
#include "signals.h"
|
||||||
#include "gdbcmd.h"
|
#include "gdbcmd.h"
|
||||||
#include "serial.h"
|
#include "serial.h"
|
||||||
@ -39,7 +46,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
|||||||
#include "language.h"
|
#include "language.h"
|
||||||
#include "annotate.h"
|
#include "annotate.h"
|
||||||
|
|
||||||
#include "readline.h"
|
#include "readline/readline.h"
|
||||||
|
|
||||||
/* readline defines this. */
|
/* readline defines this. */
|
||||||
#undef savestring
|
#undef savestring
|
||||||
@ -358,10 +365,15 @@ warning (va_alist)
|
|||||||
va_start (args);
|
va_start (args);
|
||||||
string = va_arg (args, char *);
|
string = va_arg (args, char *);
|
||||||
#endif
|
#endif
|
||||||
warning_begin ();
|
if (warning_hook)
|
||||||
vfprintf_unfiltered (gdb_stderr, string, args);
|
(*warning_hook) (string, args);
|
||||||
fprintf_unfiltered (gdb_stderr, "\n");
|
else
|
||||||
va_end (args);
|
{
|
||||||
|
warning_begin ();
|
||||||
|
vfprintf_unfiltered (gdb_stderr, string, args);
|
||||||
|
fprintf_unfiltered (gdb_stderr, "\n");
|
||||||
|
va_end (args);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Start the printing of an error message. Way to use this is to call
|
/* Start the printing of an error message. Way to use this is to call
|
||||||
@ -1598,6 +1610,18 @@ fputc_unfiltered (c, stream)
|
|||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
fputc_filtered (c, stream)
|
||||||
|
int c;
|
||||||
|
FILE * stream;
|
||||||
|
{
|
||||||
|
char buf[2];
|
||||||
|
|
||||||
|
buf[0] = c;
|
||||||
|
buf[1] = 0;
|
||||||
|
fputs_filtered (buf, stream);
|
||||||
|
return c;
|
||||||
|
}
|
||||||
|
|
||||||
/* puts_debug is like fputs_unfiltered, except it prints special
|
/* puts_debug is like fputs_unfiltered, except it prints special
|
||||||
characters in printable fashion. */
|
characters in printable fashion. */
|
||||||
@ -1612,16 +1636,16 @@ puts_debug (prefix, string, suffix)
|
|||||||
|
|
||||||
/* Print prefix and suffix after each line. */
|
/* Print prefix and suffix after each line. */
|
||||||
static int new_line = 1;
|
static int new_line = 1;
|
||||||
static int carriage_return = 0;
|
static int return_p = 0;
|
||||||
static char *prev_prefix = "";
|
static char *prev_prefix = "";
|
||||||
static char *prev_suffix = "";
|
static char *prev_suffix = "";
|
||||||
|
|
||||||
if (*string == '\n')
|
if (*string == '\n')
|
||||||
carriage_return = 0;
|
return_p = 0;
|
||||||
|
|
||||||
/* If the prefix is changing, print the previous suffix, a new line,
|
/* If the prefix is changing, print the previous suffix, a new line,
|
||||||
and the new prefix. */
|
and the new prefix. */
|
||||||
if ((carriage_return || (strcmp(prev_prefix, prefix) != 0)) && !new_line)
|
if ((return_p || (strcmp(prev_prefix, prefix) != 0)) && !new_line)
|
||||||
{
|
{
|
||||||
fputs_unfiltered (prev_suffix, gdb_stderr);
|
fputs_unfiltered (prev_suffix, gdb_stderr);
|
||||||
fputs_unfiltered ("\n", gdb_stderr);
|
fputs_unfiltered ("\n", gdb_stderr);
|
||||||
@ -1648,7 +1672,7 @@ puts_debug (prefix, string, suffix)
|
|||||||
fputc_unfiltered (ch, gdb_stderr);
|
fputc_unfiltered (ch, gdb_stderr);
|
||||||
|
|
||||||
else
|
else
|
||||||
fprintf_unfiltered (gdb_stderr, "\\%03o", ch);
|
fprintf_unfiltered (gdb_stderr, "\\x%02x", ch & 0xff);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case '\\': fputs_unfiltered ("\\\\", gdb_stderr); break;
|
case '\\': fputs_unfiltered ("\\\\", gdb_stderr); break;
|
||||||
@ -1661,7 +1685,7 @@ puts_debug (prefix, string, suffix)
|
|||||||
case '\v': fputs_unfiltered ("\\v", gdb_stderr); break;
|
case '\v': fputs_unfiltered ("\\v", gdb_stderr); break;
|
||||||
}
|
}
|
||||||
|
|
||||||
carriage_return = ch == '\r';
|
return_p = ch == '\r';
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Print suffix if we printed a newline. */
|
/* Print suffix if we printed a newline. */
|
||||||
@ -1989,9 +2013,11 @@ fprintf_symbol_filtered (stream, name, lang, arg_mode)
|
|||||||
case language_cplus:
|
case language_cplus:
|
||||||
demangled = cplus_demangle (name, arg_mode);
|
demangled = cplus_demangle (name, arg_mode);
|
||||||
break;
|
break;
|
||||||
|
/* start-sanitize-java */
|
||||||
case language_java:
|
case language_java:
|
||||||
demangled = cplus_demangle (name, arg_mode | DMGL_JAVA);
|
demangled = cplus_demangle (name, arg_mode | DMGL_JAVA);
|
||||||
break;
|
break;
|
||||||
|
/* end-sanitize-java */
|
||||||
case language_chill:
|
case language_chill:
|
||||||
demangled = chill_demangle (name);
|
demangled = chill_demangle (name);
|
||||||
break;
|
break;
|
||||||
@ -2115,7 +2141,7 @@ initialize_utils ()
|
|||||||
#if defined(SIGWINCH) && defined(SIGWINCH_HANDLER)
|
#if defined(SIGWINCH) && defined(SIGWINCH_HANDLER)
|
||||||
|
|
||||||
/* If there is a better way to determine the window size, use it. */
|
/* If there is a better way to determine the window size, use it. */
|
||||||
SIGWINCH_HANDLER ();
|
SIGWINCH_HANDLER (SIGWINCH);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
/* If the output is not a terminal, don't paginate it. */
|
/* If the output is not a terminal, don't paginate it. */
|
||||||
@ -2259,7 +2285,7 @@ floatformat_to_doublest (fmt, from, to)
|
|||||||
|
|
||||||
if (newfrom == NULL)
|
if (newfrom == NULL)
|
||||||
{
|
{
|
||||||
newfrom = xmalloc (fmt -> totalsize);
|
newfrom = (unsigned char *) xmalloc (fmt -> totalsize);
|
||||||
}
|
}
|
||||||
swapout = newfrom;
|
swapout = newfrom;
|
||||||
swapin = ufrom;
|
swapin = ufrom;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user