import gdb-2000-02-01 snapshot
authorJason Molenda <jmolenda@apple.com>
Wed, 2 Feb 2000 00:21:19 +0000 (00:21 +0000)
committerJason Molenda <jmolenda@apple.com>
Wed, 2 Feb 2000 00:21:19 +0000 (00:21 +0000)
89 files changed:
gdb/ChangeLog
gdb/Makefile.in
gdb/ax-gdb.c
gdb/ax-general.c
gdb/ax.h
gdb/buildsym.c
gdb/c-lang.c
gdb/c-lang.h
gdb/c-typeprint.c
gdb/c-valprint.c
gdb/ch-lang.c
gdb/ch-lang.h
gdb/ch-typeprint.c
gdb/ch-valprint.c
gdb/command.c
gdb/command.h
gdb/config/mn10300/tm-mn10300.h
gdb/config/pa/tm-hppa.h
gdb/convex-tdep.c
gdb/corefile.c
gdb/cp-valprint.c
gdb/d10v-tdep.c
gdb/d30v-tdep.c
gdb/defs.h
gdb/expprint.c
gdb/expression.h
gdb/f-lang.c
gdb/f-lang.h
gdb/f-typeprint.c
gdb/f-valprint.c
gdb/frame.h
gdb/gdb-events.sh
gdb/gdbcmd.h
gdb/gdbtypes.h
gdb/hppa-tdep.c
gdb/jv-lang.c
gdb/jv-lang.h
gdb/jv-typeprint.c
gdb/jv-valprint.c
gdb/language.c
gdb/language.h
gdb/m2-lang.c
gdb/m2-lang.h
gdb/m2-typeprint.c
gdb/m2-valprint.c
gdb/m3-nat.c
gdb/main.c
gdb/monitor.c
gdb/printcmd.c
gdb/pyr-tdep.c
gdb/remote-mips.c
gdb/remote-sim.c
gdb/remote-udi.c
gdb/remote.c
gdb/scm-lang.c
gdb/scm-lang.h
gdb/scm-valprint.c
gdb/ser-e7kpc.c
gdb/ser-go32.c
gdb/ser-mac.c
gdb/ser-ocd.c
gdb/ser-unix.c
gdb/ser-unix.h
gdb/serial.c
gdb/serial.h
gdb/stack.c
gdb/symfile.c
gdb/symmisc.c
gdb/tahoe-tdep.c
gdb/target.c
gdb/target.h
gdb/top.c
gdb/top.h
gdb/tui/ChangeLog
gdb/tui/tui-file.c
gdb/tui/tui-file.h
gdb/tui/tuiDisassem.c
gdb/tui/tuiIO.c
gdb/tui/tuiIO.h
gdb/tui/tuiRegs.c
gdb/typeprint.c
gdb/typeprint.h
gdb/ui-file.c [new file with mode: 0644]
gdb/ui-file.h [new file with mode: 0644]
gdb/utils.c
gdb/v850ice.c
gdb/valprint.c
gdb/valprint.h
gdb/value.h

index dbe6edc2c06b07f2c358aa59b5d70c2cfbff7cdb..00fd900fc814e4f6837f73593911b95f48a8b187 100644 (file)
@@ -1,3 +1,35 @@
+2000-02-01  Elena Zannoni  <ezannoni@kwikemart.cygnus.com>
+
+       * remote.c (getpkt_sane): New function. It is the old getpkt(),
+       which now returns a timeout indication.
+       (getpkt): New function. Wrapper for getpkt_sane(), so that return
+       value can still be ignored.
+
+Tue Feb  1 00:17:12 2000  Andrew Cagney  <cagney@b1.cygnus.com>
+
+       * ui-file.c, ui-file.h: Rename gdb-file.h, gdb-file.c.  Rename
+       ``struct gdb_file'' to ``struct ui_file''.  Delete typedef
+       GDB_FILE.
+       
+       * Makefile.in: Update.
+
+       * ax-gdb.c, ax-general.c, ax.h, buildsym.c, c-lang.c, c-lang.h,
+       c-typeprint.c, c-valprint.c, ch-lang.c, ch-lang.h, ch-typeprint.c,
+       ch-valprint.c, command.c, command.h, convex-tdep.c, corefile.c,
+       cp-valprint.c, d10v-tdep.c, d30v-tdep.c, defs.h, expprint.c,
+       expression.h, f-lang.c, f-lang.h, f-typeprint.c, f-valprint.c,
+       frame.h, gdb-events.sh, gdb-file.c, gdb-file.h, gdbcmd.h,
+       gdbtypes.h, hppa-tdep.c, jv-lang.c, jv-lang.h, jv-typeprint.c,
+       jv-valprint.c, language.c, language.h, m2-lang.c, m2-lang.h,
+       m2-typeprint.c, m2-valprint.c, m3-nat.c, main.c, monitor.c,
+       printcmd.c, pyr-tdep.c, remote-mips.c, remote-sim.c, remote-udi.c,
+       remote.c, scm-lang.c, scm-lang.h, scm-valprint.c, ser-e7kpc.c,
+       ser-go32.c, ser-mac.c, ser-ocd.c, ser-unix.c, ser-unix.h,
+       serial.c, serial.h, stack.c, symfile.c, symmisc.c, tahoe-tdep.c,
+       target.c, target.h, top.c, top.h, typeprint.c, typeprint.h,
+       utils.c, v850ice.c, valprint.c, valprint.h, value.h,
+       config/pa/tm-hppa.h: Update.
+
 2000-01-31  Jason Molenda  (jsm@bugshack.cygnus.com)
 
        * config/alpha/alpha-osf2.mh, config/alpha/alpha-osf3.mh, 
index 9de1d830ca6d60a8f803b87fc5f4f568e5b2a582..a97df49f9ff0ff26b077f285223c8286a3efb6bf 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999
+# Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
 # Free Software Foundation, Inc.
 
 # This file is part of GDB.
@@ -229,7 +229,7 @@ CDEPS = $(XM_CDEPS) $(TM_CDEPS) $(NAT_CDEPS) $(SIM) $(BFD) $(READLINE) \
 ADD_FILES = $(REGEX) $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)
 ADD_DEPS = $(REGEX1) $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)
 
-VERSION = 20000131
+VERSION = 20000201
 DIST=gdb
 
 LINT=/usr/5bin/lint
@@ -404,7 +404,7 @@ SFILES = ax-general.c ax-gdb.c bcache.c blockframe.c breakpoint.c \
        tui/tuiSource.h tui/tuiSourceWin.c tui/tuiSourceWin.h \
        tui/tuiStack.c tui/tuiStack.h tui/tuiWin.c tui/tuiWin.h \
        tui/tui-file.h tui/tui-file.c \
-       gdb-file.h gdb-file.c
+       ui-file.h ui-file.c
 
 LINTFILES = $(SFILES) $(YYFILES) @CONFIG_SRCS@ init.c
 
@@ -453,7 +453,7 @@ command_h = command.h
 gdbcmd_h =     gdbcmd.h $(command_h)
 
 call_cmds_h =  call-cmds.h
-defs_h =       defs.h xm.h tm.h nm.h config.status config.h gdbarch.h gdb-file.h
+defs_h =       defs.h xm.h tm.h nm.h config.status config.h gdbarch.h ui-file.h
 
 top_h =                top.h
 inferior_h =   inferior.h $(breakpoint_h)
@@ -535,7 +535,7 @@ COMMON_OBS = version.o blockframe.o breakpoint.o findvar.o stack.o thread.o \
        c-typeprint.o ch-typeprint.o f-typeprint.o m2-typeprint.o \
        c-valprint.o cp-valprint.o ch-valprint.o f-valprint.o m2-valprint.o \
        nlmread.o serial.o mdebugread.o os9kread.o top.o utils.o \
-       gdb-file.o tui-file.o
+       ui-file.o tui-file.o
 
 OBS = $(COMMON_OBS) $(ANNOTATE_OBS)
 
@@ -1605,7 +1605,7 @@ stabsread.o: stabsread.c $(bfd_h) $(INCLUDE_DIR)/aout/stab.def \
 stack.o: stack.c $(defs_h) $(gdbcmd_h) $(gdbcore_h) $(inferior_h) \
        language.h target.h gdb_string.h
 
-gdb-file.o: gdb-file.c $(defs_h) gdb-file.h
+ui-file.o: ui-file.c $(defs_h) ui-file.h
 tui-file.o: $(srcdir)/tui/tui-file.c $(defs_h) $(srcdir)/tui/tui-file.h
        $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-file.c
 
index 218dd6e7345380384ba2f38096a3d06f362234ee..51fe5b6d54c4227dc2d0844bb15d2b772b178528 100644 (file)
@@ -1,5 +1,5 @@
 /* GDB-specific functions for operating on agent expressions
-   Copyright 1998 Free Software Foundation, Inc.
+   Copyright 1998, 2000 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -149,7 +149,7 @@ static void gen_expr PARAMS ((union exp_element ** pc,
                              struct agent_expr * ax,
                              struct axs_value * value));
 
-static void print_axs_value PARAMS ((GDB_FILE * f, struct axs_value * value));
+static void print_axs_value (struct ui_file *f, struct axs_value * value);
 static void agent_command PARAMS ((char *exp, int from_tty));
 \f
 
@@ -1879,7 +1879,7 @@ gen_trace_for_expr (scope, expr)
 
 static void
 print_axs_value (f, value)
-     GDB_FILE *f;
+     struct ui_file *f;
      struct axs_value *value;
 {
   switch (value->kind)
index 6020ed7da1a62937a55a904763991b78e9bd33ea..34ec3b3071ed42273b35ccbb9e69d5f9da7ba187 100644 (file)
@@ -1,5 +1,5 @@
 /* Functions for manipulating expressions designed to be executed on the agent
-   Copyright 1998 Free Software Foundation, Inc.
+   Copyright 1998, 2000 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -350,7 +350,7 @@ struct aop_map aop_map[] =
 /* Disassemble the expression EXPR, writing to F.  */
 void
 ax_print (f, x)
-     GDB_FILE *f;
+     struct ui_file *f;
      struct agent_expr *x;
 {
   int i;
index 0467626aeb2ced0c427b27cadda53357355f6c05..bf1fd2c8622a98ee7a3798a0a5c9b27fc929f81f 100644 (file)
--- a/gdb/ax.h
+++ b/gdb/ax.h
@@ -1,5 +1,5 @@
 /* Definitions for expressions designed to be executed on the agent
-   Copyright 1998 Free Software Foundation, Inc.
+   Copyright 1998, 2000 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -186,7 +186,7 @@ extern void ax_reg PARAMS ((struct agent_expr * EXPR, int REG));
    things.  */
 
 /* Disassemble the expression EXPR, writing to F.  */
-extern void ax_print PARAMS ((GDB_FILE * f, struct agent_expr * EXPR));
+extern void ax_print (struct ui_file *f, struct agent_expr * EXPR);
 
 /* An entry in the opcode map.  */
 struct aop_map
index 5668afc482d0e2fad3cdfd8d962fd9122debf02e..867a5db7bcdd3b37379c3eca91b6ac5aa6e1b8f0 100644 (file)
@@ -1,5 +1,5 @@
 /* Support routines for building symbol tables in GDB's internal format.
-   Copyright 1986-1999 Free Software Foundation, Inc.
+   Copyright 1986-2000 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -492,7 +492,7 @@ make_blockvector (struct objfile *objfile)
                 long.  Possible solutions include a version of
                 complain which takes a callback, a
                 sprintf_address_numeric to match
-                print_address_numeric, or a way to set up a GDB_FILE
+                print_address_numeric, or a way to set up a UI_FILE
                 which causes sprintf rather than fprintf to be
                 called.  */
 
index 16046cf016a41e4566f6112a50528bc859db11e9..35f86a89391f8dbf5726c6cf410aa9cfb700d7f5 100644 (file)
@@ -1,5 +1,5 @@
 /* C language support routines for GDB, the GNU debugger.
-   Copyright 1992, 1993, 1994 Free Software Foundation, Inc.
+   Copyright 1992, 1993, 1994, 2000 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -27,7 +27,7 @@
 #include "c-lang.h"
 
 extern void _initialize_c_language PARAMS ((void));
-static void c_emit_char PARAMS ((int c, GDB_FILE * stream, int quoter));
+static void c_emit_char (int c, struct ui_file * stream, int quoter);
 
 /* Print the character C on STREAM as part of the contents of a literal
    string whose delimiter is QUOTER.  Note that that format for printing
@@ -36,7 +36,7 @@ static void c_emit_char PARAMS ((int c, GDB_FILE * stream, int quoter));
 static void
 c_emit_char (c, stream, quoter)
      register int c;
-     GDB_FILE *stream;
+     struct ui_file *stream;
      int quoter;
 {
   c &= 0xFF;                   /* Avoid sign bit follies */
@@ -84,7 +84,7 @@ c_emit_char (c, stream, quoter)
 void
 c_printchar (c, stream)
      int c;
-     GDB_FILE *stream;
+     struct ui_file *stream;
 {
   fputc_filtered ('\'', stream);
   LA_EMIT_CHAR (c, stream, '\'');
@@ -99,7 +99,7 @@ c_printchar (c, stream)
 
 void
 c_printstr (stream, string, length, width, force_ellipses)
-     GDB_FILE *stream;
+     struct ui_file *stream;
      char *string;
      unsigned int length;
      int width;
index 62b5880b2948bc51f00013ee486a38e68c650901..6cae708d3fd657099735863b99aa9c9d59dec48c 100644 (file)
@@ -1,5 +1,5 @@
 /* C language support definitions for GDB, the GNU debugger.
-   Copyright 1992, 1996 Free Software Foundation, Inc.
+   Copyright 1992, 1996, 2000 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -31,23 +31,24 @@ c_parse PARAMS ((void));    /* Defined in c-exp.y */
 extern void
 c_error PARAMS ((char *));     /* Defined in c-exp.y */
 
-extern void                    /* Defined in c-typeprint.c */
-c_print_type PARAMS ((struct type *, char *, GDB_FILE *, int, int));
+/* Defined in c-typeprint.c */
+extern void c_print_type (struct type *, char *, struct ui_file *, int,
+                         int);
 
-extern int
-c_val_print PARAMS ((struct type *, char *, int, CORE_ADDR, GDB_FILE *, int, int,
-                    int, enum val_prettyprint));
+extern int c_val_print (struct type *, char *, int, CORE_ADDR,
+                       struct ui_file *, int, int, int,
+                       enum val_prettyprint);
 
-extern int
-c_value_print PARAMS ((struct value *, GDB_FILE *, int, enum val_prettyprint));
+extern int c_value_print (struct value *, struct ui_file *, int,
+                         enum val_prettyprint);
 
 /* These are in c-lang.c: */
 
-extern void c_printchar PARAMS ((int, GDB_FILE *));
+extern void c_printchar (int, struct ui_file *);
 
-extern void c_printstr PARAMS ((GDB_FILE * stream, char *string,
-                               unsigned int length, int width,
-                               int force_ellipses));
+extern void c_printstr (struct ui_file * stream, char *string,
+                       unsigned int length, int width,
+                       int force_ellipses);
 
 extern struct type *c_create_fundamental_type PARAMS ((struct objfile *, int));
 
@@ -55,11 +56,10 @@ extern struct type **CONST_PTR (c_builtin_types[]);
 
 /* These are in c-typeprint.c: */
 
-extern void
-c_type_print_base PARAMS ((struct type *, GDB_FILE *, int, int));
+extern void c_type_print_base (struct type *, struct ui_file *, int, int);
 
-extern void
-c_type_print_varspec_prefix PARAMS ((struct type *, GDB_FILE *, int, int));
+extern void c_type_print_varspec_prefix (struct type *, struct ui_file *,
+                                        int, int);
 
 /* These are in cp-valprint.c */
 
@@ -67,16 +67,15 @@ extern int vtblprint;               /* Controls printing of vtbl's */
 
 extern int static_field_print;
 
-extern void
-cp_print_class_member PARAMS ((char *, struct type *, GDB_FILE *, char *));
+extern void cp_print_class_member (char *, struct type *, struct ui_file *,
+                                  char *);
 
-extern void
-cp_print_class_method PARAMS ((char *, struct type *, GDB_FILE *));
+extern void cp_print_class_method (char *, struct type *, struct ui_file *);
 
-extern void
-cp_print_value_fields PARAMS ((struct type *, struct type *, char *, int, CORE_ADDR,
-                              GDB_FILE *, int, int, enum val_prettyprint,
-                              struct type **, int));
+extern void cp_print_value_fields (struct type *, struct type *, char *,
+                                  int, CORE_ADDR, struct ui_file *, int,
+                                  int, enum val_prettyprint,
+                                  struct type **, int);
 
 extern int
 cp_is_vtbl_ptr_type PARAMS ((struct type *));
index 90b626d8a95cfc58bb875654de1dce22632fb306..bdcc61f0e43b81022b0a2257c06c4fb2244e9898 100644 (file)
@@ -1,5 +1,5 @@
 /* Support for printing C and C++ types for GDB, the GNU debugger.
-   Copyright 1986, 1988, 1989, 1991, 1993, 1994, 1995, 1996, 1998, 1999
+   Copyright 1986, 1988, 1989, 1991, 1993-1996, 1998-2000
    Free Software Foundation, Inc.
 
    This file is part of GDB.
 /* Flag indicating target was compiled by HP compiler */
 extern int hp_som_som_object_present;
 
-static void cp_type_print_method_args PARAMS ((struct type ** args, char *prefix, char *varstring, int staticp, GDB_FILE * stream));
+static void cp_type_print_method_args (struct type ** args, char *prefix,
+                                      char *varstring, int staticp,
+                                      struct ui_file *stream);
 
-static void
-c_type_print_args PARAMS ((struct type *, GDB_FILE *));
+static void c_type_print_args (struct type *, struct ui_file *);
 
-static void
-cp_type_print_derivation_info PARAMS ((GDB_FILE *, struct type *));
+static void cp_type_print_derivation_info (struct ui_file *, struct type *);
 
-void
-c_type_print_varspec_prefix PARAMS ((struct type *, GDB_FILE *, int, int));
+void c_type_print_varspec_prefix (struct type *, struct ui_file *, int,
+                                 int);
 
-static void
-c_type_print_cv_qualifier PARAMS ((struct type *, GDB_FILE *, int, int));
+static void c_type_print_cv_qualifier (struct type *, struct ui_file *,
+                                      int, int);
 \f
 
 
@@ -66,7 +66,7 @@ void
 c_typedef_print (type, new, stream)
      struct type *type;
      struct symbol *new;
-     GDB_FILE *stream;
+     struct ui_file *stream;
 {
   CHECK_TYPEDEF (type);
   switch (current_language->la_language)
@@ -116,7 +116,7 @@ void
 c_print_type (type, varstring, stream, show, level)
      struct type *type;
      char *varstring;
-     GDB_FILE *stream;
+     struct ui_file *stream;
      int show;
      int level;
 {
@@ -183,7 +183,7 @@ c_print_type (type, varstring, stream, show, level)
 
 static void
 cp_type_print_derivation_info (stream, type)
-     GDB_FILE *stream;
+     struct ui_file *stream;
      struct type *type;
 {
   char *name;
@@ -212,7 +212,7 @@ cp_type_print_method_args (args, prefix, varstring, staticp, stream)
      char *prefix;
      char *varstring;
      int staticp;
-     GDB_FILE *stream;
+     struct ui_file *stream;
 {
   int i;
 
@@ -258,7 +258,7 @@ cp_type_print_method_args (args, prefix, varstring, staticp, stream)
 void
 c_type_print_varspec_prefix (type, stream, show, passed_a_ptr)
      struct type *type;
-     GDB_FILE *stream;
+     struct ui_file *stream;
      int show;
      int passed_a_ptr;
 {
@@ -356,7 +356,7 @@ c_type_print_varspec_prefix (type, stream, show, passed_a_ptr)
 static void
 c_type_print_cv_qualifier (type, stream, need_pre_space, need_post_space)
      struct type *type;
-     GDB_FILE *stream;
+     struct ui_file *stream;
      int need_pre_space;
      int need_post_space;
 {
@@ -388,7 +388,7 @@ c_type_print_cv_qualifier (type, stream, need_pre_space, need_post_space)
 static void
 c_type_print_args (type, stream)
      struct type *type;
-     GDB_FILE *stream;
+     struct ui_file *stream;
 {
   int i;
   struct type **args;
@@ -440,7 +440,7 @@ c_type_print_args (type, stream)
 void
 c_type_print_varspec_suffix (type, stream, show, passed_a_ptr, demangled_args)
      struct type *type;
-     GDB_FILE *stream;
+     struct ui_file *stream;
      int show;
      int passed_a_ptr;
      int demangled_args;
@@ -563,7 +563,7 @@ c_type_print_varspec_suffix (type, stream, show, passed_a_ptr, demangled_args)
 void
 c_type_print_base (type, stream, show, level)
      struct type *type;
-     GDB_FILE *stream;
+     struct ui_file *stream;
      int show;
      int level;
 {
index bc3666ab027d78b3942595b20ad2fc3bf96523b7..10bcda7eb87701386cc6eb6d97a13d9f29378688 100644 (file)
@@ -1,5 +1,5 @@
 /* Support for printing C values for GDB, the GNU debugger.
-   Copyright 1986, 1988, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997
+   Copyright 1986, 1988, 1989, 1991-1997, 2000
    Free Software Foundation, Inc.
 
    This file is part of GDB.
@@ -50,7 +50,7 @@ c_val_print (type, valaddr, embedded_offset, address, stream, format, deref_ref,
      char *valaddr;
      int embedded_offset;
      CORE_ADDR address;
-     GDB_FILE *stream;
+     struct ui_file *stream;
      int format;
      int deref_ref;
      int recurse;
@@ -453,7 +453,7 @@ c_val_print (type, valaddr, embedded_offset, address, stream, format, deref_ref,
 int
 c_value_print (val, stream, format, pretty)
      value_ptr val;
-     GDB_FILE *stream;
+     struct ui_file *stream;
      int format;
      enum val_prettyprint pretty;
 {
index c3a3d90719ef739eb3002a8f4f28ea46969a6f96..d56a2dcb201137f5c7c5a91222c189c790bb3d69 100644 (file)
@@ -1,5 +1,5 @@
 /* Chill language support routines for GDB, the GNU debugger.
-   Copyright 1992, 1995, 1996 Free Software Foundation, Inc.
+   Copyright 1992, 1995, 1996, 2000 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -44,11 +44,11 @@ static value_ptr
 static struct type *
   chill_create_fundamental_type PARAMS ((struct objfile *, int));
 
-static void
-chill_printstr PARAMS ((GDB_FILE * stream, char *string, unsigned int length, int width, int force_ellipses));
+static void chill_printstr (struct ui_file * stream, char *string,
+                           unsigned int length, int width,
+                           int force_ellipses);
 
-static void
-chill_printchar PARAMS ((int, GDB_FILE *));
+static void chill_printchar (int, struct ui_file *);
 
 /* For now, Chill uses a simple mangling algorithm whereby you simply
    discard everything after the occurance of two successive CPLUS_MARKER
@@ -85,7 +85,7 @@ chill_demangle (mangled)
 static void
 chill_printchar (c, stream)
      register int c;
-     GDB_FILE *stream;
+     struct ui_file *stream;
 {
   c &= 0xFF;                   /* Avoid sign bit follies */
 
@@ -115,7 +115,7 @@ chill_printchar (c, stream)
 
 static void
 chill_printstr (stream, string, length, width, force_ellipses)
-     GDB_FILE *stream;
+     struct ui_file *stream;
      char *string;
      unsigned int length;
      int width;
index 2957872323f58537bc19fae99f10542e3b47bb67..8df180422b7b069e23351c95509b459e13c3af31 100644 (file)
@@ -1,5 +1,5 @@
 /* Chill language support definitions for GDB, the GNU debugger.
-   Copyright 1992 Free Software Foundation, Inc.
+   Copyright 1992, 2000 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -27,16 +27,16 @@ chill_parse PARAMS ((void));        /* Defined in ch-exp.y */
 extern void
 chill_error PARAMS ((char *)); /* Defined in ch-exp.y */
 
-extern void                    /* Defined in ch-typeprint.c */
-chill_print_type PARAMS ((struct type *, char *, GDB_FILE *, int, int));
+/* Defined in ch-typeprint.c */
+extern void chill_print_type (struct type *, char *, struct ui_file *, int,
+                             int);
 
-extern int
-chill_val_print PARAMS ((struct type *, char *, int, CORE_ADDR, GDB_FILE *, int, int,
-                        int, enum val_prettyprint));
+extern int chill_val_print (struct type *, char *, int, CORE_ADDR,
+                           struct ui_file *, int, int, int,
+                           enum val_prettyprint);
 
-extern int
-chill_value_print PARAMS ((struct value *, GDB_FILE *,
-                          int, enum val_prettyprint));
+extern int chill_value_print (struct value *, struct ui_file *,
+                             int, enum val_prettyprint);
 
 extern LONGEST
   type_lower_upper PARAMS ((enum exp_opcode, struct type *, struct type **));
index b088ddea7f134474a4142ad871510b76ca002ff7..2a655abbf65b4c7a1568e7467d04eda2393fc500 100644 (file)
@@ -1,5 +1,5 @@
 /* Support for printing Chill types for GDB, the GNU debugger.
-   Copyright 1986, 1988, 1989, 1991 Free Software Foundation, Inc.
+   Copyright 1986, 1988, 1989, 1991, 2000 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
 #include "gdb_string.h"
 #include <errno.h>
 
-static void
-chill_type_print_base PARAMS ((struct type *, GDB_FILE *, int, int));
+static void chill_type_print_base (struct type *, struct ui_file *, int, int);
 
 void
 chill_print_type (type, varstring, stream, show, level)
      struct type *type;
      char *varstring;
-     GDB_FILE *stream;
+     struct ui_file *stream;
      int show;
      int level;
 {
@@ -71,7 +70,7 @@ chill_print_type (type, varstring, stream, show, level)
 static void
 chill_type_print_base (type, stream, show, level)
      struct type *type;
-     GDB_FILE *stream;
+     struct ui_file *stream;
      int show;
      int level;
 {
index 77f9018d0d626949022ba4cf9fb375f23a06807f..6fc3985a2c955aaaef622c175f78f4636df4f5ab 100644 (file)
@@ -1,5 +1,5 @@
 /* Support for printing Chill values for GDB, the GNU debugger.
-   Copyright 1986, 1988, 1989, 1991, 1992, 1993, 1994
+   Copyright 1986, 1988, 1989, 1991-1994, 2000
    Free Software Foundation, Inc.
 
    This file is part of GDB.
 #include "ch-lang.h"
 #include "annotate.h"
 
-static void
-chill_print_value_fields PARAMS ((struct type *, char *, GDB_FILE *, int, int,
-                                 enum val_prettyprint, struct type **));
+static void chill_print_value_fields (struct type *, char *,
+                                     struct ui_file *, int, int,
+                                     enum val_prettyprint, struct type **);
 
-static void
-chill_print_type_scalar PARAMS ((struct type *, LONGEST, GDB_FILE *));
+static void chill_print_type_scalar (struct type *, LONGEST,
+                                    struct ui_file *);
 
-static void
-chill_val_print_array_elements PARAMS ((struct type *, char *, CORE_ADDR, GDB_FILE *,
-                                     int, int, int, enum val_prettyprint));
+static void chill_val_print_array_elements (struct type *, char *,
+                                           CORE_ADDR, struct ui_file *,
+                                           int, int, int,
+                                           enum val_prettyprint);
 \f
 
 /* Print integral scalar data VAL, of type TYPE, onto stdio stream STREAM.
@@ -55,7 +56,7 @@ static void
 chill_print_type_scalar (type, val, stream)
      struct type *type;
      LONGEST val;
-     GDB_FILE *stream;
+     struct ui_file *stream;
 {
   switch (TYPE_CODE (type))
     {
@@ -103,7 +104,7 @@ chill_val_print_array_elements (type, valaddr, address, stream,
      struct type *type;
      char *valaddr;
      CORE_ADDR address;
-     GDB_FILE *stream;
+     struct ui_file *stream;
      int format;
      int deref_ref;
      int recurse;
@@ -204,7 +205,7 @@ chill_val_print (type, valaddr, embedded_offset, address,
      char *valaddr;
      int embedded_offset;
      CORE_ADDR address;
-     GDB_FILE *stream;
+     struct ui_file *stream;
      int format;
      int deref_ref;
      int recurse;
@@ -517,7 +518,7 @@ chill_print_value_fields (type, valaddr, stream, format, recurse, pretty,
                          dont_print)
      struct type *type;
      char *valaddr;
-     GDB_FILE *stream;
+     struct ui_file *stream;
      int format;
      int recurse;
      enum val_prettyprint pretty;
@@ -587,7 +588,7 @@ chill_print_value_fields (type, valaddr, stream, format, recurse, pretty,
 int
 chill_value_print (val, stream, format, pretty)
      value_ptr val;
-     GDB_FILE *stream;
+     struct ui_file *stream;
      int format;
      enum val_prettyprint pretty;
 {
index 94acb357da9a17fcaab6018aed9f5802f632f17e..76c98e6a8eb6c6b600d38a9759fcbe8dfc9889f8 100644 (file)
@@ -1,5 +1,5 @@
 /* Handle lists of commands, their decoding and documentation, for GDB.
-   Copyright 1986, 1989, 1990, 1991, 1998 Free Software Foundation, Inc.
+   Copyright 1986, 1989, 1990, 1991, 1998, 2000 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -42,7 +42,7 @@ static void undef_cmd_error PARAMS ((char *, char *));
 
 static void show_user PARAMS ((char *, int));
 
-static void show_user_1 PARAMS ((struct cmd_list_element *, GDB_FILE *));
+static void show_user_1 (struct cmd_list_element *, struct ui_file *);
 
 static void make_command PARAMS ((char *, int));
 
@@ -50,7 +50,7 @@ static void shell_escape PARAMS ((char *, int));
 
 static int parse_binary_operation PARAMS ((char *));
 
-static void print_doc_line PARAMS ((GDB_FILE *, char *));
+static void print_doc_line (struct ui_file *, char *);
 
 static struct cmd_list_element *find_cmd PARAMS ((char *command,
                                                  int len,
@@ -388,7 +388,7 @@ delete_cmd (name, list)
 void
 help_cmd (command, stream)
      char *command;
-     GDB_FILE *stream;
+     struct ui_file *stream;
 {
   struct cmd_list_element *c;
   extern struct cmd_list_element *cmdlist;
@@ -453,7 +453,7 @@ help_list (list, cmdtype, class, stream)
      struct cmd_list_element *list;
      char *cmdtype;
      enum command_class class;
-     GDB_FILE *stream;
+     struct ui_file *stream;
 {
   int len;
   char *cmdtype1, *cmdtype2;
@@ -494,7 +494,7 @@ Command name abbreviations are allowed if unambiguous.\n",
 /* Print only the first line of STR on STREAM.  */
 static void
 print_doc_line (stream, str)
-     GDB_FILE *stream;
+     struct ui_file *stream;
      char *str;
 {
   static char *line_buffer = 0;
@@ -545,7 +545,7 @@ help_cmd_list (list, class, prefix, recurse, stream)
      enum command_class class;
      char *prefix;
      int recurse;
-     GDB_FILE *stream;
+     struct ui_file *stream;
 {
   register struct cmd_list_element *c;
 
@@ -1530,7 +1530,7 @@ make_command (arg, from_tty)
 static void
 show_user_1 (c, stream)
      struct cmd_list_element *c;
-     GDB_FILE *stream;
+     struct ui_file *stream;
 {
   register struct command_line *cmdlines;
 
index 29484a561b36ecb5f4819ac91e1e1ee469c0a163..fcff84533faf5512781bda8e3f09004b49d9e5e7 100644 (file)
@@ -1,5 +1,5 @@
 /* Header file for command-reading library command.c.
-   Copyright (C) 1986, 1989, 1990 Free Software Foundation, Inc.
+   Copyright (C) 1986, 1989, 1990, 2000 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -230,16 +230,13 @@ extern char **
 extern void
 delete_cmd PARAMS ((char *, struct cmd_list_element **));
 
-extern void
-help_cmd PARAMS ((char *, GDB_FILE *));
+extern void help_cmd (char *, struct ui_file *);
 
-extern void
-help_list PARAMS ((struct cmd_list_element *, char *, enum command_class,
-                  GDB_FILE *));
+extern void help_list (struct cmd_list_element *, char *,
+                      enum command_class, struct ui_file *);
 
-extern void
-help_cmd_list PARAMS ((struct cmd_list_element *, enum command_class, char *,
-                      int, GDB_FILE *));
+extern void help_cmd_list (struct cmd_list_element *, enum command_class,
+                          char *, int, struct ui_file *);
 
 extern struct cmd_list_element *
   add_set_cmd PARAMS ((char *, enum command_class, var_types, char *, char *,
index 7969679bac4c5459997336060dacc2fe383db5d3..682df858947d801cfcbf9a9c3adf277d27826b8e 100644 (file)
@@ -51,6 +51,7 @@ extern char *mn10300_register_name PARAMS ((int regnr));
 #define PSW_REGNUM 11
 #define LIR_REGNUM 12
 #define LAR_REGNUM 13
+#define E0_REGNUM 14
 
 /* Pseudo register that contains true address of executing stack frame */
 #define FP_REGNUM 31
index 94cb6ba9caab9405a26f9d42e7da32fdd8f729e7..a5a70646e104404f47a6fb146857a15c26c887c6 100644 (file)
@@ -1,6 +1,5 @@
 /* Parameters for execution on any Hewlett-Packard PA-RISC machine.
-   Copyright 1986, 1987, 1989, 1990, 1991, 1992, 1993, 1995, 1999
-   Free Software Foundation, Inc. 
+   Copyright 1986, 1987, 1989-1993, 1995, 1999, 2000 Free Software Foundation, Inc. 
 
    Contributed by the Center for Software Science at the
    University of Utah (pa-gdb-bugs@cs.utah.edu).
@@ -263,7 +262,7 @@ extern void pa_do_registers_info PARAMS ((int, int));
 
 #if 0
 #define STRCAT_REGISTER(regnum, fpregs, stream, precision) pa_do_strcat_registers_info (regnum, fpregs, stream, precision)
-extern void pa_do_strcat_registers_info PARAMS ((int, int, GDB_FILE *, enum precision_type));
+extern void pa_do_strcat_registers_info (int, int, struct ui_file *, enum precision_type);
 #endif
 
 /* PA specific macro to see if the current instruction is nullified. */
index f37af52d8e460dc68e76b8bbc64fe292981299f1..a71def35a469df7712a206d37b81704b1f35637b 100644 (file)
@@ -1,5 +1,5 @@
 /* OBSOLETE /* Convex stuff for GDB. */
-/* OBSOLETE    Copyright (C) 1990, 1991, 1996 Free Software Foundation, Inc. */
+/* OBSOLETE    Copyright (C) 1990, 1991, 1996, 2000 Free Software Foundation, Inc. */
 /* OBSOLETE  */
 /* OBSOLETE This file is part of GDB. */
 /* OBSOLETE  */
 /* OBSOLETE    If it looks like an address, print it in hex instead.  *x/ */
 /* OBSOLETE  */
 /* OBSOLETE decout (stream, type, val) */
-/* OBSOLETE      GDB_FILE *stream; */
+/* OBSOLETE      struct ui_file *stream; */
 /* OBSOLETE      struct type *type; */
 /* OBSOLETE      LONGEST val; */
 /* OBSOLETE { */
index ea9ce8550d2fe3d37fd252fd0e7eca6a4814c486..93e23743124002311b2783de488e7b044d3e21d0 100644 (file)
@@ -1,5 +1,5 @@
 /* Core dump and executable file functions above target vector, for GDB.
-   Copyright 1986, 1987, 1989, 1991, 1992, 1993, 1994
+   Copyright 1986, 1987, 1989, 1991-1994, 2000
    Free Software Foundation, Inc.
 
    This file is part of GDB.
@@ -236,8 +236,8 @@ memory_error (status, memaddr)
      int status;
      CORE_ADDR memaddr;
 {
-  struct gdb_file *tmp_stream = mem_fileopen ();
-  make_cleanup_gdb_file_delete (tmp_stream);
+  struct ui_file *tmp_stream = mem_fileopen ();
+  make_cleanup_ui_file_delete (tmp_stream);
 
   if (status == EIO)
     {
index 4ec0853d70e64b203f13908e551d669794089476..b70ef219d6c37021d72350246894dbf775c6a327 100644 (file)
@@ -1,5 +1,5 @@
 /* Support for printing C++ values for GDB, the GNU debugger.
-   Copyright 1986, 1988, 1989, 1991, 1994, 1995, 1996
+   Copyright 1986, 1988, 1989, 1991, 1994-1996, 2000
    Free Software Foundation, Inc.
 
    This file is part of GDB.
@@ -47,24 +47,26 @@ static struct obstack dont_print_statmem_obstack;
 
 extern void _initialize_cp_valprint PARAMS ((void));
 
-static void
-cp_print_static_field PARAMS ((struct type *, value_ptr, GDB_FILE *, int, int,
-                              enum val_prettyprint));
+static void cp_print_static_field (struct type *, value_ptr,
+                                  struct ui_file *, int, int,
+                                  enum val_prettyprint);
 
-static void
-cp_print_value PARAMS ((struct type *, struct type *, char *, int, CORE_ADDR, GDB_FILE *,
-                       int, int, enum val_prettyprint, struct type **));
+static void cp_print_value (struct type *, struct type *, char *, int,
+                           CORE_ADDR, struct ui_file *, int, int,
+                           enum val_prettyprint, struct type **);
 
-static void
-cp_print_hpacc_virtual_table_entries PARAMS ((struct type *, int *, value_ptr, GDB_FILE *,
-                                          int, int, enum val_prettyprint));
+static void cp_print_hpacc_virtual_table_entries (struct type *, int *,
+                                                 value_ptr,
+                                                 struct ui_file *, int,
+                                                 int,
+                                                 enum val_prettyprint);
 
 
 void
 cp_print_class_method (valaddr, type, stream)
      char *valaddr;
      struct type *type;
-     GDB_FILE *stream;
+     struct ui_file *stream;
 {
   struct type *domain;
   struct fn_field *f = NULL;
@@ -237,7 +239,7 @@ cp_print_value_fields (type, real_type, valaddr, offset, address, stream, format
      char *valaddr;
      int offset;
      CORE_ADDR address;
-     GDB_FILE *stream;
+     struct ui_file *stream;
      int format;
      int recurse;
      enum val_prettyprint pretty;
@@ -500,7 +502,7 @@ cp_print_value (type, real_type, valaddr, offset, address, stream, format, recur
      char *valaddr;
      int offset;
      CORE_ADDR address;
-     GDB_FILE *stream;
+     struct ui_file *stream;
      int format;
      int recurse;
      enum val_prettyprint pretty;
@@ -628,7 +630,7 @@ static void
 cp_print_static_field (type, val, stream, format, recurse, pretty)
      struct type *type;
      value_ptr val;
-     GDB_FILE *stream;
+     struct ui_file *stream;
      int format;
      int recurse;
      enum val_prettyprint pretty;
@@ -669,7 +671,7 @@ void
 cp_print_class_member (valaddr, domain, stream, prefix)
      char *valaddr;
      struct type *domain;
-     GDB_FILE *stream;
+     struct ui_file *stream;
      char *prefix;
 {
 
@@ -748,7 +750,7 @@ cp_print_hpacc_virtual_table_entries (type, vfuncs, v, stream, format, recurse,
      struct type *type;
      int *vfuncs;
      value_ptr v;
-     GDB_FILE *stream;
+     struct ui_file *stream;
      int format;
      int recurse;
      enum val_prettyprint pretty;
index 93e3c6e05a3f6f2c5810c1c2a25734b379600b32..68afb8c7d88cb0e440ec985d1f5f6c2498d68fd9 100644 (file)
@@ -1,5 +1,5 @@
 /* Target-dependent code for Mitsubishi D10V, for GDB.
-   Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -1334,7 +1334,7 @@ trace_info (args, from_tty)
 static int
 print_insn (memaddr, stream)
      CORE_ADDR memaddr;
-     GDB_FILE *stream;
+     struct ui_file *stream;
 {
   /* If there's no disassembler, something is very wrong.  */
   if (tm_print_insn == NULL)
index 00e0c025c9220f68c1437da0ea288788789db018..94a1362b3feec9d923011b842b0cf9ba10f42e4d 100644 (file)
@@ -1,5 +1,5 @@
 /* Target-dependent code for Mitsubishi D30V, for GDB.
-   Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -1183,7 +1183,7 @@ trace_info (args, from_tty)
 static int
 print_insn (memaddr, stream)
      CORE_ADDR memaddr;
-     GDB_FILE *stream;
+     struct ui_file *stream;
 {
   /* If there's no disassembler, something is very wrong.  */
   if (tm_print_insn == NULL)
index 8a4009849358d45d065817ab76a11aacc2682c12..47e9dfec9e58ba17d168951a1542b6e5c34b23ab 100644 (file)
@@ -1,6 +1,6 @@
 /* *INDENT-OFF* */ /* ATTR_FORMAT confuses indent, avoid running it for now */
 /* Basic, host-specific, and target-specific definitions for GDB.
-   Copyright (C) 1986, 89, 91, 92, 93, 94, 95, 96, 98, 1999
+   Copyright (C) 1986, 1989, 1991-1996, 1998-2000
    Free Software Foundation, Inc.
 
    This file is part of GDB.
@@ -299,8 +299,8 @@ extern struct cleanup *make_cleanup (make_cleanup_func, void *);
 
 extern struct cleanup *make_cleanup_freeargv (char **);
 
-struct gdb_file;
-extern struct cleanup *make_cleanup_gdb_file_delete (struct gdb_file *);
+struct ui_file;
+extern struct cleanup *make_cleanup_ui_file_delete (struct ui_file *);
 
 extern struct cleanup *make_final_cleanup (make_cleanup_func, void *);
 
@@ -359,23 +359,20 @@ extern void wrap_here (char *);
 
 extern void reinitialize_more_filter (void);
 
-struct gdb_file;
-typedef struct gdb_file GDB_FILE;      /* deprecated */
-
 /* Normal results */
-extern GDB_FILE *gdb_stdout;
+extern struct ui_file *gdb_stdout;
 /* Serious error notifications */
-extern GDB_FILE *gdb_stderr;
+extern struct ui_file *gdb_stderr;
 /* Log/debug/trace messages that should bypass normal stdout/stderr
    filtering.  For momement, always call this stream using
    *_unfiltered. In the very near future that restriction shall be
    removed - either call shall be unfiltered. (cagney 1999-06-13). */
-extern GDB_FILE *gdb_stdlog;
+extern struct ui_file *gdb_stdlog;
 /* Target output that should bypass normal stdout/stderr filtering.
    For momement, always call this stream using *_unfiltered. In the
    very near future that restriction shall be removed - either call
    shall be unfiltered. (cagney 1999-07-02). */
-extern GDB_FILE *gdb_stdtarg;
+extern struct ui_file *gdb_stdtarg;
 
 #if defined(TUI)
 #include "tui.h"
@@ -386,17 +383,17 @@ extern GDB_FILE *gdb_stdtarg;
 #include "tuiWin.h"
 #endif
 
-#include "gdb-file.h"
+#include "ui-file.h"
 
 /* More generic printf like operations */
 
-extern void fputs_filtered (const char *, GDB_FILE *);
+extern void fputs_filtered (const char *, struct ui_file *);
 
-extern void fputs_unfiltered (const char *, GDB_FILE *);
+extern void fputs_unfiltered (const char *, struct ui_file *);
 
-extern int fputc_filtered (int c, GDB_FILE *);
+extern int fputc_filtered (int c, struct ui_file *);
 
-extern int fputc_unfiltered (int c, GDB_FILE *);
+extern int fputc_unfiltered (int c, struct ui_file *);
 
 extern int putchar_unfiltered (int c);
 
@@ -408,11 +405,11 @@ extern void puts_debug (char *prefix, char *string, char *suffix);
 
 extern void vprintf_filtered (const char *, va_list) ATTR_FORMAT (printf, 1, 0);
 
-extern void vfprintf_filtered (GDB_FILE *, const char *, va_list) ATTR_FORMAT (printf, 2, 0);
+extern void vfprintf_filtered (struct ui_file *, const char *, va_list) ATTR_FORMAT (printf, 2, 0);
 
-extern void fprintf_filtered (GDB_FILE *, const char *, ...) ATTR_FORMAT (printf, 2, 3);
+extern void fprintf_filtered (struct ui_file *, const char *, ...) ATTR_FORMAT (printf, 2, 3);
 
-extern void fprintfi_filtered (int, GDB_FILE *, const char *, ...) ATTR_FORMAT (printf, 3, 4);
+extern void fprintfi_filtered (int, struct ui_file *, const char *, ...) ATTR_FORMAT (printf, 3, 4);
 
 extern void printf_filtered (const char *, ...) ATTR_FORMAT (printf, 1, 2);
 
@@ -420,26 +417,26 @@ extern void printfi_filtered (int, const char *, ...) ATTR_FORMAT (printf, 2, 3)
 
 extern void vprintf_unfiltered (const char *, va_list) ATTR_FORMAT (printf, 1, 0);
 
-extern void vfprintf_unfiltered (GDB_FILE *, const char *, va_list) ATTR_FORMAT (printf, 2, 0);
+extern void vfprintf_unfiltered (struct ui_file *, const char *, va_list) ATTR_FORMAT (printf, 2, 0);
 
-extern void fprintf_unfiltered (GDB_FILE *, const char *, ...) ATTR_FORMAT (printf, 2, 3);
+extern void fprintf_unfiltered (struct ui_file *, const char *, ...) ATTR_FORMAT (printf, 2, 3);
 
 extern void printf_unfiltered (const char *, ...) ATTR_FORMAT (printf, 1, 2);
 
-extern void print_spaces (int, GDB_FILE *);
+extern void print_spaces (int, struct ui_file *);
 
-extern void print_spaces_filtered (int, GDB_FILE *);
+extern void print_spaces_filtered (int, struct ui_file *);
 
 extern char *n_spaces (int);
 
-extern void fputstr_filtered (const char *str, int quotr, GDB_FILE * stream);
+extern void fputstr_filtered (const char *str, int quotr, struct ui_file * stream);
 
-extern void fputstr_unfiltered (const char *str, int quotr, GDB_FILE * stream);
+extern void fputstr_unfiltered (const char *str, int quotr, struct ui_file * stream);
 
-extern void fputstrn_unfiltered (const char *str, int n, int quotr, GDB_FILE * stream);
+extern void fputstrn_unfiltered (const char *str, int n, int quotr, struct ui_file * stream);
 
 /* Display the host ADDR on STREAM formatted as ``0x%x''. */
-extern void gdb_print_host_address (void *addr, struct gdb_file *stream);
+extern void gdb_print_host_address (void *addr, struct ui_file *stream);
 
 /* Convert a CORE_ADDR into a HEX string.  paddr() is like %08lx.
    paddr_nz() is like %lx.  paddr_u() is like %lu. paddr_width() is
@@ -454,7 +451,7 @@ typedef bfd_vma t_reg;
 extern char *preg (t_reg reg);
 extern char *preg_nz (t_reg reg);
 
-extern void fprintf_symbol_filtered (GDB_FILE *, char *,
+extern void fprintf_symbol_filtered (struct ui_file *, char *,
                                     enum language, int);
 
 extern NORETURN void perror_with_name (char *) ATTR_NORETURN;
@@ -475,7 +472,7 @@ extern void symbol_file_command (char *, int);
 extern void generic_load (char *name, int from_tty);
 
 /* Summarise a download */
-extern void print_transfer_performance (struct gdb_file *stream,
+extern void print_transfer_performance (struct ui_file *stream,
                                        unsigned long data_count,
                                        unsigned long write_count,
                                        unsigned long time_count);
@@ -500,12 +497,12 @@ extern int info_verbose;
 
 extern void set_next_address (CORE_ADDR);
 
-extern void print_address_symbolic (CORE_ADDR, GDB_FILE *, int,
+extern void print_address_symbolic (CORE_ADDR, struct ui_file *, int,
                                    char *);
 
-extern void print_address_numeric (CORE_ADDR, int, GDB_FILE *);
+extern void print_address_numeric (CORE_ADDR, int, struct ui_file *);
 
-extern void print_address (CORE_ADDR, GDB_FILE *);
+extern void print_address (CORE_ADDR, struct ui_file *);
 
 /* From source.c */
 
@@ -784,7 +781,7 @@ extern NORETURN void error (const char *fmt, ...) ATTR_NORETURN;
 /* DEPRECATED: Use error(), verror() or error_stream(). */
 extern NORETURN void error_begin (void);
 
-extern NORETURN void error_stream (GDB_FILE *) ATTR_NORETURN;
+extern NORETURN void error_stream (struct ui_file *) ATTR_NORETURN;
 
 /* Returns a freshly allocate buffer containing the last error
    message.  */
@@ -1136,7 +1133,7 @@ extern void (*print_frame_info_listing_hook) (struct symtab * s,
 extern struct frame_info *parse_frame_specification (char *frame_exp);
 extern int (*query_hook) (const char *, va_list);
 extern void (*warning_hook) (const char *, va_list);
-extern void (*flush_hook) (GDB_FILE * stream);
+extern void (*flush_hook) (struct ui_file * stream);
 extern void (*create_breakpoint_hook) (struct breakpoint * b);
 extern void (*delete_breakpoint_hook) (struct breakpoint * bpt);
 extern void (*modify_breakpoint_hook) (struct breakpoint * bpt);
index c4d578803f82f65b023db8c69a46d417d095a400..8c0fe4f736fdf83663554ef56fdbf6ecb85559ac 100644 (file)
@@ -1,5 +1,5 @@
 /* Print in infix form a struct expression.
-   Copyright (C) 1986, 1989, 1991 Free Software Foundation, Inc.
+   Copyright (C) 1986, 1989, 1991, 2000 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
 
 /* Prototypes for local functions */
 
-static void
-print_subexp PARAMS ((struct expression *, int *, GDB_FILE *, enum precedence));
+static void print_subexp (struct expression *, int *, struct ui_file *,
+                         enum precedence);
 
 void
 print_expression (exp, stream)
      struct expression *exp;
-     GDB_FILE *stream;
+     struct ui_file *stream;
 {
   int pc = 0;
   print_subexp (exp, &pc, stream, PREC_NULL);
@@ -53,7 +53,7 @@ static void
 print_subexp (exp, pos, stream, prec)
      register struct expression *exp;
      register int *pos;
-     GDB_FILE *stream;
+     struct ui_file *stream;
      enum precedence prec;
 {
   register unsigned tem;
@@ -695,7 +695,7 @@ op_name (opcode)
 void
 dump_prefix_expression (exp, stream, note)
      struct expression *exp;
-     GDB_FILE *stream;
+     struct ui_file *stream;
      char *note;
 {
   int elt;
@@ -736,12 +736,12 @@ dump_prefix_expression (exp, stream, note)
     }
 }
 
-static int dump_subexp PARAMS ((struct expression * exp, GDB_FILE * stream, int elt));
+static int dump_subexp PARAMS ((struct expression * exp, struct ui_file * stream, int elt));
 
 static int
 dump_subexp (exp, stream, elt)
      struct expression *exp;
-     GDB_FILE *stream;
+     struct ui_file *stream;
      int elt;
 {
   static int indent = 0;
@@ -974,7 +974,7 @@ dump_subexp (exp, stream, elt)
 void
 dump_postfix_expression (exp, stream, note)
      struct expression *exp;
-     GDB_FILE *stream;
+     struct ui_file *stream;
      char *note;
 {
   int elt;
index a91442c124c05a996ff9a6e553356e2bc881df64..16dbb1545008b104d96d1c46661cde5ef10e8778 100644 (file)
@@ -1,5 +1,5 @@
 /* Definitions for expressions stored in reversed prefix form, for GDB.
-   Copyright 1986, 1989, 1992, 1994 Free Software Foundation, Inc.
+   Copyright 1986, 1989, 1992, 1994, 2000 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -366,15 +366,15 @@ extern struct value *evaluate_subexp_standard
 
 /* From expprint.c */
 
-extern void print_expression PARAMS ((struct expression *, GDB_FILE *));
+extern void print_expression (struct expression *, struct ui_file *);
 
 extern char *op_string PARAMS ((enum exp_opcode));
 
-extern void dump_prefix_expression PARAMS ((struct expression *,
-                                           GDB_FILE *,
-                                           char *));
-extern void dump_postfix_expression PARAMS ((struct expression *,
-                                            GDB_FILE *,
-                                            char *));
+extern void dump_prefix_expression (struct expression *,
+                                   struct ui_file *,
+                                   char *);
+extern void dump_postfix_expression (struct expression *,
+                                    struct ui_file *,
+                                    char *);
 
 #endif /* !defined (EXPRESSION_H) */
index 1a7bfa33c2c49845173f9c2b81a32111c220d5ee..ddcefd0c5364ae50291ac29315d00cf4719e38fd 100644 (file)
@@ -1,5 +1,5 @@
 /* Fortran language support routines for GDB, the GNU debugger.
-   Copyright 1993, 1994, 1996 Free Software Foundation, Inc.
+   Copyright 1993, 1994, 1996, 2000 Free Software Foundation, Inc.
    Contributed by Motorola.  Adapted from the C parser by Farooq Butt
    (fmbutt@engage.sps.mot.com).
 
@@ -84,9 +84,11 @@ static void patch_common_entries PARAMS ((SAVED_F77_COMMON_PTR, CORE_ADDR, int))
 #endif
 
 static struct type *f_create_fundamental_type PARAMS ((struct objfile *, int));
-static void f_printstr PARAMS ((GDB_FILE * stream, char *string, unsigned int length, int width, int force_ellipses));
-static void f_printchar PARAMS ((int c, GDB_FILE * stream));
-static void f_emit_char PARAMS ((int c, GDB_FILE * stream, int quoter));
+static void f_printstr (struct ui_file * stream, char *string,
+                       unsigned int length, int width,
+                       int force_ellipses);
+static void f_printchar (int c, struct ui_file * stream);
+static void f_emit_char (int c, struct ui_file * stream, int quoter);
 
 /* Print the character C on STREAM as part of the contents of a literal
    string whose delimiter is QUOTER.  Note that that format for printing
@@ -97,7 +99,7 @@ static void f_emit_char PARAMS ((int c, GDB_FILE * stream, int quoter));
 static void
 f_emit_char (c, stream, quoter)
      register int c;
-     GDB_FILE *stream;
+     struct ui_file *stream;
      int quoter;
 {
   c &= 0xFF;                   /* Avoid sign bit follies */
@@ -146,7 +148,7 @@ f_emit_char (c, stream, quoter)
 static void
 f_printchar (c, stream)
      int c;
-     GDB_FILE *stream;
+     struct ui_file *stream;
 {
   fputs_filtered ("'", stream);
   LA_EMIT_CHAR (c, stream, '\'');
@@ -162,7 +164,7 @@ f_printchar (c, stream)
 
 static void
 f_printstr (stream, string, length, width, force_ellipses)
-     GDB_FILE *stream;
+     struct ui_file *stream;
      char *string;
      unsigned int length;
      int width;
@@ -460,8 +462,8 @@ struct type **CONST_PTR (f_builtin_types[]) =
 
 /* This is declared in c-lang.h but it is silly to import that file for what
    is already just a hack. */
-extern int
-c_value_print PARAMS ((struct value *, GDB_FILE *, int, enum val_prettyprint));
+extern int c_value_print (struct value *, struct ui_file *, int,
+                         enum val_prettyprint);
 
 const struct language_defn f_language_defn =
 {
index 77f36752f8118e0bfdab15a5406b371163bd27e0..0dbe55f3aee8d995ffbe6b6e69b4f499bc948ed6 100644 (file)
@@ -1,5 +1,5 @@
 /* Fortran language support definitions for GDB, the GNU debugger.
-   Copyright 1992, 1993, 1994 Free Software Foundation, Inc.
+   Copyright 1992, 1993, 1994, 2000 Free Software Foundation, Inc.
    Contributed by Motorola.  Adapted from the C definitions by Farooq Butt
    (fmbutt@engage.sps.mot.com).
 
@@ -24,12 +24,12 @@ extern int f_parse PARAMS ((void));
 
 extern void f_error PARAMS ((char *)); /* Defined in f-exp.y */
 
-extern void f_print_type PARAMS ((struct type *, char *,
-                                 GDB_FILE *, int, int));
+extern void f_print_type (struct type *, char *, struct ui_file *, int,
+                         int);
 
-extern int f_val_print PARAMS ((struct type *, char *, int,
-                               CORE_ADDR, GDB_FILE *,
-                               int, int, int, enum val_prettyprint));
+extern int f_val_print (struct type *, char *, int, CORE_ADDR,
+                       struct ui_file *, int, int, int,
+                       enum val_prettyprint);
 
 /* Language-specific data structures */
 
index 12b2865ee70355ca09b902640b255bc45cd3e29d..db6e0017d6f89e3c975a39a5852b79d01e031620 100644 (file)
@@ -1,5 +1,5 @@
 /* Support for printing Fortran types for GDB, the GNU debugger.
-   Copyright 1986, 1988, 1989, 1991, 1993, 1994 Free Software Foundation, Inc.
+   Copyright 1986, 1988, 1989, 1991, 1993, 1994, 2000 Free Software Foundation, Inc.
    Contributed by Motorola.  Adapted from the C version by Farooq Butt
    (fmbutt@engage.sps.mot.com).
 
 #include <errno.h>
 
 #if 0                          /* Currently unused */
-static void f_type_print_args PARAMS ((struct type *, GDB_FILE *));
+static void f_type_print_args (struct type *, struct ui_file *);
 #endif
 
-static void print_equivalent_f77_float_type PARAMS ((struct type *,
-                                                    GDB_FILE *));
+static void print_equivalent_f77_float_type (struct type *,
+                                            struct ui_file *);
 
-static void f_type_print_varspec_suffix PARAMS ((struct type *, GDB_FILE *,
-                                                int, int, int));
+static void f_type_print_varspec_suffix (struct type *, struct ui_file *,
+                                        int, int, int);
 
-void f_type_print_varspec_prefix PARAMS ((struct type *, GDB_FILE *,
-                                         int, int));
+void f_type_print_varspec_prefix (struct type *, struct ui_file *,
+                                 int, int);
 
-void f_type_print_base PARAMS ((struct type *, GDB_FILE *, int, int));
+void f_type_print_base (struct type *, struct ui_file *, int, int);
 \f
 
 /* LEVEL is the depth to indent lines by.  */
@@ -62,7 +62,7 @@ void
 f_print_type (type, varstring, stream, show, level)
      struct type *type;
      char *varstring;
-     GDB_FILE *stream;
+     struct ui_file *stream;
      int show;
      int level;
 {
@@ -105,7 +105,7 @@ f_print_type (type, varstring, stream, show, level)
 void
 f_type_print_varspec_prefix (type, stream, show, passed_a_ptr)
      struct type *type;
-     GDB_FILE *stream;
+     struct ui_file *stream;
      int show;
      int passed_a_ptr;
 {
@@ -163,7 +163,7 @@ f_type_print_varspec_prefix (type, stream, show, passed_a_ptr)
 static void
 f_type_print_args (type, stream)
      struct type *type;
-     GDB_FILE *stream;
+     struct ui_file *stream;
 {
   int i;
   struct type **args;
@@ -203,7 +203,7 @@ f_type_print_args (type, stream)
 static void
 f_type_print_varspec_suffix (type, stream, show, passed_a_ptr, demangled_args)
      struct type *type;
-     GDB_FILE *stream;
+     struct ui_file *stream;
      int show;
      int passed_a_ptr;
      int demangled_args;
@@ -314,7 +314,7 @@ f_type_print_varspec_suffix (type, stream, show, passed_a_ptr, demangled_args)
 static void
 print_equivalent_f77_float_type (type, stream)
      struct type *type;
-     GDB_FILE *stream;
+     struct ui_file *stream;
 {
   /* Override type name "float" and make it the
      appropriate real. XLC stupidly outputs -12 as a type
@@ -339,7 +339,7 @@ print_equivalent_f77_float_type (type, stream)
 void
 f_type_print_base (type, stream, show, level)
      struct type *type;
-     GDB_FILE *stream;
+     struct ui_file *stream;
      int show;
      int level;
 {
index 5d127981e5ec20f12d447db9a9d43d98bde1d08d..a007c871c1eae641064de22b003815902b661d4c 100644 (file)
@@ -1,5 +1,5 @@
 /* Support for printing Fortran values for GDB, the GNU debugger.
-   Copyright 1993, 1994, 1995 Free Software Foundation, Inc.
+   Copyright 1993-1995, 2000 Free Software Foundation, Inc.
    Contributed by Motorola.  Adapted from the C definitions by Farooq Butt
    (fmbutt@engage.sps.mot.com), additionally worked over by Stan Shebs.
 
@@ -41,14 +41,14 @@ static int there_is_a_visible_common_named PARAMS ((char *));
 extern void _initialize_f_valprint PARAMS ((void));
 static void info_common_command PARAMS ((char *, int));
 static void list_all_visible_commons PARAMS ((char *));
-static void f77_print_array PARAMS ((struct type *, char *, CORE_ADDR,
-                                    GDB_FILE *, int, int, int,
-                                    enum val_prettyprint));
-static void f77_print_array_1 PARAMS ((int, int, struct type *, char *,
-                                      CORE_ADDR, GDB_FILE *, int, int, int,
-                                      enum val_prettyprint));
-static void f77_create_arrayprint_offset_tbl PARAMS ((struct type *,
-                                                     GDB_FILE *));
+static void f77_print_array (struct type *, char *, CORE_ADDR,
+                            struct ui_file *, int, int, int,
+                            enum val_prettyprint);
+static void f77_print_array_1 (int, int, struct type *, char *,
+                              CORE_ADDR, struct ui_file *, int, int, int,
+                              enum val_prettyprint);
+static void f77_create_arrayprint_offset_tbl (struct type *,
+                                             struct ui_file *);
 static void f77_get_dynamic_length_of_aggregate PARAMS ((struct type *));
 
 int f77_array_offset_tbl[MAX_FORTRAN_DIMS + 1][2];
@@ -234,7 +234,7 @@ f77_get_dynamic_length_of_aggregate (type)
 static void
 f77_create_arrayprint_offset_tbl (type, stream)
      struct type *type;
-     GDB_FILE *stream;
+     struct ui_file *stream;
 {
   struct type *tmp_type;
   int eltlen;
@@ -288,7 +288,7 @@ f77_print_array_1 (nss, ndimensions, type, valaddr, address,
      struct type *type;
      char *valaddr;
      CORE_ADDR address;
-     GDB_FILE *stream;
+     struct ui_file *stream;
      int format;
      int deref_ref;
      int recurse;
@@ -336,7 +336,7 @@ f77_print_array (type, valaddr, address, stream, format, deref_ref, recurse,
      struct type *type;
      char *valaddr;
      CORE_ADDR address;
-     GDB_FILE *stream;
+     struct ui_file *stream;
      int format;
      int deref_ref;
      int recurse;
@@ -381,7 +381,7 @@ f_val_print (type, valaddr, embedded_offset, address, stream, format, deref_ref,
      char *valaddr;
      int embedded_offset;
      CORE_ADDR address;
-     GDB_FILE *stream;
+     struct ui_file *stream;
      int format;
      int deref_ref;
      int recurse;
index 0912205e6f6946ccd2f9734a7ad1d7e9d0880bdc..f82ae362d3028182d173784fc886ed74e3f4badf 100644 (file)
@@ -216,7 +216,7 @@ extern struct block *block_for_pc_sect PARAMS ((CORE_ADDR, asection *));
 extern int frameless_look_for_prologue PARAMS ((struct frame_info *));
 
 extern void print_frame_args PARAMS ((struct symbol *, struct frame_info *,
-                                     int, GDB_FILE *));
+                                     int, struct ui_file *));
 
 extern struct frame_info *find_relative_frame PARAMS ((struct frame_info *, int *));
 
index 6b9dc810aad4a6520ac2078dbe01355e09b03f18..6b0b958402a68b51d81228d21dfdee16e29dec09 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # User Interface Events.
-# Copyright 1999 Free Software Foundation, Inc.
+# Copyright 1999-2000 Free Software Foundation, Inc.
 #
 # Contributed by Cygnus Solutions.
 #
@@ -73,7 +73,7 @@ f:void:breakpoint_modify:int b:b
 #*:void:target_wait_loop_hook:void
 #*:void:init_gdb_hook:char *argv0:argv0
 #*:void:command_loop_hook:void
-#*:void:fputs_unfiltered_hook:const char *linebuff,GDB_FILE *stream:linebuff, stream
+#*:void:fputs_unfiltered_hook:const char *linebuff,struct ui_file *stream:linebuff, stream
 #*: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
index af4fcf6199f9abad3251f6f3dd29c960966f47c2..b801f08147e563facce0ac428b4bae622b55c42e 100644 (file)
@@ -1,5 +1,5 @@
 /* Header file for GDB-specific command-line stuff.
-   Copyright 1986, 1989, 1990, 1992 Free Software Foundation, Inc.
+   Copyright 1986, 1989, 1990, 1992, 2000 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -106,8 +106,8 @@ execute_command PARAMS ((char *, int));
 enum command_control_type
 execute_control_command PARAMS ((struct command_line *));
 
-extern void
-print_command_line PARAMS ((struct command_line *, unsigned int, GDB_FILE *));
+extern void print_command_line (struct command_line *, unsigned int,
+                               struct ui_file *);
 
 extern char **noop_completer PARAMS ((char *, char *));
 
index 49ace6a5bb7de3c7fe1013cd570ab4f14c4a3447..3c124f0609726d51d27d79c2e0b617d425a90f22 100644 (file)
@@ -1,6 +1,5 @@
 /* Internal type definitions for GDB.
-   Copyright (C) 1992, 1993, 1994, 1996, 1998, 1999
-   Free Software Foundation, Inc.
+   Copyright (C) 1992-1994, 1996, 1998-2000 Free Software Foundation, Inc.
    Contributed by Cygnus Support, using pieces from other GDB modules.
 
    This file is part of GDB.
@@ -1151,8 +1150,8 @@ extern void recursive_dump_type PARAMS ((struct type *, int));
 
 /* printcmd.c */
 
-extern void
-print_scalar_formatted PARAMS ((char *, struct type *, int, int, GDB_FILE *));
+extern void print_scalar_formatted (char *, struct type *, int, int,
+                                   struct ui_file *);
 
 extern int can_dereference PARAMS ((struct type *));
 
@@ -1162,6 +1161,6 @@ extern void maintenance_print_type PARAMS ((char *, int));
 
 /* typeprint.c */
 
-extern void print_type_scalar PARAMS ((struct type *, LONGEST, GDB_FILE *));
+extern void print_type_scalar (struct type *, LONGEST, struct ui_file *);
 
 #endif /* GDBTYPES_H */
index 1477df2527f527a6741189814434fdf8cfede17e..2adee0f110496f749138d47091914e13d9fa17b2 100644 (file)
@@ -1,6 +1,5 @@
 /* Target-dependent code for the HP PA architecture, for GDB.
-   Copyright 1986, 87, 89, 90, 91, 92, 93, 94, 95, 96, 1999
-   Free Software Foundation, Inc.
+   Copyright 1986, 1987, 1989-1996, 1999-2000 Free Software Foundation, Inc.
 
    Contributed by the Center for Software Science at the
    University of Utah (pa-gdb-bugs@cs.utah.edu).
@@ -122,10 +121,10 @@ static void internalize_unwinds PARAMS ((struct objfile *,
                                         asection *, unsigned int,
                                         unsigned int, CORE_ADDR));
 static void pa_print_registers PARAMS ((char *, int, int));
-static void pa_strcat_registers PARAMS ((char *, int, int, GDB_FILE *));
+static void pa_strcat_registers (char *, int, int, struct ui_file *);
 static void pa_register_look_aside PARAMS ((char *, int, long *));
 static void pa_print_fp_reg PARAMS ((int));
-static void pa_strcat_fp_reg PARAMS ((int, GDB_FILE *, enum precision_type));
+static void pa_strcat_fp_reg (int, struct ui_file *, enum precision_type);
 static void record_text_segment_lowaddr PARAMS ((bfd *, asection *, void *));
 
 typedef struct
@@ -2586,7 +2585,7 @@ void
 pa_do_strcat_registers_info (regnum, fpregs, stream, precision)
      int regnum;
      int fpregs;
-     GDB_FILE *stream;
+     struct ui_file *stream;
      enum precision_type precision;
 {
   char raw_regs[REGISTER_BYTES];
@@ -2801,7 +2800,7 @@ pa_strcat_registers (raw_regs, regnum, fpregs, stream)
      char *raw_regs;
      int regnum;
      int fpregs;
-     GDB_FILE *stream;
+     struct ui_file *stream;
 {
   int i, j;
   long raw_val[2];             /* Alas, we are compiled so that "long long" is 32 bits */
@@ -2894,7 +2893,7 @@ pa_print_fp_reg (i)
 static void
 pa_strcat_fp_reg (i, stream, precision)
      int i;
-     GDB_FILE *stream;
+     struct ui_file *stream;
      enum precision_type precision;
 {
   char raw_buffer[MAX_REGISTER_RAW_SIZE];
index dd323b2a4952baad70b0b6bc121a16c9d3922785..367add2427f89aba2236bd2255e160af25e6162d 100644 (file)
@@ -1,5 +1,5 @@
 /* Java language support routines for GDB, the GNU debugger.
-   Copyright 1997, 1998, 1999 Free Software Foundation, Inc.
+   Copyright 1997, 1998, 1999-2000 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -58,7 +58,7 @@ static int java_class_is_primitive PARAMS ((value_ptr clas));
 static struct type *java_lookup_type PARAMS ((char *signature));
 static value_ptr java_value_string PARAMS ((char *ptr, int len));
 
-static void java_emit_char PARAMS ((int c, GDB_FILE * stream, int quoter));
+static void java_emit_char (int c, struct ui_file * stream, int quoter);
 
 /* This objfile contains symtabs that have been dynamically created
    to record dynamically loaded Java classes and dynamically
@@ -837,7 +837,7 @@ java_value_string (ptr, len)
 static void
 java_emit_char (c, stream, quoter)
      int c;
-     GDB_FILE *stream;
+     struct ui_file *stream;
      int quoter;
 {
   switch (c)
index cec3aabf5b03af5fa4db953958d4d9687a6e01b4..cfb1a39d64e835c499fc1ff71953df146bcc38a6 100644 (file)
@@ -1,5 +1,5 @@
 /* Java language support definitions for GDB, the GNU debugger.
-   Copyright 1997, 1998, 1999 Free Software Foundation, Inc.
+   Copyright 1997-2000 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -37,13 +37,12 @@ extern struct type *java_float_type;
 extern struct type *java_double_type;
 extern struct type *java_void_type;
 
-extern int
-java_val_print PARAMS ((struct type *, char *, int, CORE_ADDR, GDB_FILE *, int, int,
-                       int, enum val_prettyprint));
+extern int java_val_print (struct type *, char *, int, CORE_ADDR,
+                          struct ui_file *, int, int, int,
+                          enum val_prettyprint);
 
-extern int
-java_value_print PARAMS ((struct value *, GDB_FILE *, int,
-                         enum val_prettyprint));
+extern int java_value_print (struct value *, struct ui_file *, int,
+                            enum val_prettyprint);
 
 extern value_ptr java_class_from_object PARAMS ((value_ptr));
 
@@ -62,7 +61,8 @@ extern struct type *java_lookup_class PARAMS ((char *));
 
 extern int is_object_type PARAMS ((struct type *));
 
-extern void                    /* Defined in jv-typeprint.c */
-java_print_type PARAMS ((struct type *, char *, GDB_FILE *, int, int));
+/* Defined in jv-typeprint.c */
+extern void java_print_type (struct type *, char *, struct ui_file *, int,
+                            int);
 
 extern char *java_demangle_type_signature PARAMS ((char *));
index c7bd349f31157ddcc8cc54efd8df04c7a67ec907..1b60830a854ad41524a8432bc93d48a7b008fbe6 100644 (file)
@@ -1,5 +1,5 @@
 /* Support for printing Java types for GDB, the GNU debugger.
-   Copyright 1997, 1998, 1999 Free Software Foundation, Inc.
+   Copyright 1997-2000 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
 
 /* Local functions */
 
-static void java_type_print_base PARAMS ((struct type * type, GDB_FILE * stream, int show, int level));
+static void java_type_print_base (struct type * type,
+                                 struct ui_file *stream, int show,
+                                 int level);
 
 static void
 java_type_print_derivation_info (stream, type)
-     GDB_FILE *stream;
+     struct ui_file *stream;
      struct type *type;
 {
   char *name;
@@ -84,7 +86,7 @@ java_type_print_derivation_info (stream, type)
 static void
 java_type_print_base (type, stream, show, level)
      struct type *type;
-     GDB_FILE *stream;
+     struct ui_file *stream;
      int show;
      int level;
 {
@@ -323,14 +325,14 @@ java_type_print_base (type, stream, show, level)
 
 /* LEVEL is the depth to indent lines by.  */
 
-extern void
-c_type_print_varspec_suffix PARAMS ((struct type *, GDB_FILE *, int, int, int));
+extern void c_type_print_varspec_suffix (struct type *, struct ui_file *,
+                                        int, int, int);
 
 void
 java_print_type (type, varstring, stream, show, level)
      struct type *type;
      char *varstring;
-     GDB_FILE *stream;
+     struct ui_file *stream;
      int show;
      int level;
 {
index 7e87b1530d479d458c62ac2f26c0cc7639ace404..0f4232cc8c6835dd81ec32b9a562bf6a8380eba6 100644 (file)
@@ -1,5 +1,5 @@
 /* Support for printing Java values for GDB, the GNU debugger.
-   Copyright 1997, 1998, 1999 Free Software Foundation, Inc.
+   Copyright 1997-2000 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
 
 /* Local functions */
 
-static void java_print_value_fields PARAMS ((struct type * type, char *valaddr, CORE_ADDR address, GDB_FILE * stream, int format, int recurse, enum val_prettyprint pretty));
+static void java_print_value_fields (struct type * type, char *valaddr,
+                                    CORE_ADDR address,
+                                    struct ui_file *stream, int format,
+                                    int recurse,
+                                    enum val_prettyprint pretty);
 
 
 int
 java_value_print (val, stream, format, pretty)
      value_ptr val;
-     GDB_FILE *stream;
+     struct ui_file *stream;
      int format;
      enum val_prettyprint pretty;
 {
@@ -242,7 +246,7 @@ java_print_value_fields (type, valaddr, address, stream,
      struct type *type;
      char *valaddr;
      CORE_ADDR address;
-     GDB_FILE *stream;
+     struct ui_file *stream;
      int format;
      int recurse;
      enum val_prettyprint pretty;
@@ -451,7 +455,7 @@ java_val_print (type, valaddr, embedded_offset, address, stream, format,
      struct type *type;
      char *valaddr;
      CORE_ADDR address;
-     GDB_FILE *stream;
+     struct ui_file *stream;
      int format;
      int deref_ref;
      int recurse;
index 05f710f4f674679d66bcc509799edeb89a52dbbe..ebdcefe5628581eb23a68ff8b734d3babda5aa43 100644 (file)
@@ -1,5 +1,5 @@
 /* Multiple source language support for GDB.
-   Copyright 1991, 1992 Free Software Foundation, Inc.
+   Copyright 1991, 1992, 2000 Free Software Foundation, Inc.
    Contributed by the Department of Computer Science at the State University
    of New York at Buffalo.
 
@@ -86,27 +86,25 @@ set_check PARAMS ((char *, int));
 static void
 set_type_range PARAMS ((void));
 
-static void
-unk_lang_emit_char PARAMS ((int c, GDB_FILE * stream, int quoter));
+static void unk_lang_emit_char (int c, struct ui_file *stream, int quoter);
 
-static void
-unk_lang_printchar PARAMS ((int c, GDB_FILE * stream));
+static void unk_lang_printchar (int c, struct ui_file *stream);
 
-static void
-unk_lang_printstr PARAMS ((GDB_FILE * stream, char *string, unsigned int length, int width, int force_ellipses));
+static void unk_lang_printstr (struct ui_file * stream, char *string,
+                              unsigned int length, int width,
+                              int force_ellipses);
 
 static struct type *
   unk_lang_create_fundamental_type PARAMS ((struct objfile *, int));
 
-static void
-unk_lang_print_type PARAMS ((struct type *, char *, GDB_FILE *, int, int));
+static void unk_lang_print_type (struct type *, char *, struct ui_file *,
+                                int, int);
 
-static int
-unk_lang_val_print PARAMS ((struct type *, char *, int, CORE_ADDR, GDB_FILE *,
-                           int, int, int, enum val_prettyprint));
+static int unk_lang_val_print (struct type *, char *, int, CORE_ADDR,
+                              struct ui_file *, int, int, int,
+                              enum val_prettyprint);
 
-static int
-unk_lang_value_print PARAMS ((value_ptr, GDB_FILE *, int, enum val_prettyprint));
+static int unk_lang_value_print (value_ptr, struct ui_file *, int, enum val_prettyprint);
 
 /* Forward declaration */
 extern const struct language_defn unknown_language_defn;
@@ -1364,7 +1362,7 @@ unk_lang_error (msg)
 static void
 unk_lang_emit_char (c, stream, quoter)
      register int c;
-     GDB_FILE *stream;
+     struct ui_file *stream;
      int quoter;
 {
   error ("internal error - unimplemented function unk_lang_emit_char called.");
@@ -1373,14 +1371,14 @@ unk_lang_emit_char (c, stream, quoter)
 static void
 unk_lang_printchar (c, stream)
      register int c;
-     GDB_FILE *stream;
+     struct ui_file *stream;
 {
   error ("internal error - unimplemented function unk_lang_printchar called.");
 }
 
 static void
 unk_lang_printstr (stream, string, length, width, force_ellipses)
-     GDB_FILE *stream;
+     struct ui_file *stream;
      char *string;
      unsigned int length;
      int width;
@@ -1401,7 +1399,7 @@ static void
 unk_lang_print_type (type, varstring, stream, show, level)
      struct type *type;
      char *varstring;
-     GDB_FILE *stream;
+     struct ui_file *stream;
      int show;
      int level;
 {
@@ -1415,7 +1413,7 @@ unk_lang_val_print (type, valaddr, embedded_offset, address, stream, format, der
      char *valaddr;
      int embedded_offset;
      CORE_ADDR address;
-     GDB_FILE *stream;
+     struct ui_file *stream;
      int format;
      int deref_ref;
      int recurse;
@@ -1427,7 +1425,7 @@ unk_lang_val_print (type, valaddr, embedded_offset, address, stream, format, der
 static int
 unk_lang_value_print (val, stream, format, pretty)
      value_ptr val;
-     GDB_FILE *stream;
+     struct ui_file *stream;
      int format;
      enum val_prettyprint pretty;
 {
index b730d9b26eac1dd1ac7c70ad5fd2bd9167436e6c..2f27cb120e3a5f9f7da103d7c6db4ffe9b5691e3 100644 (file)
@@ -1,5 +1,5 @@
 /* Source-language-related definitions for GDB.
-   Copyright 1991, 1992 Free Software Foundation, Inc.
+   Copyright 1991, 1992, 2000 Free Software Foundation, Inc.
    Contributed by the Department of Computer Science at the State University
    of New York at Buffalo.
 
@@ -151,29 +151,31 @@ struct language_defn
     struct value *(*evaluate_exp) PARAMS ((struct type *, struct expression *,
                                           int *, enum noside));
 
-    void (*la_printchar) PARAMS ((int ch, GDB_FILE * stream));
+    void (*la_printchar) (int ch, struct ui_file * stream);
 
-    void (*la_printstr) PARAMS ((GDB_FILE * stream, char *string,
-                                unsigned int length, int width,
-                                int force_ellipses));
+    void (*la_printstr) (struct ui_file * stream, char *string,
+                        unsigned int length, int width,
+                        int force_ellipses);
 
-    void (*la_emitchar) PARAMS ((int ch, GDB_FILE * stream, int quoter));
+    void (*la_emitchar) (int ch, struct ui_file * stream, int quoter);
 
     struct type *(*la_fund_type) PARAMS ((struct objfile *, int));
 
     /* Print a type using syntax appropriate for this language. */
 
-    void (*la_print_type) PARAMS ((struct type *, char *, GDB_FILE *, int, int));
+    void (*la_print_type) (struct type *, char *, struct ui_file *, int,
+                          int);
 
     /* Print a value using syntax appropriate for this language. */
 
-    int (*la_val_print) PARAMS ((struct type *, char *, int, CORE_ADDR, GDB_FILE *,
-                                int, int, int, enum val_prettyprint));
+    int (*la_val_print) (struct type *, char *, int, CORE_ADDR,
+                        struct ui_file *, int, int, int,
+                        enum val_prettyprint);
 
     /* Print a top-level value using syntax appropriate for this language. */
 
-    int (*la_value_print) PARAMS ((struct value *, GDB_FILE *,
-                                  int, enum val_prettyprint));
+    int (*la_value_print) (struct value *, struct ui_file *,
+                          int, enum val_prettyprint);
 
     /* Base 2 (binary) formats. */
 
index fd13349295a8a2e56352674b6868fb1d3832a1a6..e1136a7de3e45131986af91ba0551a22f8d1286c 100644 (file)
@@ -1,5 +1,5 @@
 /* Modula 2 language support routines for GDB, the GNU debugger.
-   Copyright 1992 Free Software Foundation, Inc.
+   Copyright 1992, 2000 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
 
 extern void _initialize_m2_language PARAMS ((void));
 static struct type *m2_create_fundamental_type PARAMS ((struct objfile *, int));
-static void m2_printstr PARAMS ((GDB_FILE * stream, char *string, unsigned int length, int width, int force_ellipses));
-static void m2_printchar PARAMS ((int, GDB_FILE *));
-static void m2_emit_char PARAMS ((int, GDB_FILE *, int));
+static void m2_printstr (struct ui_file * stream, char *string,
+                        unsigned int length, int width,
+                        int force_ellipses);
+static void m2_printchar (int, struct ui_file *);
+static void m2_emit_char (int, struct ui_file *, int);
 
 /* Print the character C on STREAM as part of the contents of a literal
    string whose delimiter is QUOTER.  Note that that format for printing
@@ -43,7 +45,7 @@ static void m2_emit_char PARAMS ((int, GDB_FILE *, int));
 static void
 m2_emit_char (c, stream, quoter)
      register int c;
-     GDB_FILE *stream;
+     struct ui_file *stream;
      int quoter;
 {
 
@@ -95,7 +97,7 @@ m2_emit_char (c, stream, quoter)
 static void
 m2_printchar (c, stream)
      int c;
-     GDB_FILE *stream;
+     struct ui_file *stream;
 {
   fputs_filtered ("'", stream);
   LA_EMIT_CHAR (c, stream, '\'');
@@ -111,7 +113,7 @@ m2_printchar (c, stream)
 
 static void
 m2_printstr (stream, string, length, width, force_ellipses)
-     GDB_FILE *stream;
+     struct ui_file *stream;
      char *string;
      unsigned int length;
      int width;
index 190940e4b0bc1e8fa5b44c98efdf93b10a306daf..6e63e8d78013fe979f191c8ec010bd514b99e86d 100644 (file)
@@ -1,5 +1,5 @@
 /* Modula 2 language support definitions for GDB, the GNU debugger.
-   Copyright 1992 Free Software Foundation, Inc.
+   Copyright 1992, 2000 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -24,9 +24,10 @@ m2_parse PARAMS ((void));    /* Defined in m2-exp.y */
 extern void
 m2_error PARAMS ((char *));    /* Defined in m2-exp.y */
 
-extern void                    /* Defined in m2-typeprint.c */
-m2_print_type PARAMS ((struct type *, char *, GDB_FILE *, int, int));
+/* Defined in m2-typeprint.c */
+extern void m2_print_type (struct type *, char *, struct ui_file *, int,
+                          int);
 
-extern int
-m2_val_print PARAMS ((struct type *, char *, int, CORE_ADDR, GDB_FILE *, int, int,
-                     int, enum val_prettyprint));
+extern int m2_val_print (struct type *, char *, int, CORE_ADDR,
+                        struct ui_file *, int, int, int,
+                        enum val_prettyprint);
index c3c1e5db3a69b007e1568b582a8293ffa25f552e..ee7e83622606c490ab7c2ab7bc989b61ecad038c 100644 (file)
@@ -1,5 +1,5 @@
 /* Support for printing Modula 2 types for GDB, the GNU debugger.
-   Copyright 1986, 1988, 1989, 1991 Free Software Foundation, Inc.
+   Copyright 1986, 1988, 1989, 1991, 2000 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -40,11 +40,12 @@ void
 m2_print_type (type, varstring, stream, show, level)
      struct type *type;
      char *varstring;
-     GDB_FILE *stream;
+     struct ui_file *stream;
      int show;
      int level;
 {
-  extern void c_print_type PARAMS ((struct type *, char *, GDB_FILE *, int, int));
+  extern void c_print_type (struct type *, char *, struct ui_file *, int,
+                           int);
 
   c_print_type (type, varstring, stream, show, level); /* FIXME */
 }
index 76b97c5ca777592054d74c47e0acbe9e5028a335..903d96b6e802b9d450a64101035890894c624b65 100644 (file)
@@ -1,5 +1,5 @@
 /* Support for printing Modula 2 values for GDB, the GNU debugger.
-   Copyright 1986, 1988, 1989, 1991 Free Software Foundation, Inc.
+   Copyright 1986, 1988, 1989, 1991, 2000 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -34,15 +34,15 @@ m2_val_print (type, valaddr, embedded_offset, address,
      char *valaddr;
      int embedded_offset;
      CORE_ADDR address;
-     GDB_FILE *stream;
+     struct ui_file *stream;
      int format;
      int deref_ref;
      int recurse;
      enum val_prettyprint pretty;
 {
-  extern int
-  c_val_print PARAMS ((struct type *, char *, int, CORE_ADDR,
-                      GDB_FILE *, int, int, int, enum val_prettyprint));
+  extern int c_val_print (struct type *, char *, int, CORE_ADDR,
+                         struct ui_file *, int, int, int,
+                         enum val_prettyprint);
   return (c_val_print (type, valaddr, 0, address, stream, format, deref_ref,
                       recurse, pretty));
 }
index 79317bcf18298eb53894abad9f9165d38262f80e..0770cc3a503e2c32d0a39df9830fb8926c32ac6b 100644 (file)
@@ -1,7 +1,7 @@
 /* Interface GDB to Mach 3.0 operating systems.
    (Most) Mach 3.0 related routines live in this file.
 
-   Copyright (C) 1992, 1996, 1999 Free Software Foundation, Inc.
+   Copyright (C) 1992, 1996, 1999-2000 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -2472,7 +2472,7 @@ map_cprocs_to_kernel_threads (cprocs, mthreads, thread_count)
 
 void
 print_tl_address (stream, pc)
-     GDB_FILE *stream;
+     struct ui_file *stream;
      CORE_ADDR pc;
 {
   if (!lookup_minimal_symbol_by_pc (pc))
index 7ccc47fbd424d5c047de068795dd8b39c7e2d0ef..c5c4e96fd9f4adf63894f604408cf10da5597987 100644 (file)
@@ -1,6 +1,5 @@
 /* Top level stuff for GDB, the GNU debugger.
-   Copyright 1986, 87, 88, 89, 90, 91, 92, 93, 94, 95, 1999
-   Free Software Foundation, Inc.
+   Copyright 1986-1995, 1999-2000 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -62,10 +61,10 @@ int xdb_commands = 0;
 /* Whether dbx commands will be handled */
 int dbx_commands = 0;
 
-GDB_FILE *gdb_stdout;
-GDB_FILE *gdb_stderr;
-GDB_FILE *gdb_stdlog;
-GDB_FILE *gdb_stdtarg;
+struct ui_file *gdb_stdout;
+struct ui_file *gdb_stderr;
+struct ui_file *gdb_stdlog;
+struct ui_file *gdb_stdtarg;
 
 /* Used to initialize error() - defined in utils.c */
 
@@ -74,7 +73,7 @@ extern void error_init (void);
 /* Whether to enable writing into executable and core files */
 extern int write_files;
 
-static void print_gdb_help PARAMS ((GDB_FILE *));
+static void print_gdb_help (struct ui_file *);
 
 /* These two are used to set the external editor commands when gdb is farming
    out files to be edited by another program. */
@@ -194,7 +193,7 @@ captured_main (void *data)
 
 #if defined (TUI) || defined (GDBTK)
   /* Older code uses the tui_file and fputs_unfiltered_hook().  It
-     should be using a customized GDB_FILE object and re-initializing
+     should be using a customized UI_FILE object and re-initializing
      within its own _initialize function.  */
   gdb_stdout = tui_fileopen (stdout);
   gdb_stderr = tui_fileopen (stderr);
@@ -714,8 +713,7 @@ main (int argc, char **argv)
    to print.  */
 
 static void
-print_gdb_help (stream)
-     GDB_FILE *stream;
+print_gdb_help (struct ui_file *stream)
 {
   fputs_unfiltered ("\
 This is the GNU debugger.  Usage:\n\n\
index 3a50c9887aa7dbbe748c78cd96e58cf831fac375..ef142aad3a10bcdf46b865dc4b149b7a4be230c8 100644 (file)
@@ -1,6 +1,5 @@
 /* Remote debugging interface for boot monitors, for GDB.
-   Copyright 1990, 1991, 1992, 1993, 1995, 1996, 1997, 1999
-   Free Software Foundation, Inc.
+   Copyright 1990-1993, 1995-1997, 1999-2000 Free Software Foundation, Inc.
    Contributed by Cygnus Support.  Written by Rob Savoye for Cygnus.
    Resurrected from the ashes by Stu Grossman.
 
@@ -2270,7 +2269,7 @@ monitor_stop ()
 
 static void
 monitor_rcmd (char *command,
-             struct gdb_file *outbuf)
+             struct ui_file *outbuf)
 {
   char *p;
   int resp_len;
index 6324357cfb20ef7bdaebbe93946d043003f23e79..9fac1f39b4b9b44d30804341cdcda8e54df73f0e 100644 (file)
@@ -1,6 +1,5 @@
 /* Print values for GNU debugger GDB.
-   Copyright 1986, 87, 88, 89, 90, 91, 93, 94, 95, 1998
-   Free Software Foundation, Inc.
+   Copyright 1986-1991, 1993-1995, 1998, 2000 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -135,8 +134,8 @@ static void disassemble_command PARAMS ((char *, int));
 
 static void printf_command PARAMS ((char *, int));
 
-static void print_frame_nameless_args PARAMS ((struct frame_info *, long,
-                                              int, int, GDB_FILE *));
+static void print_frame_nameless_args (struct frame_info *, long,
+                                      int, int, struct ui_file *);
 
 static void display_info PARAMS ((char *, int));
 
@@ -166,11 +165,11 @@ static void validate_format PARAMS ((struct format_data, char *));
 
 static void do_examine PARAMS ((struct format_data, CORE_ADDR addr, asection * section));
 
-static void print_formatted PARAMS ((value_ptr, int, int, GDB_FILE *));
+static void print_formatted (value_ptr, int, int, struct ui_file *);
 
 static struct format_data decode_format PARAMS ((char **, int, int));
 
-static int print_insn PARAMS ((CORE_ADDR, GDB_FILE *));
+static int print_insn (CORE_ADDR, struct ui_file *);
 
 static void sym_info PARAMS ((char *, int));
 \f
@@ -281,7 +280,7 @@ print_formatted (val, format, size, stream)
      register value_ptr val;
      register int format;
      int size;
-     GDB_FILE *stream;
+     struct ui_file *stream;
 {
   struct type *type = check_typedef (VALUE_TYPE (val));
   int len = TYPE_LENGTH (type);
@@ -349,7 +348,7 @@ print_scalar_formatted (valaddr, type, format, size, stream)
      struct type *type;
      int format;
      int size;
-     GDB_FILE *stream;
+     struct ui_file *stream;
 {
   LONGEST val_long;
   unsigned int len = TYPE_LENGTH (type);
@@ -540,7 +539,7 @@ set_next_address (addr)
 void
 print_address_symbolic (addr, stream, do_demangle, leadin)
      CORE_ADDR addr;
-     GDB_FILE *stream;
+     struct ui_file *stream;
      int do_demangle;
      char *leadin;
 {
@@ -667,7 +666,7 @@ void
 print_address_numeric (addr, use_local, stream)
      CORE_ADDR addr;
      int use_local;
-     GDB_FILE *stream;
+     struct ui_file *stream;
 {
   /* This assumes a CORE_ADDR can fit in a LONGEST.  Probably a safe
      assumption.  */
@@ -681,7 +680,7 @@ print_address_numeric (addr, use_local, stream)
 void
 print_address (addr, stream)
      CORE_ADDR addr;
-     GDB_FILE *stream;
+     struct ui_file *stream;
 {
   print_address_numeric (addr, 1, stream);
   print_address_symbolic (addr, stream, asm_demangle, " ");
@@ -695,7 +694,7 @@ print_address (addr, stream)
 void
 print_address_demangle (addr, stream, do_demangle)
      CORE_ADDR addr;
-     GDB_FILE *stream;
+     struct ui_file *stream;
      int do_demangle;
 {
   if (addr == 0)
@@ -1743,7 +1742,7 @@ void
 print_variable_value (var, frame, stream)
      struct symbol *var;
      struct frame_info *frame;
-     GDB_FILE *stream;
+     struct ui_file *stream;
 {
   value_ptr val = read_var_value (var, frame);
 
@@ -1763,7 +1762,7 @@ print_frame_args (func, fi, num, stream)
      struct symbol *func;
      struct frame_info *fi;
      int num;
-     GDB_FILE *stream;
+     struct ui_file *stream;
 {
   struct block *b = NULL;
   int nsyms = 0;
@@ -1948,7 +1947,7 @@ print_frame_nameless_args (fi, start, num, first, stream)
      long start;
      int num;
      int first;
-     GDB_FILE *stream;
+     struct ui_file *stream;
 {
   int i;
   CORE_ADDR argsaddr;
@@ -2398,7 +2397,7 @@ disassemble_command (arg, from_tty)
 static int
 print_insn (memaddr, stream)
      CORE_ADDR memaddr;
-     GDB_FILE *stream;
+     struct ui_file *stream;
 {
   if (TARGET_BYTE_ORDER == BIG_ENDIAN)
     TARGET_PRINT_INSN_INFO->endian = BFD_ENDIAN_BIG;
index e5e4043328d29f9b708e78a6dd7d67bd71c85540..0cc355e96f2aff50ed2c572ac6cf1a7ebe98a4f9 100644 (file)
@@ -1,5 +1,5 @@
 /* OBSOLETE /* Pyramid target-dependent code for GDB. */
-/* OBSOLETE    Copyright (C) 1988, 1989, 1991 Free Software Foundation, Inc. */
+/* OBSOLETE    Copyright (C) 1988, 1989, 1991, 2000 Free Software Foundation, Inc. */
 /* OBSOLETE  */
 /* OBSOLETE This file is part of GDB. */
 /* OBSOLETE  */
 /* OBSOLETE int */
 /* OBSOLETE pyr_print_insn (memaddr, stream) */
 /* OBSOLETE      CORE_ADDR memaddr; */
-/* OBSOLETE      GDB_FILE *stream; */
+/* OBSOLETE      struct ui_file *stream; */
 /* OBSOLETE { */
 /* OBSOLETE   unsigned char buffer[MAXLEN]; */
 /* OBSOLETE   register int i, nargs, insn_size =4; */
index 87997ad08bc169822a375022c9df6a0931002dfa..d2efcf28b7aa00e93cdfd1ef30c220a3dbb234e8 100644 (file)
@@ -1,5 +1,5 @@
 /* Remote debugging interface for MIPS remote debugging protocol.
-   Copyright 1993, 1994, 1995 Free Software Foundation, Inc.
+   Copyright 1993-1995, 2000 Free Software Foundation, Inc.
    Contributed by Cygnus Support.  Written by Ian Lance Taylor
    <ian@cygnus.com>.
 
@@ -514,7 +514,7 @@ mips_error (char *string,...)
 static void
 fputc_readable (ch, file)
      int ch;
-     struct gdb_file *file;
+     struct ui_file *file;
 {
   if (ch == '\n')
     fputc_unfiltered ('\n', file);
@@ -535,7 +535,7 @@ fputc_readable (ch, file)
 static void
 fputs_readable (string, file)
      char *string;
-     struct gdb_file *file;
+     struct ui_file *file;
 {
   int c;
 
index 74728376dc1b217c9125c32697a015edcfffd370..52c02920f6152f1e9d92bf6c7616f26335f57a43 100644 (file)
@@ -1,5 +1,5 @@
 /* Generic remote debugging interface for simulators.
-   Copyright 1993, 1994, 1996, 1997 Free Software Foundation, Inc.
+   Copyright 1993, 1994, 1996, 1997, 2000 Free Software Foundation, Inc.
    Contributed by Cygnus Support.
    Steve Chamberlain (sac@cygnus.com).
 
@@ -194,7 +194,7 @@ gdb_os_write_stdout (p, buf, len)
   int i;
   char b[2];
 
-  gdb_file_write (gdb_stdtarg, buf, len);
+  ui_file_write (gdb_stdtarg, buf, len);
   return len;
 }
 
index 4da615386c0efb2a6be0592b74f5ddce70c46643..e67bb4634e7ead94631bdf2f74f73ec0912657ee 100644 (file)
@@ -1,5 +1,5 @@
 /* Remote debugging interface for AMD 29k interfaced via UDI, for GDB.
-   Copyright 1990, 1992, 1995 Free Software Foundation, Inc.
+   Copyright 1990, 1992, 1995, 2000 Free Software Foundation, Inc.
    Written by Daniel Mann.  Contributed by AMD.
 
    This file is part of GDB.
@@ -1673,7 +1673,7 @@ void
 convert32 ()
 {;
 }
-GDB_FILE *EchoFile = 0;                /* used for debugging */
+struct ui_file *EchoFile = 0;  /* used for debugging */
 int QuietMode = 0;             /* used for debugging */
 \f
 #ifdef NO_HIF_SUPPORT
index 783f75ea2839e6b13e3065c4498fa22bb7405bb5..72ff24d05ec0c59012a2730fb2252422d42366d1 100644 (file)
@@ -1,6 +1,5 @@
 /* Remote target communications for serial-line targets in custom GDB protocol
-   Copyright 1988, 91, 92, 93, 94, 95, 96, 97, 98, 1999 
-   Free Software Foundation, Inc.
+   Copyright 1988, 1991-2000 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -56,6 +55,7 @@
 /* Prototypes for local functions */
 static void cleanup_sigint_signal_handler (void *dummy);
 static void initialize_sigint_signal_handler (void);
+static int getpkt_sane (char *buf, long sizeof_buf, int forever);
 
 static void handle_remote_sigint PARAMS ((int));
 static void handle_remote_sigint_twice PARAMS ((int));
@@ -3906,11 +3906,31 @@ read_frame (char *buf,
    store it in BUF.  If FOREVER, wait forever rather than timing out;
    this is used (in synchronous mode) to wait for a target that is is
    executing user code to stop.  */
-
+/* FIXME: ezannoni 2000-02-01 this wrapper is necessary so that we
+   don't have to change all the calls to getpkt to deal with the
+   return value, because at the moment I don't know what the right
+   thing to do it for those. */
 void
 getpkt (char *buf,
        long sizeof_buf,
        int forever)
+{
+  int timed_out;
+
+  timed_out = getpkt_sane (buf, sizeof_buf, forever);
+}
+
+
+/* Read a packet from the remote machine, with error checking, and
+   store it in BUF.  If FOREVER, wait forever rather than timing out;
+   this is used (in synchronous mode) to wait for a target that is is
+   executing user code to stop. If FOREVER == 0, this function is
+   allowed to time out gracefully and return an indication of this to
+   the caller. */
+int
+getpkt_sane (char *buf,
+       long sizeof_buf,
+       int forever)
 {
   int c;
   int tries;
@@ -3971,7 +3991,7 @@ getpkt (char *buf,
              fprintf_unfiltered (gdb_stdlog, "\n");
            }
          SERIAL_WRITE (remote_desc, "+", 1);
-         return;
+         return 0;
        }
 
       /* Try the whole thing again.  */
@@ -3983,6 +4003,7 @@ getpkt (char *buf,
 
   printf_unfiltered ("Ignoring packet error, continuing...\n");
   SERIAL_WRITE (remote_desc, "+", 1);
+  return 1;
 }
 \f
 static void
@@ -4605,7 +4626,7 @@ remote_query (query_type, buf, outbuf, bufsiz)
 
 static void
 remote_rcmd (char *command,
-            struct gdb_file *outbuf)
+            struct ui_file *outbuf)
 {
   int i;
   char *buf = alloca (PBUFSIZ);
index a424891a4614fdfc4f6d0837192b79d4c15029fa..ac09fe6aa32fb5f567a995dbe67d7578b6bf67f2 100644 (file)
@@ -1,5 +1,5 @@
 /* Scheme/Guile language support routines for GDB, the GNU debugger.
-   Copyright 1995 Free Software Foundation, Inc.
+   Copyright 1995, 2000 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -36,7 +36,9 @@ static value_ptr evaluate_subexp_scm PARAMS ((struct type *, struct expression *
                                              int *, enum noside));
 static value_ptr scm_lookup_name PARAMS ((char *));
 static int in_eval_c PARAMS ((void));
-static void scm_printstr PARAMS ((GDB_FILE * stream, char *string, unsigned int length, int width, int force_ellipses));
+static void scm_printstr (struct ui_file * stream, char *string,
+                         unsigned int length, int width,
+                         int force_ellipses);
 
 extern struct type **CONST_PTR (c_builtin_types[]);
 
@@ -45,14 +47,14 @@ struct type *builtin_type_scm;
 void
 scm_printchar (c, stream)
      int c;
-     GDB_FILE *stream;
+     struct ui_file *stream;
 {
   fprintf_filtered (stream, "#\\%c", c);
 }
 
 static void
 scm_printstr (stream, string, length, width, force_ellipses)
-     GDB_FILE *stream;
+     struct ui_file *stream;
      char *string;
      unsigned int length;
      int width;
index 68ba2da925dd440f68e658478d6afdfd03236cab..eb708fb53efa02f8420ce8d80fdb271eaeda98fd 100644 (file)
@@ -1,3 +1,23 @@
+/* Scheme/Guile language support routines for GDB, the GNU debugger.
+   Copyright 1995, 1996, 2000 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
+
 #define SICP
 #include "scm-tags.h"
 #undef SCM_NCELLP
 /* Forward decls for prototypes */
 struct value;
 
-extern int scm_value_print PARAMS ((struct value *, GDB_FILE *,
-                                   int, enum val_prettyprint));
+extern int scm_value_print (struct value *, struct ui_file *,
+                           int, enum val_prettyprint);
 
-extern int scm_val_print PARAMS ((struct type *, char *, int, CORE_ADDR, GDB_FILE *,
-                                 int, int, int, enum val_prettyprint));
+extern int scm_val_print (struct type *, char *, int, CORE_ADDR,
+                         struct ui_file *, int, int, int,
+                         enum val_prettyprint);
 
 extern LONGEST scm_get_field PARAMS ((LONGEST, int));
 
-extern void scm_scmval_print PARAMS ((LONGEST, GDB_FILE *,
-                                     int, int, int, enum val_prettyprint));
+extern void scm_scmval_print (LONGEST, struct ui_file *, int, int, int,
+                             enum val_prettyprint);
 
 extern int is_scmvalue_type PARAMS ((struct type *));
 
-extern void scm_printchar PARAMS ((int, GDB_FILE *));
+extern void scm_printchar (int, struct ui_file *);
 
 extern struct value *scm_evaluate_string PARAMS ((char *, int));
 
index 8ddfb7f6aa4ffa70578a63f459227dc91696f257..802751f346a2ddb4b8e8d7c34ad3bd23a82e7ca1 100644 (file)
@@ -1,5 +1,5 @@
 /* Scheme/Guile language support routines for GDB, the GNU debugger.
-   Copyright 1995 Free Software Foundation, Inc.
+   Copyright 1995, 2000 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
 #include "gdbcore.h"
 
 /* FIXME: Should be in a header file that we import. */
-extern int
-c_val_print PARAMS ((struct type *, char *, int, CORE_ADDR, GDB_FILE *, int, int,
-                    int, enum val_prettyprint));
+extern int c_val_print (struct type *, char *, int, CORE_ADDR,
+                       struct ui_file *, int, int, int,
+                       enum val_prettyprint);
 
-static void scm_ipruk PARAMS ((char *, LONGEST, GDB_FILE *));
-static void scm_scmlist_print PARAMS ((LONGEST, GDB_FILE *, int, int,
-                                      int, enum val_prettyprint));
-static int scm_inferior_print PARAMS ((LONGEST, GDB_FILE *, int, int,
-                                      int, enum val_prettyprint));
+static void scm_ipruk (char *, LONGEST, struct ui_file *);
+static void scm_scmlist_print (LONGEST, struct ui_file *, int, int,
+                              int, enum val_prettyprint);
+static int scm_inferior_print (LONGEST, struct ui_file *, int, int,
+                              int, enum val_prettyprint);
 
 /* Prints the SCM value VALUE by invoking the inferior, if appropraite.
    Returns >= 0 on succes;  retunr -1 if the inferior cannot/should not
@@ -47,7 +47,7 @@ static int scm_inferior_print PARAMS ((LONGEST, GDB_FILE *, int, int,
 static int
 scm_inferior_print (value, stream, format, deref_ref, recurse, pretty)
      LONGEST value;
-     GDB_FILE *stream;
+     struct ui_file *stream;
      int format;
      int deref_ref;
      int recurse;
@@ -98,7 +98,7 @@ static char *scm_isymnames[] =
 static void
 scm_scmlist_print (svalue, stream, format, deref_ref, recurse, pretty)
      LONGEST svalue;
-     GDB_FILE *stream;
+     struct ui_file *stream;
      int format;
      int deref_ref;
      int recurse;
@@ -138,7 +138,7 @@ static void
 scm_ipruk (hdr, ptr, stream)
      char *hdr;
      LONGEST ptr;
-     GDB_FILE *stream;
+     struct ui_file *stream;
 {
   fprintf_filtered (stream, "#<unknown-%s", hdr);
 #define SCM_SIZE TYPE_LENGTH (builtin_type_scm)
@@ -151,7 +151,7 @@ scm_ipruk (hdr, ptr, stream)
 void
 scm_scmval_print (svalue, stream, format, deref_ref, recurse, pretty)
      LONGEST svalue;
-     GDB_FILE *stream;
+     struct ui_file *stream;
      int format;
      int deref_ref;
      int recurse;
@@ -382,7 +382,7 @@ scm_val_print (type, valaddr, embedded_offset, address,
      char *valaddr;
      int embedded_offset;
      CORE_ADDR address;
-     GDB_FILE *stream;
+     struct ui_file *stream;
      int format;
      int deref_ref;
      int recurse;
@@ -414,7 +414,7 @@ scm_val_print (type, valaddr, embedded_offset, address,
 int
 scm_value_print (val, stream, format, pretty)
      value_ptr val;
-     GDB_FILE *stream;
+     struct ui_file *stream;
      int format;
      enum val_prettyprint pretty;
 {
index 6a39cc1cc1e31eece1fda7e95bc00b15a4f7a39c..73982f7e501a922e58daa57e665af4fe8dedd060 100644 (file)
@@ -1,5 +1,5 @@
 /* Remote serial interface using Hitachi E7000 PC ISA card in a PC
-   Copyright 1994, 1999 Free Software Foundation, Inc.
+   Copyright 1994, 1999, 2000 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -422,7 +422,7 @@ e7000pc_noflush_set_tty_state (scb, new_ttystate, old_ttystate)
 static void
 e7000pc_print_tty_state (serial_t scb,
                         serial_ttystate ttystate,
-                        struct gdb_file *stream)
+                        struct ui_file *stream)
 {
   /* Nothing to print.  */
   return;
index c1bf22778a3a510d9a3a88926b63ef0c25637bcc..94a7861c35c19ae7ff6fbd8e3b1eba62532edbda 100644 (file)
@@ -1,5 +1,5 @@
-/* Remote serial interface for local (hardwired) serial ports for
-   GO32.  Copyright 1992, 1993 Free Software Foundation, Inc.
+/* Remote serial interface for local (hardwired) serial ports for GO32.
+   Copyright 1992, 1993, 2000 Free Software Foundation, Inc.
 
    Contributed by Nigel Stephens, Algorithmics Ltd. (nigel@algor.co.uk).
 
@@ -698,7 +698,7 @@ dos_flush_input (scb)
 static void
 dos_print_tty_state (serial_t scb,
                     serial_ttystate ttystate,
-                    struct gdb_file *stream)
+                    struct ui_file *stream)
 {
   /* Nothing to print */
   return;
index 4e8a20ae62f3031fd629eaf3a76d8a5ba5b6c4f1..fe154ab330113de3fd997d60ae2ab6ecbe598a0b 100644 (file)
@@ -1,5 +1,5 @@
 /* Remote serial interface for local (hardwired) serial ports for Macintosh.
-   Copyright 1994 Free Software Foundation, Inc.
+   Copyright 1994, 2000 Free Software Foundation, Inc.
    Contributed by Cygnus Support.  Written by Stan Shebs.
 
    This file is part of GDB.
@@ -234,7 +234,7 @@ mac_noflush_set_tty_state (scb, new_ttystate, old_ttystate)
 static void
 mac_print_tty_state (serial_t scb,
                     serial_ttystate ttystate,
-                    struct gdb_file *stream)
+                    struct ui_file *stream)
 {
   /* Nothing to print.  */
   return;
index a56c2c6a48271b5536a71888382736bd33b48807..733d69217c185093dc2832fb408219430b7882bf 100644 (file)
@@ -1,7 +1,7 @@
 /* Remote serial interface for Macraigor Systems implementation of
    On-Chip Debugging using serial target box or serial wiggler
 
-   Copyright 1994, 1997, 1999 Free Software Foundation, Inc.
+   Copyright 1994, 1997, 1999, 2000 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -132,7 +132,7 @@ ocd_noflush_set_tty_state (scb, new_ttystate, old_ttystate)
 static void
 ocd_print_tty_state (serial_t scb,
                     serial_ttystate ttystate,
-                    struct gdb_file *stream)
+                    struct ui_file *stream)
 {
   /* Nothing to print.  */
   return;
index c54d9170b056c31861430e6f928102b38f668815..80e550d0587b95daad1b8b927db10c85c2cd93ee 100644 (file)
@@ -1,5 +1,5 @@
 /* Serial interface for local (hardwired) serial ports on Un*x like systems
-   Copyright 1992, 1993, 1994, 1998-1999 Free Software Foundation, Inc.
+   Copyright 1992-1994, 1998-2000 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -81,7 +81,7 @@ static serial_ttystate hardwire_get_tty_state (serial_t scb);
 static int hardwire_set_tty_state (serial_t scb, serial_ttystate state);
 static int hardwire_noflush_set_tty_state (serial_t, serial_ttystate,
                                                   serial_ttystate);
-static void hardwire_print_tty_state (serial_t, serial_ttystate, struct gdb_file *);
+static void hardwire_print_tty_state (serial_t, serial_ttystate, struct ui_file *);
 static int hardwire_drain_output (serial_t);
 static int hardwire_flush_output (serial_t);
 static int hardwire_flush_input (serial_t);
@@ -228,7 +228,7 @@ hardwire_noflush_set_tty_state (serial_t scb,
 static void
 hardwire_print_tty_state (serial_t scb,
                          serial_ttystate ttystate,
-                         struct gdb_file *stream)
+                         struct ui_file *stream)
 {
   struct hardwire_ttystate *state = (struct hardwire_ttystate *) ttystate;
   int i;
@@ -1046,7 +1046,7 @@ ser_unix_nop_noflush_set_tty_state (serial_t scb,
 void
 ser_unix_nop_print_tty_state (serial_t scb, 
                              serial_ttystate ttystate,
-                             struct gdb_file *stream)
+                             struct ui_file *stream)
 {
   /* Nothing to print.  */
   return;
index d7e94aaf7dbc1812a68ef205b8b850b67fd8a2f9..e4b2c167f18a41d69268e4f3ba92ec377d62c459 100644 (file)
@@ -1,5 +1,5 @@
 /* Serial interface for UN*X file-descriptor based connection.
-   Copyright 1999 Free Software Foundation, Inc.
+   Copyright 1999, 2000 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -32,7 +32,7 @@ extern int ser_unix_nop_send_break (serial_t scb);
 extern void ser_unix_nop_raw (serial_t scb);
 extern serial_ttystate ser_unix_nop_get_tty_state (serial_t scb);
 extern int ser_unix_nop_set_tty_state (serial_t scb, serial_ttystate ttystate);
-extern void ser_unix_nop_print_tty_state (serial_t scb, serial_ttystate ttystate, struct gdb_file *stream);
+extern void ser_unix_nop_print_tty_state (serial_t scb, serial_ttystate ttystate, struct ui_file *stream);
 extern int ser_unix_nop_noflush_set_tty_state (serial_t scb, serial_ttystate new_ttystate, serial_ttystate old_ttystate);
 extern int ser_unix_nop_setbaudrate (serial_t scb, int rate);
 extern int ser_unix_nop_setstopbits (serial_t scb, int rate);
index e33e2ef72d24db16f229c0beaca381909e371710..7fde64eeaca6d4446d3ae4688e257cf6b9b84ac8 100644 (file)
@@ -1,5 +1,5 @@
 /* Generic serial interface routines
-   Copyright 1992, 1993, 1996, 1997, 1999 Free Software Foundation, Inc.
+   Copyright 1992, 1993, 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -46,10 +46,10 @@ static serial_t scb_base;
    suitable for playback by gdbserver. */
 
 static char *serial_logfile = NULL;
-static GDB_FILE *serial_logfp = NULL;
+static struct ui_file *serial_logfp = NULL;
 
 static struct serial_ops *serial_interface_lookup (char *);
-static void serial_logchar (struct gdb_file *stream, int ch_type, int ch, int timeout);
+static void serial_logchar (struct ui_file *stream, int ch_type, int ch, int timeout);
 static char logbase_hex[] = "hex";
 static char logbase_octal[] = "octal";
 static char logbase_ascii[] = "ascii";
@@ -68,7 +68,7 @@ static int serial_current_type = 0;
 #define SERIAL_BREAK 1235
 
 static void
-serial_logchar (struct gdb_file *stream, int ch_type, int ch, int timeout)
+serial_logchar (struct ui_file *stream, int ch_type, int ch, int timeout)
 {
   if (ch_type != serial_current_type)
     {
@@ -288,7 +288,7 @@ do_serial_close (serial_t scb, int really_close)
       serial_current_type = 0;
 
       /* XXX - What if serial_logfp == gdb_stdout or gdb_stderr? */
-      gdb_file_delete (serial_logfp);
+      ui_file_delete (serial_logfp);
       serial_logfp = NULL;
     }
 
@@ -449,7 +449,7 @@ serial_set_tty_state (serial_t scb, serial_ttystate ttystate)
 void
 serial_print_tty_state (serial_t scb,
                        serial_ttystate ttystate,
-                       struct gdb_file *stream)
+                       struct ui_file *stream)
 {
   scb->ops->print_tty_state (scb, ttystate, stream);
 }
index 4b2c1f37ecdeb5c64f12ff32efc34697d02a8dda..4aff1b0ecae6e4e3b198ab4055536aaa6b647b23 100644 (file)
@@ -1,5 +1,5 @@
 /* Remote serial support interface definitions for GDB, the GNU Debugger.
-   Copyright 1992, 1993, 1999 Free Software Foundation, Inc.
+   Copyright 1992, 1993, 1999, 2000 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -127,7 +127,7 @@ extern int serial_set_tty_state (serial_t scb, serial_ttystate ttystate);
    the specified STREAM. FIXME: At present this sends output to the
    default stream - GDB_STDOUT. */
 
-extern void serial_print_tty_state (serial_t scb, serial_ttystate ttystate, struct gdb_file *);
+extern void serial_print_tty_state (serial_t scb, serial_ttystate ttystate, struct ui_file *);
 #define SERIAL_PRINT_TTY_STATE(SERIAL_T, TTYSTATE, STREAM) serial_print_tty_state ((SERIAL_T), (TTYSTATE), (STREAM))
 
 /* Set the tty state to NEW_TTYSTATE, where OLD_TTYSTATE is the
@@ -238,7 +238,7 @@ struct serial_ops
     void (*go_raw) (serial_t);
     serial_ttystate (*get_tty_state) (serial_t);
     int (*set_tty_state) (serial_t, serial_ttystate);
-    void (*print_tty_state) (serial_t, serial_ttystate, struct gdb_file *);
+    void (*print_tty_state) (serial_t, serial_ttystate, struct ui_file *);
     int (*noflush_set_tty_state) (serial_t, serial_ttystate, serial_ttystate);
     int (*setbaudrate) (serial_t, int rate);
     int (*setstopbits) (serial_t, int num);
index d344baba2f1910e79b1fdb9522147ba7f502b2ed..7e414c549f88b374666c5b5ecf08a5ab5884e726 100644 (file)
@@ -1,6 +1,5 @@
 /* Print and select stack frames for GDB, the GNU debugger.
-   Copyright 1986, 87, 89, 91, 92, 93, 94, 95, 96, 98, 1999, 2000
-   Free Software Foundation, Inc.
+   Copyright 1986, 1987, 1989, 1991-1996, 1998-2000 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -70,27 +69,25 @@ static void current_frame_command PARAMS ((char *, int));
 
 static void select_frame_command PARAMS ((char *, int));
 
-static void print_frame_arg_vars PARAMS ((struct frame_info *, GDB_FILE *));
+static void print_frame_arg_vars (struct frame_info *, struct ui_file *);
 
 static void catch_info PARAMS ((char *, int));
 
 static void args_plus_locals_info PARAMS ((char *, int));
 
-static void print_frame_label_vars PARAMS ((struct frame_info *,
-                                           int,
-                                           GDB_FILE *));
+static void print_frame_label_vars (struct frame_info *, int,
+                                   struct ui_file *);
 
-static void print_frame_local_vars PARAMS ((struct frame_info *,
-                                           int,
-                                           GDB_FILE *));
+static void print_frame_local_vars (struct frame_info *, int,
+                                   struct ui_file *);
 
-static int print_block_frame_labels PARAMS ((struct block *, int *,
-                                            GDB_FILE *));
+static int print_block_frame_labels (struct block *, int *,
+                                    struct ui_file *);
 
-static int print_block_frame_locals PARAMS ((struct block *,
-                                            struct frame_info *,
-                                            int,
-                                            GDB_FILE *));
+static int print_block_frame_locals (struct block *,
+                                    struct frame_info *,
+                                    int,
+                                    struct ui_file *);
 
 static void print_frame (struct frame_info *fi, 
                         int level, 
@@ -314,7 +311,7 @@ struct print_args_args
 {
   struct symbol *func;
   struct frame_info *fi;
-  GDB_FILE *stream;
+  struct ui_file *stream;
 };
 
 static int print_args_stub PARAMS ((PTR));
@@ -1189,7 +1186,7 @@ print_block_frame_locals (b, fi, num_tabs, stream)
      struct block *b;
      register struct frame_info *fi;
      int num_tabs;
-     register GDB_FILE *stream;
+     register struct ui_file *stream;
 {
   int nsyms;
   register int i, j;
@@ -1230,7 +1227,7 @@ static int
 print_block_frame_labels (b, have_default, stream)
      struct block *b;
      int *have_default;
-     register GDB_FILE *stream;
+     register struct ui_file *stream;
 {
   int nsyms;
   register int i;
@@ -1278,7 +1275,7 @@ static void
 print_frame_local_vars (fi, num_tabs, stream)
      register struct frame_info *fi;
      register int num_tabs;
-     register GDB_FILE *stream;
+     register struct ui_file *stream;
 {
   register struct block *block = get_frame_block (fi);
   register int values_printed = 0;
@@ -1313,7 +1310,7 @@ static void
 print_frame_label_vars (fi, this_level_only, stream)
      register struct frame_info *fi;
      int this_level_only;
-     register GDB_FILE *stream;
+     register struct ui_file *stream;
 {
   register struct blockvector *bl;
   register struct block *block = get_frame_block (fi);
@@ -1423,7 +1420,7 @@ catch_info (ignore, from_tty)
 static void
 print_frame_arg_vars (fi, stream)
      register struct frame_info *fi;
-     register GDB_FILE *stream;
+     register struct ui_file *stream;
 {
   struct symbol *func = get_frame_function (fi);
   register struct block *b;
index c74a59323c7ee33db7c08d590b9bcbcb4fdfb418..0726d1a65401ef00cb45521b759feeee6eed7580 100644 (file)
@@ -1,6 +1,5 @@
 /* Generic symbol file reading for the GNU debugger, GDB.
-   Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998
-   Free Software Foundation, Inc.
+   Copyright 1990-1996, 1998, 2000 Free Software Foundation, Inc.
    Contributed by Cygnus Support, using pieces from other GDB modules.
 
    This file is part of GDB.
@@ -1400,7 +1399,7 @@ report_transfer_performance (data_count, start_time, end_time)
 }
 
 void
-print_transfer_performance (struct gdb_file *stream,
+print_transfer_performance (struct ui_file *stream,
                            unsigned long data_count,
                            unsigned long write_count,
                            unsigned long time_count)
index dbf64f79b0b4893fa634c4dbe1a15d0d2faf6e62..1a806ccff6a2d24caf05f1e846473f3a7689a739 100644 (file)
@@ -1,6 +1,5 @@
 /* Do various things to symbol tables (other than lookup), for GDB.
-   Copyright 1986, 87, 89, 91, 92, 93, 94, 95, 96, 1998
-   Free Software Foundation, Inc.
+   Copyright 1986, 1987, 1989, 1991-1996, 1998, 2000 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -49,20 +48,20 @@ FILE *std_err;
 
 /* Prototypes for local functions */
 
-static void dump_symtab PARAMS ((struct objfile *, struct symtab *,
-                                GDB_FILE *));
+static void dump_symtab (struct objfile *, struct symtab *,
+                        struct ui_file *);
 
-static void dump_psymtab PARAMS ((struct objfile *, struct partial_symtab *,
-                                 GDB_FILE *));
+static void dump_psymtab (struct objfile *, struct partial_symtab *,
+                         struct ui_file *);
 
-static void dump_msymbols PARAMS ((struct objfile *, GDB_FILE *));
+static void dump_msymbols (struct objfile *, struct ui_file *);
 
 static void dump_objfile PARAMS ((struct objfile *));
 
 static int block_depth PARAMS ((struct block *));
 
-static void print_partial_symbols PARAMS ((struct partial_symbol **, int,
-                                          char *, GDB_FILE *));
+static void print_partial_symbols (struct partial_symbol **, int,
+                                  char *, struct ui_file *);
 
 static void free_symtab_block PARAMS ((struct objfile *, struct block *));
 
@@ -72,7 +71,7 @@ struct print_symbol_args
   {
     struct symbol *symbol;
     int depth;
-    GDB_FILE *outfile;
+    struct ui_file *outfile;
   };
 
 static int print_symbol PARAMS ((PTR));
@@ -269,7 +268,7 @@ dump_objfile (objfile)
 static void
 dump_msymbols (objfile, outfile)
      struct objfile *objfile;
-     GDB_FILE *outfile;
+     struct ui_file *outfile;
 {
   struct minimal_symbol *msymbol;
   int index;
@@ -346,7 +345,7 @@ static void
 dump_psymtab (objfile, psymtab, outfile)
      struct objfile *objfile;
      struct partial_symtab *psymtab;
-     GDB_FILE *outfile;
+     struct ui_file *outfile;
 {
   int i;
 
@@ -415,7 +414,7 @@ static void
 dump_symtab (objfile, symtab, outfile)
      struct objfile *objfile;
      struct symtab *symtab;
-     GDB_FILE *outfile;
+     struct ui_file *outfile;
 {
   register int i, j;
   int len, blen;
@@ -507,7 +506,7 @@ maintenance_print_symbols (args, from_tty)
      int from_tty;
 {
   char **argv;
-  GDB_FILE *outfile;
+  struct ui_file *outfile;
   struct cleanup *cleanups;
   char *symname = NULL;
   char *filename = DEV_TTY;
@@ -543,7 +542,7 @@ Arguments missing: an output file name and an optional symbol file name");
   outfile = gdb_fopen (filename, FOPEN_WT);
   if (outfile == 0)
     perror_with_name (filename);
-  make_cleanup_gdb_file_delete (outfile);
+  make_cleanup_ui_file_delete (outfile);
 
   immediate_quit++;
   ALL_SYMTABS (objfile, s)
@@ -564,7 +563,7 @@ print_symbol (args)
 {
   struct symbol *symbol = ((struct print_symbol_args *) args)->symbol;
   int depth = ((struct print_symbol_args *) args)->depth;
-  GDB_FILE *outfile = ((struct print_symbol_args *) args)->outfile;
+  struct ui_file *outfile = ((struct print_symbol_args *) args)->outfile;
 
   print_spaces (depth, outfile);
   if (SYMBOL_NAMESPACE (symbol) == LABEL_NAMESPACE)
@@ -745,7 +744,7 @@ maintenance_print_psymbols (args, from_tty)
      int from_tty;
 {
   char **argv;
-  GDB_FILE *outfile;
+  struct ui_file *outfile;
   struct cleanup *cleanups;
   char *symname = NULL;
   char *filename = DEV_TTY;
@@ -780,7 +779,7 @@ maintenance_print_psymbols (args, from_tty)
   outfile = gdb_fopen (filename, FOPEN_WT);
   if (outfile == 0)
     perror_with_name (filename);
-  make_cleanup_gdb_file_delete (outfile);
+  make_cleanup_ui_file_delete (outfile);
 
   immediate_quit++;
   ALL_PSYMTABS (objfile, ps)
@@ -795,7 +794,7 @@ print_partial_symbols (p, count, what, outfile)
      struct partial_symbol **p;
      int count;
      char *what;
-     GDB_FILE *outfile;
+     struct ui_file *outfile;
 {
   fprintf_filtered (outfile, "  %s partial symbols:\n", what);
   while (count-- > 0)
@@ -894,7 +893,7 @@ maintenance_print_msymbols (args, from_tty)
      int from_tty;
 {
   char **argv;
-  GDB_FILE *outfile;
+  struct ui_file *outfile;
   struct cleanup *cleanups;
   char *filename = DEV_TTY;
   char *symname = NULL;
@@ -928,7 +927,7 @@ maintenance_print_msymbols (args, from_tty)
   outfile = gdb_fopen (filename, FOPEN_WT);
   if (outfile == 0)
     perror_with_name (filename);
-  make_cleanup_gdb_file_delete (outfile);
+  make_cleanup_ui_file_delete (outfile);
 
   immediate_quit++;
   ALL_OBJFILES (objfile)
index 32b5e6f012df8b1628068cec7655607c0a347201..e4011f3f95e84f4153e3fb4afb68e0e7d0c1b22f 100644 (file)
@@ -1,5 +1,5 @@
 /* OBSOLETE /* Print instructions for Tahoe target machines, for GDB. */
-/* OBSOLETE    Copyright 1986, 1989, 1991, 1992 Free Software Foundation, Inc. */
+/* OBSOLETE    Copyright 1986, 1989, 1991, 1992, 2000 Free Software Foundation, Inc. */
 /* OBSOLETE    Contributed by the State University of New York at Buffalo, by the */
 /* OBSOLETE    Distributed Computer Systems Lab, Department of Computer Science, 1991. */
 /* OBSOLETE  */
@@ -78,7 +78,7 @@
 /* OBSOLETE int */
 /* OBSOLETE tahoe_print_insn (memaddr, stream) */
 /* OBSOLETE      CORE_ADDR memaddr; */
-/* OBSOLETE      GDB_FILE *stream; */
+/* OBSOLETE      struct ui_file *stream; */
 /* OBSOLETE { */
 /* OBSOLETE   unsigned char buffer[MAXLEN]; */
 /* OBSOLETE   register int i; */
 /* OBSOLETE      char *d; */
 /* OBSOLETE      register char *p; */
 /* OBSOLETE      CORE_ADDR addr; */
-/* OBSOLETE      GDB_FILE *stream; */
+/* OBSOLETE      struct ui_file *stream; */
 /* OBSOLETE { */
 /* OBSOLETE   int temp1 = 0; */
 /* OBSOLETE   register int regnum = *p & 0xf; */
index bf465dd7cfe6c3f24749a1baa26ee08cd141e247..a13ac25040e2dc9f98ead7b683879ec958e19562 100644 (file)
@@ -1,5 +1,5 @@
 /* Select target systems and architectures at runtime for GDB.
-   Copyright 1990, 1992-1995, 1998, 1999 Free Software Foundation, Inc.
+   Copyright 1990, 1992-1995, 1998-2000 Free Software Foundation, Inc.
    Contributed by Cygnus Support.
 
    This file is part of GDB.
@@ -549,7 +549,7 @@ cleanup_target (t)
            (int (*) (int, char *, char *, int *)) 
            return_zero);
   de_fault (to_rcmd, 
-           (void (*) (char *, struct gdb_file *)) 
+           (void (*) (char *, struct ui_file *)) 
            tcomplain);
   de_fault (to_enable_exception_callback, 
            (struct symtab_and_line * (*) (enum exception_event_kind, int)) 
@@ -2892,7 +2892,7 @@ debug_to_query (type, req, resp, siz)
 
 static void
 debug_to_rcmd (char *command,
-              struct gdb_file *outbuf)
+              struct ui_file *outbuf)
 {
   debug_target.to_rcmd (command, outbuf);
   fprintf_unfiltered (gdb_stdlog, "target_rcmd (%s, ...)\n", command);
index 5582223f8acad3719df8816ace5eb864b71080a2..a7dfe2bcb0f24fdca0f96e01c9612e22daa98642 100644 (file)
@@ -1,5 +1,5 @@
 /* Interface between GDB and target environments, including files and processes
-   Copyright 1990, 91, 92, 93, 94, 1999 Free Software Foundation, Inc.
+   Copyright 1990-1994, 1999, 2000 Free Software Foundation, Inc.
    Contributed by Cygnus Support.  Written by John Gilmore.
 
    This file is part of GDB.
@@ -425,7 +425,7 @@ struct target_ops
     char *(*to_extra_thread_info) PARAMS ((struct thread_info *));
     void (*to_stop) PARAMS ((void));
     int (*to_query) PARAMS ((int /*char */ , char *, char *, int *));
-    void (*to_rcmd) (char *command, struct gdb_file *output);
+    void (*to_rcmd) (char *command, struct ui_file *output);
     struct symtab_and_line *(*to_enable_exception_callback) PARAMS ((enum exception_event_kind, int));
     struct exception_event_record *(*to_get_current_exception_event) PARAMS ((void));
     char *(*to_pid_to_exec_file) PARAMS ((int pid));
index c19818c3b41b389d09f4accdf2163a19f364e4db..8a26c9ec0b849ede5f2ddeecf5d0e4a5fc27a899 100644 (file)
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -1,6 +1,5 @@
 /* Top level stuff for GDB, the GNU debugger.
-   Copyright 1986, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 1999
-   Free Software Foundation, Inc.
+   Copyright 1986-2000 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -840,7 +839,7 @@ void
 print_command_line (cmd, depth, stream)
      struct command_line *cmd;
      unsigned int depth;
-     GDB_FILE *stream;
+     struct ui_file *stream;
 {
   unsigned int i;
 
@@ -2970,7 +2969,7 @@ document_command (comname, from_tty)
 /* Print the GDB banner. */
 void
 print_gdb_version (stream)
-     GDB_FILE *stream;
+     struct ui_file *stream;
 {
   /* From GNU coding standards, first line is meant to be easy for a
      program to parse, and is just canonical program name and version
index 36bf52b509a0363d835fe7167d4939faeee7842e..9e962a350ba5581b11b14bee969d9c0041d1d3fd 100644 (file)
--- a/gdb/top.h
+++ b/gdb/top.h
@@ -1,6 +1,5 @@
 /* Top level stuff for GDB, the GNU debugger.
-   Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994
-   Free Software Foundation, Inc.
+   Copyright 1986-1994, 2000 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -28,7 +27,7 @@ extern int inhibit_gdbinit;
 extern int epoch_interface;
 extern char gdbinit[];
 
-extern void print_gdb_version PARAMS ((GDB_FILE *));
+extern void print_gdb_version (struct ui_file *);
 
 extern void source_command PARAMS ((char *, int));
 extern void cd_command PARAMS ((char *, int));
index 8f8f17934fff8d31b8b6fcca5c083a6cf0471ba8..642b7cb71a1ab959138b1471e1ba3ea4aebf3e35 100644 (file)
@@ -1,3 +1,9 @@
+Tue Feb  1 00:17:12 2000  Andrew Cagney  <cagney@b1.cygnus.com>
+
+       * tui-file.c, tui-file.h, tuiDisassem.c, tuiIO.c, tuiIO.h,
+       tuiRegs.c: Update to reflect rename of gdb-file / GDB_FILE to
+       ui-file / ``struct ui_file''.
+
 Mon Jan 31 18:12:43 2000  Andrew Cagney  <cagney@b1.cygnus.com>
 
        * tui-file.c (enum streamtype, struct tui_stream, tui_file_new,
index ae3f842e96161269e63220fd809c7823f15a189a..7822108de8aaef9ac4ef59e5444eed8b3f77e4e4 100644 (file)
@@ -1,4 +1,4 @@
-/* GDB_FILE - a generic STDIO like output stream.
+/* UI_FILE - a generic STDIO like output stream.
    Copyright (C) 1999, 2000 Free Software Foundation, Inc.
 
    This file is part of GDB.
    Boston, MA 02111-1307, USA.  */
 
 #include "defs.h"
-#include "gdb-file.h"
+#include "ui-file.h"
 #include "tui/tui-file.h"
 
 #include <string.h>
 
 /* Called instead of fputs for all TUI_FILE output.  */
 
-void (*fputs_unfiltered_hook) (const char *linebuffer, GDB_FILE * stream);
+void (*fputs_unfiltered_hook) (const char *linebuffer,
+                              struct ui_file * stream);
 
-/* A ``struct gdb_file'' that is compatible with all the legacy
+/* A ``struct ui_file'' that is compatible with all the legacy
    code. */
 
 /* new */
@@ -48,35 +49,35 @@ struct tui_stream
   int ts_buflen;
 };
 
-static gdb_file_flush_ftype tui_file_flush;
-extern gdb_file_fputs_ftype tui_file_fputs;
-static gdb_file_isatty_ftype tui_file_isatty;
-static gdb_file_rewind_ftype tui_file_rewind;
-static gdb_file_put_ftype tui_file_put;
-static gdb_file_delete_ftype tui_file_delete;
-static struct gdb_file *tui_file_new PARAMS ((void));
+static ui_file_flush_ftype tui_file_flush;
+extern ui_file_fputs_ftype tui_file_fputs;
+static ui_file_isatty_ftype tui_file_isatty;
+static ui_file_rewind_ftype tui_file_rewind;
+static ui_file_put_ftype tui_file_put;
+static ui_file_delete_ftype tui_file_delete;
+static struct ui_file *tui_file_new PARAMS ((void));
 static int tui_file_magic;
 
-static struct gdb_file *
+static struct ui_file *
 tui_file_new ()
 {
   struct tui_stream *tui = xmalloc (sizeof (struct tui_stream));
-  struct gdb_file *file = gdb_file_new ();
-  set_gdb_file_data (file, tui, tui_file_delete);
-  set_gdb_file_flush (file, tui_file_flush);
-  set_gdb_file_fputs (file, tui_file_fputs);
-  set_gdb_file_isatty (file, tui_file_isatty);
-  set_gdb_file_rewind (file, tui_file_rewind);
-  set_gdb_file_put (file, tui_file_put);
+  struct ui_file *file = ui_file_new ();
+  set_ui_file_data (file, tui, tui_file_delete);
+  set_ui_file_flush (file, tui_file_flush);
+  set_ui_file_fputs (file, tui_file_fputs);
+  set_ui_file_isatty (file, tui_file_isatty);
+  set_ui_file_rewind (file, tui_file_rewind);
+  set_ui_file_put (file, tui_file_put);
   tui->ts_magic = &tui_file_magic;
   return file;
 }
 
 static void
 tui_file_delete (file)
-     struct gdb_file *file;
+     struct ui_file *file;
 {
-  struct tui_stream *tmpstream = gdb_file_data (file);
+  struct tui_stream *tmpstream = ui_file_data (file);
   if (tmpstream->ts_magic != &tui_file_magic)
     internal_error ("tui_file_delete: bad magic number");
   if ((tmpstream->ts_streamtype == astring) &&
@@ -87,12 +88,12 @@ tui_file_delete (file)
   free (tmpstream);
 }
 
-struct gdb_file *
+struct ui_file *
 tui_fileopen (stream)
      FILE *stream;
 {
-  struct gdb_file *file = tui_file_new ();
-  struct tui_stream *tmpstream = gdb_file_data (file);
+  struct ui_file *file = tui_file_new ();
+  struct tui_stream *tmpstream = ui_file_data (file);
   tmpstream->ts_streamtype = afile;
   tmpstream->ts_filestream = stream;
   tmpstream->ts_strbuf = NULL;
@@ -100,12 +101,12 @@ tui_fileopen (stream)
   return file;
 }
 
-struct gdb_file *
+struct ui_file *
 tui_sfileopen (n)
      int n;
 {
-  struct gdb_file *file = tui_file_new ();
-  struct tui_stream *tmpstream = gdb_file_data (file);
+  struct ui_file *file = tui_file_new ();
+  struct tui_stream *tmpstream = ui_file_data (file);
   tmpstream->ts_streamtype = astring;
   tmpstream->ts_filestream = NULL;
   if (n > 0)
@@ -123,9 +124,9 @@ tui_sfileopen (n)
 
 static int
 tui_file_isatty (file)
-     struct gdb_file *file;
+     struct ui_file *file;
 {
-  struct tui_stream *stream = gdb_file_data (file);
+  struct tui_stream *stream = ui_file_data (file);
   if (stream->ts_magic != &tui_file_magic)
     internal_error ("tui_file_isatty: bad magic number");
   if (stream->ts_streamtype == afile)
@@ -136,20 +137,20 @@ tui_file_isatty (file)
 
 static void
 tui_file_rewind (file)
-     struct gdb_file *file;
+     struct ui_file *file;
 {
-  struct tui_stream *stream = gdb_file_data (file);
+  struct tui_stream *stream = ui_file_data (file);
   if (stream->ts_magic != &tui_file_magic)
     internal_error ("tui_file_rewind: bad magic number");
   stream->ts_strbuf[0] = '\0';
 }
 
 static void
-tui_file_put (struct gdb_file *file,
-             gdb_file_put_method_ftype *write,
+tui_file_put (struct ui_file *file,
+             ui_file_put_method_ftype *write,
              void *dest)
 {
-  struct tui_stream *stream = gdb_file_data (file);
+  struct tui_stream *stream = ui_file_data (file);
   if (stream->ts_magic != &tui_file_magic)
     internal_error ("tui_file_put: bad magic number");
   if (stream->ts_streamtype == astring)
@@ -168,15 +169,15 @@ tui_file_put (struct gdb_file *file,
 void
 tui_file_fputs (linebuffer, file)
      const char *linebuffer;
-     GDB_FILE *file;
+     struct ui_file *file;
 {
-  struct tui_stream *stream = gdb_file_data (file);
+  struct tui_stream *stream = ui_file_data (file);
 #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
+     instead implement their own ui_file object and install that. See
      also tui_file_flush(). */
   if (fputs_unfiltered_hook
       && (file == gdb_stdout
@@ -235,9 +236,9 @@ tui_file_fputs (linebuffer, file)
 }
 
 char *
-tui_file_get_strbuf (struct gdb_file *file)
+tui_file_get_strbuf (struct ui_file *file)
 {
-  struct tui_stream *stream = gdb_file_data (file);
+  struct tui_stream *stream = ui_file_data (file);
   if (stream->ts_magic != &tui_file_magic)
     internal_error ("tui_file_get_strbuf: bad magic number");
   return (stream->ts_strbuf);
@@ -246,9 +247,9 @@ tui_file_get_strbuf (struct gdb_file *file)
 /* adjust the length of the buffer by the amount necessary
    to accomodate appending a string of length N to the buffer contents */
 void
-tui_file_adjust_strbuf (int n, struct gdb_file *file)
+tui_file_adjust_strbuf (int n, struct ui_file *file)
 {
-  struct tui_stream *stream = gdb_file_data (file);
+  struct tui_stream *stream = ui_file_data (file);
   int non_null_chars;
   if (stream->ts_magic != &tui_file_magic)
     internal_error ("tui_file_adjust_strbuf: bad magic number");
@@ -274,16 +275,16 @@ tui_file_adjust_strbuf (int n, struct gdb_file *file)
 
 static void
 tui_file_flush (file)
-     GDB_FILE *file;
+     struct ui_file *file;
 {
-  struct tui_stream *stream = gdb_file_data (file);
+  struct tui_stream *stream = ui_file_data (file);
   if (stream->ts_magic != &tui_file_magic)
     internal_error ("tui_file_flush: bad magic number");
 
   /* NOTE: cagney/1999-10-12: If we've been linked with code that uses
      fputs_unfiltered_hook then we assume that it doesn't need to know
      about flushes.  Code that does need to know about flushes can
-     implement a proper gdb_file object. */
+     implement a proper ui_file object. */
   if (fputs_unfiltered_hook)
     return;
 
index c962d4ff714ebab9779293d20359a002a719d312..acc019db6ca3189cdfc2b8011f6d60b24b29341d 100644 (file)
@@ -1,4 +1,4 @@
-/* GDB_FILE - a generic STDIO like output stream.
+/* UI_FILE - a generic STDIO like output stream.
    Copyright (C) 1999, 2000 Free Software Foundation, Inc.
 
    This file is part of GDB.
 #ifndef TUI_FILE_H
 #define TUI_FILE_H
 
-extern struct gdb_file *tui_fileopen (FILE *);
-extern struct gdb_file *tui_sfileopen (int);
-extern char *tui_file_get_strbuf (struct gdb_file *);
-extern void tui_file_adjust_strbuf (int, struct gdb_file *);
+extern struct ui_file *tui_fileopen (FILE *);
+extern struct ui_file *tui_sfileopen (int);
+extern char *tui_file_get_strbuf (struct ui_file *);
+extern void tui_file_adjust_strbuf (int, struct ui_file *);
 
 /* NOTE: cagney/1999-10-14: fputs_unfiltered_hook is deprecated.  Code
    wanting to control GDB's output should override the gdb_std...
    files. */
 extern void (*fputs_unfiltered_hook) (const char *linebuffer,
-                                     GDB_FILE * stream);
+                                     struct ui_file * stream);
 #endif
index a39574b3890133ed6ae17263dda708c5eaff68b1..a6df69432f55bb589a39572157473aaa099eb4fa 100644 (file)
@@ -43,7 +43,7 @@ tuiSetDisassemContent (s, startAddr)
 #endif
 {
   TuiStatus ret = TUI_FAILURE;
-  GDB_FILE *gdb_dis_out;
+  struct ui_file *gdb_dis_out;
 
   if (startAddr != (Opaque) NULL)
     {
@@ -65,7 +65,7 @@ tuiSetDisassemContent (s, startAddr)
          lineWidth = disassemWin->generic.width - 1;
          threshold = (lineWidth - 1) + offset;
 
-         /* now init the gdb_file structure */
+         /* now init the ui_file structure */
          gdb_dis_out = tui_sfileopen (threshold);
 
          INIT_DISASSEMBLE_INFO_NO_ARCH (asmInfo, gdb_dis_out, (fprintf_ftype) fprintf_filtered);
@@ -118,7 +118,7 @@ tuiSetDisassemContent (s, startAddr)
              /* reset the buffer to empty */
              tui_file_get_strbuf (gdb_dis_out)[0] = '\0';
            }
-         gdb_file_delete (gdb_dis_out);
+         ui_file_delete (gdb_dis_out);
          gdb_dis_out = NULL;
          disassemWin->generic.contentSize = curLine;
          ret = TUI_SUCCESS;
index f443bd00b126405f50022de95a2685049de9f41a..60a296526f88ff9b059f80dee8e6d8c651607d67 100644 (file)
@@ -50,11 +50,11 @@ void
 #ifdef __STDC__
 tuiPuts_unfiltered (
                     const char *string,
-                    GDB_FILE * stream)
+                    struct ui_file * stream)
 #else
 tuiPuts_unfiltered (string, stream)
      char *string;
-     GDB_FILE *stream;
+     struct ui_file *stream;
 #endif
 {
   int len = strlen (string);
index adb7b15da191c3805fe84afa62b8f8df29a3b0d2..a1fe6a098efe255cf16c3f2dd822173fb38630f5 100644 (file)
@@ -7,7 +7,7 @@
 
 #include <stdio.h>
 
-extern void tuiPuts_unfiltered PARAMS ((const char *, GDB_FILE *));
+extern void tuiPuts_unfiltered  (const char *, struct ui_file *);
 extern unsigned int tuiGetc PARAMS ((void));
 extern unsigned int tuiBufferGetc PARAMS ((void));
 extern int tuiRead PARAMS ((int, char *, int));
index 33d6079cf8738aefcfc56dfc0f5dca9685e7bf5d..30dd906da9c782ef101fe0ce637042c76a02ca33 100644 (file)
@@ -669,12 +669,12 @@ _tuiRegisterFormat (buf, bufLen, regNum, dataElement, precision)
 {
   char tmpBuf[15];
   char *fmt;
-  GDB_FILE *stream;
+  struct ui_file *stream;
 
   stream = tui_sfileopen (bufLen);
   pa_do_strcat_registers_info (regNum, 0, stream, precision);
   strcpy (buf, tui_file_get_strbuf (stream));
-  gdb_file_delete (stream);
+  ui_file_delete (stream);
 
   return;
 }                              /* _tuiRegisterFormat */
index e892e5e6da2cb81f412e4d82a3d9594828bfd7af..560c4a1d7fa65080f159ef43a5b5b417c7bc8c24 100644 (file)
@@ -1,5 +1,5 @@
 /* Language independent support for printing types for GDB, the GNU debugger.
-   Copyright 1986, 88, 89, 91, 92, 93, 1998 Free Software Foundation, Inc.
+   Copyright 1986, 1988, 1989, 1991-1993, 1998, 2000 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -64,7 +64,7 @@ void
 type_print (type, varstring, stream, show)
      struct type *type;
      char *varstring;
-     GDB_FILE *stream;
+     struct ui_file *stream;
      int show;
 {
   LA_PRINT_TYPE (type, varstring, stream, show, 0);
@@ -197,7 +197,7 @@ void
 print_type_scalar (type, val, stream)
      struct type *type;
      LONGEST val;
-     GDB_FILE *stream;
+     struct ui_file *stream;
 {
   unsigned int i;
   unsigned len;
index 0d13a3810b368249060a46181c4c2e8df26e5234..a0d44385ffe91f6eecb57aeaf6d2ac1373ccf6d4 100644 (file)
@@ -1,5 +1,5 @@
 /* Language independent support for printing types for GDB, the GNU debugger.
-   Copyright 1986, 1988, 1989, 1991, 1992, 1993, 1999
+   Copyright 1986, 1988, 1989, 1991-1993, 1999, 2000
    Free Software Foundation, Inc.
 
    This file is part of GDB.
@@ -19,8 +19,7 @@
    Foundation, Inc., 59 Temple Place - Suite 330,
    Boston, MA 02111-1307, USA.  */
 
-void
-print_type_scalar PARAMS ((struct type * type, LONGEST, GDB_FILE *));
+void print_type_scalar (struct type * type, LONGEST, struct ui_file *);
 
-void
-c_type_print_varspec_suffix PARAMS ((struct type *, GDB_FILE *, int, int, int));
+void c_type_print_varspec_suffix (struct type *, struct ui_file *, int,
+                                 int, int);
diff --git a/gdb/ui-file.c b/gdb/ui-file.c
new file mode 100644 (file)
index 0000000..d077009
--- /dev/null
@@ -0,0 +1,511 @@
+/* UI_FILE - a generic STDIO like output stream.
+   Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
+
+/* Implement the ``struct ui_file'' object. */
+
+#include "defs.h"
+#include "ui-file.h"
+
+#undef XMALLOC
+#define XMALLOC(TYPE) ((TYPE*) xmalloc (sizeof (TYPE)))
+
+static ui_file_isatty_ftype null_file_isatty;
+static ui_file_write_ftype null_file_write;
+static ui_file_fputs_ftype null_file_fputs;
+static ui_file_flush_ftype null_file_flush;
+static ui_file_delete_ftype null_file_delete;
+static ui_file_rewind_ftype null_file_rewind;
+static ui_file_put_ftype null_file_put;
+
+struct ui_file
+  {
+    int *magic;
+    ui_file_flush_ftype *to_flush;
+    ui_file_write_ftype *to_write;
+    ui_file_fputs_ftype *to_fputs;
+    ui_file_delete_ftype *to_delete;
+    ui_file_isatty_ftype *to_isatty;
+    ui_file_rewind_ftype *to_rewind;
+    ui_file_put_ftype *to_put;
+    void *to_data;
+  };
+int ui_file_magic;
+
+struct ui_file *
+ui_file_new ()
+{
+  struct ui_file *file = xmalloc (sizeof (struct ui_file));
+  file->magic = &ui_file_magic;
+  set_ui_file_data (file, NULL, null_file_delete);
+  set_ui_file_flush (file, null_file_flush);
+  set_ui_file_write (file, null_file_write);
+  set_ui_file_fputs (file, null_file_fputs);
+  set_ui_file_isatty (file, null_file_isatty);
+  set_ui_file_rewind (file, null_file_rewind);
+  set_ui_file_put (file, null_file_put);
+  return file;
+}
+
+void
+ui_file_delete (file)
+     struct ui_file *file;
+{
+  file->to_delete (file);
+  free (file);
+}
+
+static int
+null_file_isatty (file)
+     struct ui_file *file;
+{
+  return 0;
+}
+
+static void
+null_file_rewind (file)
+     struct ui_file *file;
+{
+  return;
+}
+
+static void
+null_file_put (struct ui_file *file,
+              ui_file_put_method_ftype *write,
+              void *dest)
+{
+  return;
+}
+
+static void
+null_file_flush (file)
+     struct ui_file *file;
+{
+  return;
+}
+
+static void
+null_file_write (struct ui_file *file,
+                const char *buf,
+                long sizeof_buf)
+{
+  if (file->to_fputs == null_file_fputs)
+    /* Both the write and fputs methods are null. Discard the
+       request. */
+    return;
+  else
+    {
+      /* The fputs method isn't null, slowly pass the write request
+         onto that.  FYI, this isn't as bad as it may look - the
+         current (as of 1999-11-07) printf_* function calls fputc and
+         fputc does exactly the below.  By having a write function it
+         is possible to clean up that code.  */
+      int i;
+      char b[2];
+      b[1] = '\0';
+      for (i = 0; i < sizeof_buf; i++)
+       {
+         b[0] = buf[i];
+         file->to_fputs (b, file);
+       }
+      return;
+    }
+}
+
+static void
+null_file_fputs (buf, file)
+     const char *buf;
+     struct ui_file *file;
+{
+  if (file->to_write == null_file_write)
+    /* Both the write and fputs methods are null. Discard the
+       request. */
+    return;
+  else
+    {
+      /* The write method was implemented, use that. */
+      file->to_write (file, buf, strlen (buf));
+    }
+}
+
+static void
+null_file_delete (file)
+     struct ui_file *file;
+{
+  return;
+}
+
+void *
+ui_file_data (file)
+     struct ui_file *file;
+{
+  if (file->magic != &ui_file_magic)
+    internal_error ("ui_file_data: bad magic number");
+  return file->to_data;
+}
+
+void
+gdb_flush (file)
+     struct ui_file *file;
+{
+  file->to_flush (file);
+}
+
+int
+ui_file_isatty (file)
+     struct ui_file *file;
+{
+  return file->to_isatty (file);
+}
+
+void
+ui_file_rewind (file)
+     struct ui_file *file;
+{
+  file->to_rewind (file);
+}
+
+void
+ui_file_put (struct ui_file *file,
+             ui_file_put_method_ftype *write,
+             void *dest)
+{
+  file->to_put (file, write, dest);
+}
+
+void
+ui_file_write (struct ui_file *file,
+               const char *buf,
+               long length_buf)
+{
+  file->to_write (file, buf, length_buf);
+}
+
+void
+fputs_unfiltered (buf, file)
+     const char *buf;
+     struct ui_file *file;
+{
+  file->to_fputs (buf, file);
+}
+
+void
+set_ui_file_flush (file, flush)
+     struct ui_file *file;
+     ui_file_flush_ftype *flush;
+{
+  file->to_flush = flush;
+}
+
+void
+set_ui_file_isatty (file, isatty)
+     struct ui_file *file;
+     ui_file_isatty_ftype *isatty;
+{
+  file->to_isatty = isatty;
+}
+
+void
+set_ui_file_rewind (file, rewind)
+     struct ui_file *file;
+     ui_file_rewind_ftype *rewind;
+{
+  file->to_rewind = rewind;
+}
+
+void
+set_ui_file_put (file, put)
+     struct ui_file *file;
+     ui_file_put_ftype *put;
+{
+  file->to_put = put;
+}
+
+void
+set_ui_file_write (struct ui_file *file,
+                   ui_file_write_ftype *write)
+{
+  file->to_write = write;
+}
+
+void
+set_ui_file_fputs (file, fputs)
+     struct ui_file *file;
+     ui_file_fputs_ftype *fputs;
+{
+  file->to_fputs = fputs;
+}
+
+void
+set_ui_file_data (file, data, delete)
+     struct ui_file *file;
+     void *data;
+     ui_file_delete_ftype *delete;
+{
+  file->to_data = data;
+  file->to_delete = delete;
+}
+
+/* ui_file utility function for converting a ``struct ui_file'' into
+   a memory buffer''. */
+
+struct accumulated_ui_file
+{
+  char *buffer;
+  long length;
+};
+
+static void
+do_ui_file_xstrdup (void *context, const char *buffer, long length)
+{
+  struct accumulated_ui_file *acc = context;
+  if (acc->buffer == NULL)
+    acc->buffer = xmalloc (length + 1);
+  else
+    acc->buffer = xrealloc (acc->buffer, acc->length + length + 1);
+  memcpy (acc->buffer + acc->length, buffer, length);
+  acc->length += length;
+  acc->buffer[acc->length] = '\0';
+}
+
+char *
+ui_file_xstrdup (struct ui_file *file,
+                 long *length)
+{
+  struct accumulated_ui_file acc;
+  acc.buffer = NULL;
+  acc.length = 0;
+  ui_file_put (file, do_ui_file_xstrdup, &acc);
+  if (acc.buffer == NULL)
+    acc.buffer = xstrdup ("");
+  *length = acc.length;
+  return acc.buffer;
+}
+\f
+/* A pure memory based ``struct ui_file'' that can be used an output
+   buffer. The buffers accumulated contents are available via
+   ui_file_put(). */
+
+struct mem_file
+  {
+    int *magic;
+    char *buffer;
+    int sizeof_buffer;
+    int length_buffer;
+  };
+
+static ui_file_rewind_ftype mem_file_rewind;
+static ui_file_put_ftype mem_file_put;
+static ui_file_write_ftype mem_file_write;
+static ui_file_delete_ftype mem_file_delete;
+static struct ui_file *mem_file_new PARAMS ((void));
+static int mem_file_magic;
+
+static struct ui_file *
+mem_file_new (void)
+{
+  struct mem_file *stream = XMALLOC (struct mem_file);
+  struct ui_file *file = ui_file_new ();
+  set_ui_file_data (file, stream, mem_file_delete);
+  set_ui_file_rewind (file, mem_file_rewind);
+  set_ui_file_put (file, mem_file_put);
+  set_ui_file_write (file, mem_file_write);
+  stream->magic = &mem_file_magic;
+  stream->buffer = NULL;
+  stream->sizeof_buffer = 0;
+  stream->length_buffer = 0;
+  return file;
+}
+
+static void
+mem_file_delete (struct ui_file *file)
+{
+  struct mem_file *stream = ui_file_data (file);
+  if (stream->magic != &mem_file_magic)
+    internal_error ("mem_file_delete: bad magic number");
+  if (stream->buffer != NULL)
+    free (stream->buffer);
+  free (stream);
+}
+
+struct ui_file *
+mem_fileopen (void)
+{
+  return mem_file_new ();
+}
+
+static void
+mem_file_rewind (struct ui_file *file)
+{
+  struct mem_file *stream = ui_file_data (file);
+  if (stream->magic != &mem_file_magic)
+    internal_error ("mem_file_rewind: bad magic number");
+  stream->length_buffer = 0;
+}
+
+static void
+mem_file_put (struct ui_file *file,
+             ui_file_put_method_ftype *write,
+             void *dest)
+{
+  struct mem_file *stream = ui_file_data (file);
+  if (stream->magic != &mem_file_magic)
+    internal_error ("mem_file_put: bad magic number");
+  if (stream->length_buffer > 0)
+    write (dest, stream->buffer, stream->length_buffer);
+}
+
+void
+mem_file_write (struct ui_file *file,
+               const char *buffer,
+               long length_buffer)
+{
+  struct mem_file *stream = ui_file_data (file);
+  if (stream->magic != &mem_file_magic)
+    internal_error ("mem_file_write: bad magic number");
+  if (stream->buffer == NULL)
+    {
+      stream->length_buffer = length_buffer;
+      stream->sizeof_buffer = length_buffer;
+      stream->buffer = xmalloc (stream->sizeof_buffer);
+      memcpy (stream->buffer, buffer, length_buffer);
+    }
+  else
+    {
+      int new_length = stream->length_buffer + length_buffer;
+      if (new_length >= stream->sizeof_buffer)
+       {
+         stream->sizeof_buffer = new_length;
+         stream->buffer = xrealloc (stream->buffer, stream->sizeof_buffer);
+       }
+      memcpy (stream->buffer + stream->length_buffer, buffer, length_buffer);
+      stream->length_buffer = new_length;
+    }
+}
+\f
+/* ``struct ui_file'' implementation that maps directly onto
+   <stdio.h>'s FILE. */
+
+static ui_file_write_ftype stdio_file_write;
+static ui_file_fputs_ftype stdio_file_fputs;
+static ui_file_isatty_ftype stdio_file_isatty;
+static ui_file_delete_ftype stdio_file_delete;
+static struct ui_file *stdio_file_new PARAMS ((FILE * file, int close_p));
+static ui_file_flush_ftype stdio_file_flush;
+
+static int stdio_file_magic;
+
+struct stdio_file
+  {
+    int *magic;
+    FILE *file;
+    int close_p;
+  };
+
+static struct ui_file *
+stdio_file_new (file, close_p)
+     FILE *file;
+     int close_p;
+{
+  struct ui_file *ui_file = ui_file_new ();
+  struct stdio_file *stdio = xmalloc (sizeof (struct stdio_file));
+  stdio->magic = &stdio_file_magic;
+  stdio->file = file;
+  stdio->close_p = close_p;
+  set_ui_file_data (ui_file, stdio, stdio_file_delete);
+  set_ui_file_flush (ui_file, stdio_file_flush);
+  set_ui_file_write (ui_file, stdio_file_write);
+  set_ui_file_fputs (ui_file, stdio_file_fputs);
+  set_ui_file_isatty (ui_file, stdio_file_isatty);
+  return ui_file;
+}
+
+static void
+stdio_file_delete (file)
+     struct ui_file *file;
+{
+  struct stdio_file *stdio = ui_file_data (file);
+  if (stdio->magic != &stdio_file_magic)
+    internal_error ("stdio_file_delete: bad magic number");
+  if (stdio->close_p)
+    {
+      fclose (stdio->file);
+    }
+  free (stdio);
+}
+
+static void
+stdio_file_flush (file)
+     struct ui_file *file;
+{
+  struct stdio_file *stdio = ui_file_data (file);
+  if (stdio->magic != &stdio_file_magic)
+    internal_error ("stdio_file_flush: bad magic number");
+  fflush (stdio->file);
+}
+
+static void
+stdio_file_write (struct ui_file *file, const char *buf, long length_buf)
+{
+  struct stdio_file *stdio = ui_file_data (file);
+  if (stdio->magic != &stdio_file_magic)
+    internal_error ("stdio_file_write: bad magic number");
+  fwrite (buf, length_buf, 1, stdio->file);
+}
+
+static void
+stdio_file_fputs (linebuffer, file)
+     const char *linebuffer;
+     struct ui_file *file;
+{
+  struct stdio_file *stdio = ui_file_data (file);
+  if (stdio->magic != &stdio_file_magic)
+    internal_error ("stdio_file_fputs: bad magic number");
+  fputs (linebuffer, stdio->file);
+}
+
+static int
+stdio_file_isatty (file)
+     struct ui_file *file;
+{
+  struct stdio_file *stdio = ui_file_data (file);
+  if (stdio->magic != &stdio_file_magic)
+    internal_error ("stdio_file_isatty: bad magic number");
+  return (isatty (fileno (stdio->file)));
+}
+
+/* Like fdopen().  Create a ui_file from a previously opened FILE. */
+
+struct ui_file *
+stdio_fileopen (file)
+     FILE *file;
+{
+  return stdio_file_new (file, 0);
+}
+
+struct ui_file *
+gdb_fopen (name, mode)
+     char *name;
+     char *mode;
+{
+  FILE *f = fopen (name, mode);
+  if (f == NULL)
+    return NULL;
+  return stdio_file_new (f, 1);
+}
diff --git a/gdb/ui-file.h b/gdb/ui-file.h
new file mode 100644 (file)
index 0000000..c805335
--- /dev/null
@@ -0,0 +1,93 @@
+/* UI_FILE - a generic STDIO like output stream.
+   Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+
+   This file is part of GDB.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 59 Temple Place - Suite 330,
+   Boston, MA 02111-1307, USA.  */
+
+#ifndef UI_FILE_H
+#define UI_FILE_H
+
+struct ui_file;
+
+/* Create a generic ui_file object with null methods. */
+
+extern struct ui_file *ui_file_new (void);
+
+/* Override methods used by specific implementations of a UI_FILE
+   object. */
+
+typedef void (ui_file_flush_ftype) (struct ui_file * stream);
+extern void set_ui_file_flush (struct ui_file *stream, ui_file_flush_ftype * flush);
+
+/* NOTE: Both fputs and write methods are available. Default
+   implementations that mapping one onto the other are included. */
+typedef void (ui_file_write_ftype) (struct ui_file * stream, const char *buf, long length_buf);
+extern void set_ui_file_write (struct ui_file *stream, ui_file_write_ftype *fputs);
+
+typedef void (ui_file_fputs_ftype) (const char *, struct ui_file * stream);
+extern void set_ui_file_fputs (struct ui_file *stream, ui_file_fputs_ftype * fputs);
+
+typedef int (ui_file_isatty_ftype) (struct ui_file * stream);
+extern void set_ui_file_isatty (struct ui_file *stream, ui_file_isatty_ftype * isatty);
+
+typedef void (ui_file_rewind_ftype) (struct ui_file * stream);
+extern void set_ui_file_rewind (struct ui_file *stream, ui_file_rewind_ftype * rewind);
+
+typedef void (ui_file_put_method_ftype) (void *object, const char *buffer, long length_buffer);
+typedef void (ui_file_put_ftype) (struct ui_file *stream, ui_file_put_method_ftype * method, void *context);
+extern void set_ui_file_put (struct ui_file *stream, ui_file_put_ftype * put);
+
+typedef void (ui_file_delete_ftype) (struct ui_file * stream);
+extern void set_ui_file_data (struct ui_file *stream, void *data, ui_file_delete_ftype * delete);
+
+extern void *ui_file_data (struct ui_file *file);
+
+
+extern void gdb_flush (struct ui_file *);
+
+extern void ui_file_delete (struct ui_file *stream);
+
+extern void ui_file_rewind (struct ui_file *stream);
+
+extern int ui_file_isatty (struct ui_file *);
+
+extern void ui_file_write (struct ui_file *file, const char *buf, long length_buf);
+
+/* NOTE: copies left to right */
+extern void ui_file_put (struct ui_file *src, ui_file_put_method_ftype *write, void *dest);
+
+/* Returns a freshly allocated buffer containing the entire contents
+   of FILE (as determined by ui_file_put()) with a NUL character
+   appended.  LENGTH is set to the size of the buffer minus that
+   appended NUL. */
+extern char *ui_file_xstrdup (struct ui_file *file, long *length);
+
+
+
+/* Create/open a memory based file. Can be used as a scratch buffer
+   for collecting output. */
+extern struct ui_file *mem_fileopen (void);
+
+
+
+/* Open/create a an STDIO based UI_FILE using the already open FILE. */
+extern struct ui_file *stdio_fileopen (FILE *file);
+
+/* Open NAME returning an STDIO based UI_FILE. */
+extern struct ui_file *gdb_fopen (char *name, char *mode);
+
+#endif
index 1111eeacd2534ada0513e80ba7b40f3309d5c4a1..2c8d402849363807a7fe5ce882906533ff19e4f8 100644 (file)
@@ -1,5 +1,6 @@
 /* General utility routines for GDB, the GNU debugger.
-   Copyright 1986, 89, 90, 91, 92, 95, 96, 1998 Free Software Foundation, Inc.
+   Copyright 1986, 1989, 1990-1992, 1995, 1996, 1998, 2000
+   Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -57,14 +58,14 @@ void (*error_begin_hook) PARAMS ((void));
 
 /* Holds the last error message issued by gdb */
 
-static GDB_FILE *gdb_lasterr;
+static struct ui_file *gdb_lasterr;
 
 /* Prototypes for local functions */
 
-static void vfprintf_maybe_filtered PARAMS ((GDB_FILE *, const char *,
-                                            va_list, int));
+static void vfprintf_maybe_filtered (struct ui_file *, const char *,
+                                    va_list, int);
 
-static void fputs_maybe_filtered PARAMS ((const char *, GDB_FILE *, int));
+static void fputs_maybe_filtered (const char *, struct ui_file *, int);
 
 #if defined (USE_MMALLOC) && !defined (NO_MMCHECK)
 static void malloc_botch PARAMS ((void));
@@ -79,10 +80,6 @@ set_width_command PARAMS ((char *, int, struct cmd_list_element *));
 static void
 set_width PARAMS ((void));
 
-#ifndef GDB_FILE_ISATTY
-#define GDB_FILE_ISATTY(GDB_FILE_PTR)   (gdb_file_isatty(GDB_FILE_PTR))
-#endif
-
 /* Chain of cleanup actions established with make_cleanup,
    to be executed if an error happens.  */
 
@@ -213,15 +210,15 @@ make_cleanup_freeargv (arg)
 }
 
 static void
-do_gdb_file_delete (void *arg)
+do_ui_file_delete (void *arg)
 {
-  gdb_file_delete (arg);
+  ui_file_delete (arg);
 }
 
 struct cleanup *
-make_cleanup_gdb_file_delete (struct gdb_file *arg)
+make_cleanup_ui_file_delete (struct ui_file *arg)
 {
-  return make_my_cleanup (&cleanup_chain, do_gdb_file_delete, arg);
+  return make_my_cleanup (&cleanup_chain, do_ui_file_delete, arg);
 }
 
 struct cleanup *
@@ -617,7 +614,7 @@ verror (const char *string, va_list args)
      va_list twice which works on some platforms and fails miserably on
      others. */
   /* Save it as the last error */
-  gdb_file_rewind (gdb_lasterr);
+  ui_file_rewind (gdb_lasterr);
   vfprintf_filtered (gdb_lasterr, string, args);
   /* Retrieve the last error and print it to gdb_stderr */
   err_string = error_last_message ();
@@ -638,10 +635,10 @@ error (const char *string,...)
 }
 
 NORETURN void
-error_stream (GDB_FILE *stream)
+error_stream (struct ui_file *stream)
 {
   long size;
-  char *msg = gdb_file_xstrdup (stream, &size);
+  char *msg = ui_file_xstrdup (stream, &size);
   make_cleanup (free, msg);
   error ("%s", msg);
 }
@@ -652,7 +649,7 @@ char *
 error_last_message (void)
 {
   long len;
-  return gdb_file_xstrdup (gdb_lasterr, &len);
+  return ui_file_xstrdup (gdb_lasterr, &len);
 }
   
 /* This is to be called by main() at the very beginning */
@@ -1193,7 +1190,7 @@ mstrsave (md, ptr)
 void
 print_spaces (n, file)
      register int n;
-     register GDB_FILE *file;
+     register struct ui_file *file;
 {
   fputs_unfiltered (n_spaces (n), file);
 }
@@ -1201,7 +1198,7 @@ print_spaces (n, file)
 /* Print a host address.  */
 
 void
-gdb_print_host_address (void *addr, struct gdb_file *stream)
+gdb_print_host_address (void *addr, struct ui_file *stream)
 {
 
   /* We could use the %p conversion specifier to fprintf if we had any
@@ -1405,14 +1402,14 @@ parse_escape (string_ptr)
    be call for printing things which are independent of the language
    of the program being debugged. */
 
-static void printchar PARAMS ((int c, void (*do_fputs) (const char *, GDB_FILE*), void (*do_fprintf) (GDB_FILE*, const char *, ...), GDB_FILE *stream, int quoter));
+static void printchar (int c, void (*do_fputs) (const char *, struct ui_file*), void (*do_fprintf) (struct ui_file*, const char *, ...), struct ui_file *stream, int quoter);
 
 static void
 printchar (c, do_fputs, do_fprintf, stream, quoter)
      int c;
-     void (*do_fputs) PARAMS ((const char *, GDB_FILE*));
-     void (*do_fprintf) PARAMS ((GDB_FILE*, const char *, ...));
-     GDB_FILE *stream;
+     void (*do_fputs) PARAMS ((const char *, struct ui_file*));
+     void (*do_fprintf) PARAMS ((struct ui_file*, const char *, ...));
+     struct ui_file *stream;
      int quoter;
 {
 
@@ -1467,7 +1464,7 @@ void
 fputstr_filtered (str, quoter, stream)
      const char *str;
      int quoter;
-     GDB_FILE *stream;
+     struct ui_file *stream;
 {
   while (*str)
     printchar (*str++, fputs_filtered, fprintf_filtered, stream, quoter);
@@ -1477,7 +1474,7 @@ void
 fputstr_unfiltered (str, quoter, stream)
      const char *str;
      int quoter;
-     GDB_FILE *stream;
+     struct ui_file *stream;
 {
   while (*str)
     printchar (*str++, fputs_unfiltered, fprintf_unfiltered, stream, quoter);
@@ -1488,7 +1485,7 @@ fputstrn_unfiltered (str, n, quoter, stream)
      const char *str;
      int n;
      int quoter;
-     GDB_FILE *stream;
+     struct ui_file *stream;
 {
   int i;
   for (i = 0; i < n; i++)
@@ -1598,7 +1595,7 @@ init_page_info ()
 #endif
 #endif
       /* If the output is not a terminal, don't paginate it.  */
-      if (!GDB_FILE_ISATTY (gdb_stdout))
+      if (!ui_file_isatty (gdb_stdout))
        lines_per_page = UINT_MAX;
     }                          /* the command_line_version */
   set_width ();
@@ -1788,7 +1785,7 @@ begin_line ()
 static void
 fputs_maybe_filtered (linebuffer, stream, filter)
      const char *linebuffer;
-     GDB_FILE *stream;
+     struct ui_file *stream;
      int filter;
 {
   const char *lineptr;
@@ -1892,7 +1889,7 @@ fputs_maybe_filtered (linebuffer, stream, filter)
 void
 fputs_filtered (linebuffer, stream)
      const char *linebuffer;
-     GDB_FILE *stream;
+     struct ui_file *stream;
 {
   fputs_maybe_filtered (linebuffer, stream, 1);
 }
@@ -1902,24 +1899,24 @@ putchar_unfiltered (c)
      int c;
 {
   char buf = c;
-  gdb_file_write (gdb_stdout, &buf, 1);
+  ui_file_write (gdb_stdout, &buf, 1);
   return c;
 }
 
 int
 fputc_unfiltered (c, stream)
      int c;
-     GDB_FILE *stream;
+     struct ui_file *stream;
 {
   char buf = c;
-  gdb_file_write (stream, &buf, 1);
+  ui_file_write (stream, &buf, 1);
   return c;
 }
 
 int
 fputc_filtered (c, stream)
      int c;
-     GDB_FILE *stream;
+     struct ui_file *stream;
 {
   char buf[2];
 
@@ -2033,7 +2030,7 @@ puts_debug (prefix, string, suffix)
 
 static void
 vfprintf_maybe_filtered (stream, format, args, filter)
-     GDB_FILE *stream;
+     struct ui_file *stream;
      const char *format;
      va_list args;
      int filter;
@@ -2055,7 +2052,7 @@ vfprintf_maybe_filtered (stream, format, args, filter)
 
 void
 vfprintf_filtered (stream, format, args)
-     GDB_FILE *stream;
+     struct ui_file *stream;
      const char *format;
      va_list args;
 {
@@ -2064,7 +2061,7 @@ vfprintf_filtered (stream, format, args)
 
 void
 vfprintf_unfiltered (stream, format, args)
-     GDB_FILE *stream;
+     struct ui_file *stream;
      const char *format;
      va_list args;
 {
@@ -2099,7 +2096,7 @@ vprintf_unfiltered (format, args)
 }
 
 void
-fprintf_filtered (GDB_FILE * stream, const char *format,...)
+fprintf_filtered (struct ui_file * stream, const char *format,...)
 {
   va_list args;
   va_start (args, format);
@@ -2108,7 +2105,7 @@ fprintf_filtered (GDB_FILE * stream, const char *format,...)
 }
 
 void
-fprintf_unfiltered (GDB_FILE * stream, const char *format,...)
+fprintf_unfiltered (struct ui_file * stream, const char *format,...)
 {
   va_list args;
   va_start (args, format);
@@ -2120,7 +2117,7 @@ fprintf_unfiltered (GDB_FILE * stream, const char *format,...)
    Called as fprintfi_filtered (spaces, stream, format, ...);  */
 
 void
-fprintfi_filtered (int spaces, GDB_FILE * stream, const char *format,...)
+fprintfi_filtered (int spaces, struct ui_file * stream, const char *format,...)
 {
   va_list args;
   va_start (args, format);
@@ -2210,7 +2207,7 @@ n_spaces (n)
 void
 print_spaces_filtered (n, stream)
      int n;
-     GDB_FILE *stream;
+     struct ui_file *stream;
 {
   fputs_filtered (n_spaces (n), stream);
 }
@@ -2224,7 +2221,7 @@ print_spaces_filtered (n, stream)
 
 void
 fprintf_symbol_filtered (stream, name, lang, arg_mode)
-     GDB_FILE *stream;
+     struct ui_file *stream;
      char *name;
      enum language lang;
      int arg_mode;
@@ -2365,7 +2362,7 @@ initialize_utils ()
   init_page_info ();
 
   /* If the output is not a terminal, don't paginate it.  */
-  if (!GDB_FILE_ISATTY (gdb_stdout))
+  if (!ui_file_isatty (gdb_stdout))
     lines_per_page = UINT_MAX;
 
   set_width_command ((char *) NULL, 0, c);
index fc04e28fea7c1c7e4bc49feac1457f4e741b5000..4e187c0bea225f88eae188043396038b961ecbf5 100644 (file)
@@ -1,5 +1,5 @@
 /* ICE interface for the NEC V850 for GDB, the GNU debugger.
-   Copyright 1996, Free Software Foundation, Inc.
+   Copyright 1996, 2000 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -107,7 +107,7 @@ static void ice_SimulateAddrLookup PARAMS ((char *, int));
 
 static void ice_Simulate_SymLookup PARAMS ((char *, int));
 
-static void ice_fputs PARAMS ((const char *, GDB_FILE *));
+static void ice_fputs (const char *, struct ui_file *);
 
 static int ice_file PARAMS ((char *));
 
index 83ce1168f5ff721647a4aacd7f2cb9150ef6cad4..cc1432be972f77c3b7be35c24c3ac2e3eb497a2f 100644 (file)
@@ -1,5 +1,5 @@
 /* Print values for GDB, the GNU debugger.
-   Copyright 1986, 1988, 1989, 1991, 1992, 1993, 1994, 1998
+   Copyright 1986, 1988, 1989, 1991-1994, 1998, 2000
    Free Software Foundation, Inc.
 
    This file is part of GDB.
@@ -40,8 +40,8 @@
 static int partial_memory_read (CORE_ADDR memaddr, char *myaddr,
                                int len, int *errnoptr);
 
-static void print_hex_chars PARAMS ((GDB_FILE *, unsigned char *,
-                                    unsigned int));
+static void print_hex_chars (struct ui_file *, unsigned char *,
+                            unsigned int);
 
 static void show_print PARAMS ((char *, int));
 
@@ -130,7 +130,7 @@ val_print (type, valaddr, embedded_offset, address,
      char *valaddr;
      int embedded_offset;
      CORE_ADDR address;
-     GDB_FILE *stream;
+     struct ui_file *stream;
      int format;
      int deref_ref;
      int recurse;
@@ -167,7 +167,7 @@ val_print (type, valaddr, embedded_offset, address,
 int
 value_print (val, stream, format, pretty)
      value_ptr val;
-     GDB_FILE *stream;
+     struct ui_file *stream;
      int format;
      enum val_prettyprint pretty;
 {
@@ -192,7 +192,7 @@ void
 val_print_type_code_int (type, valaddr, stream)
      struct type *type;
      char *valaddr;
-     GDB_FILE *stream;
+     struct ui_file *stream;
 {
   if (TYPE_LENGTH (type) > sizeof (LONGEST))
     {
@@ -240,10 +240,11 @@ val_print_type_code_int (type, valaddr, stream)
  */
 
 #if defined (CC_HAS_LONG_LONG) && !defined (PRINTF_HAS_LONG_LONG)
-static void print_decimal PARAMS ((GDB_FILE * stream, char *sign, int use_local, ULONGEST val_ulong));
+static void print_decimal (struct ui_file * stream, char *sign,
+                          int use_local, ULONGEST val_ulong);
 static void
 print_decimal (stream, sign, use_local, val_ulong)
-     GDB_FILE *stream;
+     struct ui_file *stream;
      char *sign;
      int use_local;
      ULONGEST val_ulong;
@@ -280,7 +281,7 @@ print_decimal (stream, sign, use_local, val_ulong)
 
 void
 print_longest (stream, format, use_local, val_long)
-     GDB_FILE *stream;
+     struct ui_file *stream;
      int format;
      int use_local;
      LONGEST val_long;
@@ -567,7 +568,7 @@ void
 print_floating (valaddr, type, stream)
      char *valaddr;
      struct type *type;
-     GDB_FILE *stream;
+     struct ui_file *stream;
 {
   DOUBLEST doub;
   int inv;
@@ -675,7 +676,7 @@ print_floating (valaddr, type, stream)
 
 void
 print_binary_chars (stream, valaddr, len)
-     GDB_FILE *stream;
+     struct ui_file *stream;
      unsigned char *valaddr;
      unsigned len;
 {
@@ -739,7 +740,7 @@ print_binary_chars (stream, valaddr, len)
  */
 void
 print_octal_chars (stream, valaddr, len)
-     GDB_FILE *stream;
+     struct ui_file *stream;
      unsigned char *valaddr;
      unsigned len;
 {
@@ -890,7 +891,7 @@ print_octal_chars (stream, valaddr, len)
  */
 void
 print_decimal_chars (stream, valaddr, len)
-     GDB_FILE *stream;
+     struct ui_file *stream;
      unsigned char *valaddr;
      unsigned len;
 {
@@ -1033,7 +1034,7 @@ print_decimal_chars (stream, valaddr, len)
 
 static void
 print_hex_chars (stream, valaddr, len)
-     GDB_FILE *stream;
+     struct ui_file *stream;
      unsigned char *valaddr;
      unsigned len;
 {
@@ -1078,7 +1079,7 @@ val_print_array_elements (type, valaddr, address, stream, format, deref_ref,
      struct type *type;
      char *valaddr;
      CORE_ADDR address;
-     GDB_FILE *stream;
+     struct ui_file *stream;
      int format;
      int deref_ref;
      int recurse;
@@ -1206,7 +1207,7 @@ val_print_string (addr, len, width, stream)
      CORE_ADDR addr;
      int len;
      int width;
-     GDB_FILE *stream;
+     struct ui_file *stream;
 {
   int force_ellipsis = 0;      /* Force ellipsis to be printed if nonzero. */
   int errcode;                 /* Errno returned from bad reads. */
index fa4860ad53cf8bc8e4b4e5c5c19cc173c0686c4a..a6a3cfa7dc7f9dcea49d533c5eeec4449a7d0937 100644 (file)
@@ -1,6 +1,5 @@
 /* Declarations for value printing routines for GDB, the GNU debugger.
-   Copyright 1986, 1988, 1989, 1991, 1992, 1993, 1994
-   Free Software Foundation, Inc.
+   Copyright 1986, 1988, 1989, 1991-1994, 2000 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -36,19 +35,18 @@ extern int output_format;
 
 extern int stop_print_at_null; /* Stop printing at null char? */
 
-extern void
-val_print_array_elements PARAMS ((struct type *, char *, CORE_ADDR, GDB_FILE *,
-                                 int, int, int, enum val_prettyprint,
-                                 unsigned int));
+extern void val_print_array_elements (struct type *, char *, CORE_ADDR,
+                                     struct ui_file *, int, int, int,
+                                     enum val_prettyprint, unsigned int);
 
-extern void
-val_print_type_code_int PARAMS ((struct type *, char *, GDB_FILE *));
+extern void val_print_type_code_int (struct type *, char *,
+                                    struct ui_file *);
 
-extern void
-print_binary_chars PARAMS ((GDB_FILE *, unsigned char *, unsigned int));
+extern void print_binary_chars (struct ui_file *, unsigned char *,
+                               unsigned int);
 
-extern void
-print_octal_chars PARAMS ((GDB_FILE *, unsigned char *, unsigned int));
+extern void print_octal_chars (struct ui_file *, unsigned char *,
+                              unsigned int);
 
-extern void
-print_decimal_chars PARAMS ((GDB_FILE *, unsigned char *, unsigned int));
+extern void print_decimal_chars (struct ui_file *, unsigned char *,
+                                unsigned int);
index d1b68911379ce37202fe3149906ea18a2ba23d84..ab22573a4806c064970530aa1721242c1d011e75 100644 (file)
@@ -1,6 +1,5 @@
 /* Definitions for values of C expressions, for GDB.
-   Copyright 1986, 1987, 1989, 1992, 1993, 1994, 1995, 1996
-   Free Software Foundation, Inc.
+   Copyright 1986, 1987, 1989, 1992-1996, 2000 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -245,8 +244,7 @@ struct internalvar
 struct frame_info;
 struct fn_field;
 
-extern void
-print_address_demangle PARAMS ((CORE_ADDR, GDB_FILE *, int));
+extern void print_address_demangle (CORE_ADDR, struct ui_file *, int);
 
 extern LONGEST value_as_long PARAMS ((value_ptr val));
 
@@ -487,47 +485,46 @@ extern void get_saved_register PARAMS ((char *raw_buffer, int *optimized,
 extern void
 modify_field PARAMS ((char *addr, LONGEST fieldval, int bitpos, int bitsize));
 
-extern void
-type_print PARAMS ((struct type * type, char *varstring, GDB_FILE * stream,
-                   int show));
+extern void type_print (struct type * type, char *varstring,
+                       struct ui_file * stream, int show);
 
 extern char *baseclass_addr PARAMS ((struct type * type, int index,
                                     char *valaddr,
                                     value_ptr * valuep, int *errp));
 
-extern void
-print_longest PARAMS ((GDB_FILE * stream, int format, int use_local,
-                      LONGEST val));
+extern void print_longest (struct ui_file * stream, int format,
+                          int use_local, LONGEST val);
 
-extern void
-print_floating PARAMS ((char *valaddr, struct type * type, GDB_FILE * stream));
+extern void print_floating (char *valaddr, struct type * type,
+                           struct ui_file * stream);
 
-extern int value_print PARAMS ((value_ptr val, GDB_FILE * stream, int format,
-                               enum val_prettyprint pretty));
+extern int value_print (value_ptr val, struct ui_file *stream, int format,
+                       enum val_prettyprint pretty);
 
-extern void
-value_print_array_elements PARAMS ((value_ptr val, GDB_FILE * stream,
-                                 int format, enum val_prettyprint pretty));
+extern void value_print_array_elements (value_ptr val,
+                                       struct ui_file *stream,
+                                       int format,
+                                       enum val_prettyprint pretty);
 
 extern value_ptr
   value_release_to_mark PARAMS ((value_ptr mark));
 
-extern int
-val_print PARAMS ((struct type * type, char *valaddr, int embedded_offset, CORE_ADDR address,
-                  GDB_FILE * stream, int format, int deref_ref,
-                  int recurse, enum val_prettyprint pretty));
+extern int val_print (struct type * type, char *valaddr,
+                     int embedded_offset, CORE_ADDR address,
+                     struct ui_file * stream, int format,
+                     int deref_ref, int recurse,
+                     enum val_prettyprint pretty);
 
-extern int
-val_print_string PARAMS ((CORE_ADDR addr, int len, int width, GDB_FILE * stream));
+extern int val_print_string (CORE_ADDR addr, int len, int width, struct ui_file *stream);
 
-extern void
-print_variable_value PARAMS ((struct symbol * var, struct frame_info * frame,
-                             GDB_FILE * stream));
+extern void print_variable_value (struct symbol * var,
+                                 struct frame_info * frame,
+                                 struct ui_file *stream);
 
 extern int check_field PARAMS ((value_ptr, const char *));
 
-extern void
-c_typedef_print PARAMS ((struct type * type, struct symbol * news, GDB_FILE * stream));
+extern void c_typedef_print (struct type * type, struct symbol * news,
+                            struct ui_file * stream);
 
 extern char *
   internalvar_name PARAMS ((struct internalvar * var));
This page took 0.131673 seconds and 4 git commands to generate.