import gdb-2000-02-01 snapshot
This commit is contained in:
parent
da59e08184
commit
d9fcf2fb1c
89 changed files with 1329 additions and 656 deletions
|
@ -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)
|
2000-01-31 Jason Molenda (jsm@bugshack.cygnus.com)
|
||||||
|
|
||||||
* config/alpha/alpha-osf2.mh, config/alpha/alpha-osf3.mh,
|
* config/alpha/alpha-osf2.mh, config/alpha/alpha-osf3.mh,
|
||||||
|
|
|
@ -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.
|
# Free Software Foundation, Inc.
|
||||||
|
|
||||||
# This file is part of GDB.
|
# 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_FILES = $(REGEX) $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES)
|
||||||
ADD_DEPS = $(REGEX1) $(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
|
DIST=gdb
|
||||||
|
|
||||||
LINT=/usr/5bin/lint
|
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/tuiSource.h tui/tuiSourceWin.c tui/tuiSourceWin.h \
|
||||||
tui/tuiStack.c tui/tuiStack.h tui/tuiWin.c tui/tuiWin.h \
|
tui/tuiStack.c tui/tuiStack.h tui/tuiWin.c tui/tuiWin.h \
|
||||||
tui/tui-file.h tui/tui-file.c \
|
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
|
LINTFILES = $(SFILES) $(YYFILES) @CONFIG_SRCS@ init.c
|
||||||
|
|
||||||
|
@ -453,7 +453,7 @@ command_h = command.h
|
||||||
gdbcmd_h = gdbcmd.h $(command_h)
|
gdbcmd_h = gdbcmd.h $(command_h)
|
||||||
|
|
||||||
call_cmds_h = call-cmds.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
|
top_h = top.h
|
||||||
inferior_h = inferior.h $(breakpoint_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-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 \
|
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 \
|
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)
|
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) \
|
stack.o: stack.c $(defs_h) $(gdbcmd_h) $(gdbcore_h) $(inferior_h) \
|
||||||
language.h target.h gdb_string.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
|
tui-file.o: $(srcdir)/tui/tui-file.c $(defs_h) $(srcdir)/tui/tui-file.h
|
||||||
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-file.c
|
$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-file.c
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* GDB-specific functions for operating on agent expressions
|
/* 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.
|
This file is part of GDB.
|
||||||
|
|
||||||
|
@ -149,7 +149,7 @@ static void gen_expr PARAMS ((union exp_element ** pc,
|
||||||
struct agent_expr * ax,
|
struct agent_expr * ax,
|
||||||
struct axs_value * value));
|
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));
|
static void agent_command PARAMS ((char *exp, int from_tty));
|
||||||
|
|
||||||
|
|
||||||
|
@ -1879,7 +1879,7 @@ gen_trace_for_expr (scope, expr)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
print_axs_value (f, value)
|
print_axs_value (f, value)
|
||||||
GDB_FILE *f;
|
struct ui_file *f;
|
||||||
struct axs_value *value;
|
struct axs_value *value;
|
||||||
{
|
{
|
||||||
switch (value->kind)
|
switch (value->kind)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Functions for manipulating expressions designed to be executed on the agent
|
/* 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.
|
This file is part of GDB.
|
||||||
|
|
||||||
|
@ -350,7 +350,7 @@ struct aop_map aop_map[] =
|
||||||
/* Disassemble the expression EXPR, writing to F. */
|
/* Disassemble the expression EXPR, writing to F. */
|
||||||
void
|
void
|
||||||
ax_print (f, x)
|
ax_print (f, x)
|
||||||
GDB_FILE *f;
|
struct ui_file *f;
|
||||||
struct agent_expr *x;
|
struct agent_expr *x;
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
4
gdb/ax.h
4
gdb/ax.h
|
@ -1,5 +1,5 @@
|
||||||
/* Definitions for expressions designed to be executed on the agent
|
/* 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.
|
This file is part of GDB.
|
||||||
|
|
||||||
|
@ -186,7 +186,7 @@ extern void ax_reg PARAMS ((struct agent_expr * EXPR, int REG));
|
||||||
things. */
|
things. */
|
||||||
|
|
||||||
/* Disassemble the expression EXPR, writing to F. */
|
/* 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. */
|
/* An entry in the opcode map. */
|
||||||
struct aop_map
|
struct aop_map
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Support routines for building symbol tables in GDB's internal format.
|
/* 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.
|
This file is part of GDB.
|
||||||
|
|
||||||
|
@ -492,7 +492,7 @@ make_blockvector (struct objfile *objfile)
|
||||||
long. Possible solutions include a version of
|
long. Possible solutions include a version of
|
||||||
complain which takes a callback, a
|
complain which takes a callback, a
|
||||||
sprintf_address_numeric to match
|
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
|
which causes sprintf rather than fprintf to be
|
||||||
called. */
|
called. */
|
||||||
|
|
||||||
|
|
10
gdb/c-lang.c
10
gdb/c-lang.c
|
@ -1,5 +1,5 @@
|
||||||
/* C language support routines for GDB, the GNU debugger.
|
/* 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.
|
This file is part of GDB.
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
#include "c-lang.h"
|
#include "c-lang.h"
|
||||||
|
|
||||||
extern void _initialize_c_language PARAMS ((void));
|
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
|
/* 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
|
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
|
static void
|
||||||
c_emit_char (c, stream, quoter)
|
c_emit_char (c, stream, quoter)
|
||||||
register int c;
|
register int c;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
int quoter;
|
int quoter;
|
||||||
{
|
{
|
||||||
c &= 0xFF; /* Avoid sign bit follies */
|
c &= 0xFF; /* Avoid sign bit follies */
|
||||||
|
@ -84,7 +84,7 @@ c_emit_char (c, stream, quoter)
|
||||||
void
|
void
|
||||||
c_printchar (c, stream)
|
c_printchar (c, stream)
|
||||||
int c;
|
int c;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
{
|
{
|
||||||
fputc_filtered ('\'', stream);
|
fputc_filtered ('\'', stream);
|
||||||
LA_EMIT_CHAR (c, stream, '\'');
|
LA_EMIT_CHAR (c, stream, '\'');
|
||||||
|
@ -99,7 +99,7 @@ c_printchar (c, stream)
|
||||||
|
|
||||||
void
|
void
|
||||||
c_printstr (stream, string, length, width, force_ellipses)
|
c_printstr (stream, string, length, width, force_ellipses)
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
char *string;
|
char *string;
|
||||||
unsigned int length;
|
unsigned int length;
|
||||||
int width;
|
int width;
|
||||||
|
|
47
gdb/c-lang.h
47
gdb/c-lang.h
|
@ -1,5 +1,5 @@
|
||||||
/* C language support definitions for GDB, the GNU debugger.
|
/* 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.
|
This file is part of GDB.
|
||||||
|
|
||||||
|
@ -31,23 +31,24 @@ c_parse PARAMS ((void)); /* Defined in c-exp.y */
|
||||||
extern void
|
extern void
|
||||||
c_error PARAMS ((char *)); /* Defined in c-exp.y */
|
c_error PARAMS ((char *)); /* Defined in c-exp.y */
|
||||||
|
|
||||||
extern void /* Defined in c-typeprint.c */
|
/* Defined in c-typeprint.c */
|
||||||
c_print_type PARAMS ((struct type *, char *, GDB_FILE *, int, int));
|
extern void c_print_type (struct type *, char *, struct ui_file *, int,
|
||||||
|
int);
|
||||||
|
|
||||||
extern int
|
extern int c_val_print (struct type *, char *, int, CORE_ADDR,
|
||||||
c_val_print PARAMS ((struct type *, char *, int, CORE_ADDR, GDB_FILE *, int, int,
|
struct ui_file *, int, int, int,
|
||||||
int, enum val_prettyprint));
|
enum val_prettyprint);
|
||||||
|
|
||||||
extern int
|
extern int c_value_print (struct value *, struct ui_file *, int,
|
||||||
c_value_print PARAMS ((struct value *, GDB_FILE *, int, enum val_prettyprint));
|
enum val_prettyprint);
|
||||||
|
|
||||||
/* These are in c-lang.c: */
|
/* 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,
|
extern void c_printstr (struct ui_file * stream, char *string,
|
||||||
unsigned int length, int width,
|
unsigned int length, int width,
|
||||||
int force_ellipses));
|
int force_ellipses);
|
||||||
|
|
||||||
extern struct type *c_create_fundamental_type PARAMS ((struct objfile *, int));
|
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: */
|
/* These are in c-typeprint.c: */
|
||||||
|
|
||||||
extern void
|
extern void c_type_print_base (struct type *, struct ui_file *, int, int);
|
||||||
c_type_print_base PARAMS ((struct type *, GDB_FILE *, int, int));
|
|
||||||
|
|
||||||
extern void
|
extern void c_type_print_varspec_prefix (struct type *, struct ui_file *,
|
||||||
c_type_print_varspec_prefix PARAMS ((struct type *, GDB_FILE *, int, int));
|
int, int);
|
||||||
|
|
||||||
/* These are in cp-valprint.c */
|
/* These are in cp-valprint.c */
|
||||||
|
|
||||||
|
@ -67,16 +67,15 @@ extern int vtblprint; /* Controls printing of vtbl's */
|
||||||
|
|
||||||
extern int static_field_print;
|
extern int static_field_print;
|
||||||
|
|
||||||
extern void
|
extern void cp_print_class_member (char *, struct type *, struct ui_file *,
|
||||||
cp_print_class_member PARAMS ((char *, struct type *, GDB_FILE *, char *));
|
char *);
|
||||||
|
|
||||||
extern void
|
extern void cp_print_class_method (char *, struct type *, struct ui_file *);
|
||||||
cp_print_class_method PARAMS ((char *, struct type *, GDB_FILE *));
|
|
||||||
|
|
||||||
extern void
|
extern void cp_print_value_fields (struct type *, struct type *, char *,
|
||||||
cp_print_value_fields PARAMS ((struct type *, struct type *, char *, int, CORE_ADDR,
|
int, CORE_ADDR, struct ui_file *, int,
|
||||||
GDB_FILE *, int, int, enum val_prettyprint,
|
int, enum val_prettyprint,
|
||||||
struct type **, int));
|
struct type **, int);
|
||||||
|
|
||||||
extern int
|
extern int
|
||||||
cp_is_vtbl_ptr_type PARAMS ((struct type *));
|
cp_is_vtbl_ptr_type PARAMS ((struct type *));
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Support for printing C and C++ types for GDB, the GNU debugger.
|
/* 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.
|
Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GDB.
|
This file is part of GDB.
|
||||||
|
@ -42,19 +42,19 @@
|
||||||
/* Flag indicating target was compiled by HP compiler */
|
/* Flag indicating target was compiled by HP compiler */
|
||||||
extern int hp_som_som_object_present;
|
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
|
static void c_type_print_args (struct type *, struct ui_file *);
|
||||||
c_type_print_args PARAMS ((struct type *, GDB_FILE *));
|
|
||||||
|
|
||||||
static void
|
static void cp_type_print_derivation_info (struct ui_file *, struct type *);
|
||||||
cp_type_print_derivation_info PARAMS ((GDB_FILE *, struct type *));
|
|
||||||
|
|
||||||
void
|
void c_type_print_varspec_prefix (struct type *, struct ui_file *, int,
|
||||||
c_type_print_varspec_prefix PARAMS ((struct type *, GDB_FILE *, int, int));
|
int);
|
||||||
|
|
||||||
static void
|
static void c_type_print_cv_qualifier (struct type *, struct ui_file *,
|
||||||
c_type_print_cv_qualifier PARAMS ((struct type *, GDB_FILE *, int, int));
|
int, int);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ void
|
||||||
c_typedef_print (type, new, stream)
|
c_typedef_print (type, new, stream)
|
||||||
struct type *type;
|
struct type *type;
|
||||||
struct symbol *new;
|
struct symbol *new;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
{
|
{
|
||||||
CHECK_TYPEDEF (type);
|
CHECK_TYPEDEF (type);
|
||||||
switch (current_language->la_language)
|
switch (current_language->la_language)
|
||||||
|
@ -116,7 +116,7 @@ void
|
||||||
c_print_type (type, varstring, stream, show, level)
|
c_print_type (type, varstring, stream, show, level)
|
||||||
struct type *type;
|
struct type *type;
|
||||||
char *varstring;
|
char *varstring;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
int show;
|
int show;
|
||||||
int level;
|
int level;
|
||||||
{
|
{
|
||||||
|
@ -183,7 +183,7 @@ c_print_type (type, varstring, stream, show, level)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
cp_type_print_derivation_info (stream, type)
|
cp_type_print_derivation_info (stream, type)
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
struct type *type;
|
struct type *type;
|
||||||
{
|
{
|
||||||
char *name;
|
char *name;
|
||||||
|
@ -212,7 +212,7 @@ cp_type_print_method_args (args, prefix, varstring, staticp, stream)
|
||||||
char *prefix;
|
char *prefix;
|
||||||
char *varstring;
|
char *varstring;
|
||||||
int staticp;
|
int staticp;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -258,7 +258,7 @@ cp_type_print_method_args (args, prefix, varstring, staticp, stream)
|
||||||
void
|
void
|
||||||
c_type_print_varspec_prefix (type, stream, show, passed_a_ptr)
|
c_type_print_varspec_prefix (type, stream, show, passed_a_ptr)
|
||||||
struct type *type;
|
struct type *type;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
int show;
|
int show;
|
||||||
int passed_a_ptr;
|
int passed_a_ptr;
|
||||||
{
|
{
|
||||||
|
@ -356,7 +356,7 @@ c_type_print_varspec_prefix (type, stream, show, passed_a_ptr)
|
||||||
static void
|
static void
|
||||||
c_type_print_cv_qualifier (type, stream, need_pre_space, need_post_space)
|
c_type_print_cv_qualifier (type, stream, need_pre_space, need_post_space)
|
||||||
struct type *type;
|
struct type *type;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
int need_pre_space;
|
int need_pre_space;
|
||||||
int need_post_space;
|
int need_post_space;
|
||||||
{
|
{
|
||||||
|
@ -388,7 +388,7 @@ c_type_print_cv_qualifier (type, stream, need_pre_space, need_post_space)
|
||||||
static void
|
static void
|
||||||
c_type_print_args (type, stream)
|
c_type_print_args (type, stream)
|
||||||
struct type *type;
|
struct type *type;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
struct type **args;
|
struct type **args;
|
||||||
|
@ -440,7 +440,7 @@ c_type_print_args (type, stream)
|
||||||
void
|
void
|
||||||
c_type_print_varspec_suffix (type, stream, show, passed_a_ptr, demangled_args)
|
c_type_print_varspec_suffix (type, stream, show, passed_a_ptr, demangled_args)
|
||||||
struct type *type;
|
struct type *type;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
int show;
|
int show;
|
||||||
int passed_a_ptr;
|
int passed_a_ptr;
|
||||||
int demangled_args;
|
int demangled_args;
|
||||||
|
@ -563,7 +563,7 @@ c_type_print_varspec_suffix (type, stream, show, passed_a_ptr, demangled_args)
|
||||||
void
|
void
|
||||||
c_type_print_base (type, stream, show, level)
|
c_type_print_base (type, stream, show, level)
|
||||||
struct type *type;
|
struct type *type;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
int show;
|
int show;
|
||||||
int level;
|
int level;
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Support for printing C values for GDB, the GNU debugger.
|
/* 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.
|
Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GDB.
|
This file is part of GDB.
|
||||||
|
@ -50,7 +50,7 @@ c_val_print (type, valaddr, embedded_offset, address, stream, format, deref_ref,
|
||||||
char *valaddr;
|
char *valaddr;
|
||||||
int embedded_offset;
|
int embedded_offset;
|
||||||
CORE_ADDR address;
|
CORE_ADDR address;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
int format;
|
int format;
|
||||||
int deref_ref;
|
int deref_ref;
|
||||||
int recurse;
|
int recurse;
|
||||||
|
@ -453,7 +453,7 @@ c_val_print (type, valaddr, embedded_offset, address, stream, format, deref_ref,
|
||||||
int
|
int
|
||||||
c_value_print (val, stream, format, pretty)
|
c_value_print (val, stream, format, pretty)
|
||||||
value_ptr val;
|
value_ptr val;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
int format;
|
int format;
|
||||||
enum val_prettyprint pretty;
|
enum val_prettyprint pretty;
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Chill language support routines for GDB, the GNU debugger.
|
/* 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.
|
This file is part of GDB.
|
||||||
|
|
||||||
|
@ -44,11 +44,11 @@ static value_ptr
|
||||||
static struct type *
|
static struct type *
|
||||||
chill_create_fundamental_type PARAMS ((struct objfile *, int));
|
chill_create_fundamental_type PARAMS ((struct objfile *, int));
|
||||||
|
|
||||||
static void
|
static void chill_printstr (struct ui_file * stream, char *string,
|
||||||
chill_printstr PARAMS ((GDB_FILE * stream, char *string, unsigned int length, int width, int force_ellipses));
|
unsigned int length, int width,
|
||||||
|
int force_ellipses);
|
||||||
|
|
||||||
static void
|
static void chill_printchar (int, struct ui_file *);
|
||||||
chill_printchar PARAMS ((int, GDB_FILE *));
|
|
||||||
|
|
||||||
/* For now, Chill uses a simple mangling algorithm whereby you simply
|
/* For now, Chill uses a simple mangling algorithm whereby you simply
|
||||||
discard everything after the occurance of two successive CPLUS_MARKER
|
discard everything after the occurance of two successive CPLUS_MARKER
|
||||||
|
@ -85,7 +85,7 @@ chill_demangle (mangled)
|
||||||
static void
|
static void
|
||||||
chill_printchar (c, stream)
|
chill_printchar (c, stream)
|
||||||
register int c;
|
register int c;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
{
|
{
|
||||||
c &= 0xFF; /* Avoid sign bit follies */
|
c &= 0xFF; /* Avoid sign bit follies */
|
||||||
|
|
||||||
|
@ -115,7 +115,7 @@ chill_printchar (c, stream)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
chill_printstr (stream, string, length, width, force_ellipses)
|
chill_printstr (stream, string, length, width, force_ellipses)
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
char *string;
|
char *string;
|
||||||
unsigned int length;
|
unsigned int length;
|
||||||
int width;
|
int width;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Chill language support definitions for GDB, the GNU debugger.
|
/* 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.
|
This file is part of GDB.
|
||||||
|
|
||||||
|
@ -27,16 +27,16 @@ chill_parse PARAMS ((void)); /* Defined in ch-exp.y */
|
||||||
extern void
|
extern void
|
||||||
chill_error PARAMS ((char *)); /* Defined in ch-exp.y */
|
chill_error PARAMS ((char *)); /* Defined in ch-exp.y */
|
||||||
|
|
||||||
extern void /* Defined in ch-typeprint.c */
|
/* Defined in ch-typeprint.c */
|
||||||
chill_print_type PARAMS ((struct type *, char *, GDB_FILE *, int, int));
|
extern void chill_print_type (struct type *, char *, struct ui_file *, int,
|
||||||
|
int);
|
||||||
|
|
||||||
extern int
|
extern int chill_val_print (struct type *, char *, int, CORE_ADDR,
|
||||||
chill_val_print PARAMS ((struct type *, char *, int, CORE_ADDR, GDB_FILE *, int, int,
|
struct ui_file *, int, int, int,
|
||||||
int, enum val_prettyprint));
|
enum val_prettyprint);
|
||||||
|
|
||||||
extern int
|
extern int chill_value_print (struct value *, struct ui_file *,
|
||||||
chill_value_print PARAMS ((struct value *, GDB_FILE *,
|
int, enum val_prettyprint);
|
||||||
int, enum val_prettyprint));
|
|
||||||
|
|
||||||
extern LONGEST
|
extern LONGEST
|
||||||
type_lower_upper PARAMS ((enum exp_opcode, struct type *, struct type **));
|
type_lower_upper PARAMS ((enum exp_opcode, struct type *, struct type **));
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Support for printing Chill types for GDB, the GNU debugger.
|
/* 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.
|
This file is part of GDB.
|
||||||
|
|
||||||
|
@ -37,14 +37,13 @@
|
||||||
#include "gdb_string.h"
|
#include "gdb_string.h"
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
static void
|
static void chill_type_print_base (struct type *, struct ui_file *, int, int);
|
||||||
chill_type_print_base PARAMS ((struct type *, GDB_FILE *, int, int));
|
|
||||||
|
|
||||||
void
|
void
|
||||||
chill_print_type (type, varstring, stream, show, level)
|
chill_print_type (type, varstring, stream, show, level)
|
||||||
struct type *type;
|
struct type *type;
|
||||||
char *varstring;
|
char *varstring;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
int show;
|
int show;
|
||||||
int level;
|
int level;
|
||||||
{
|
{
|
||||||
|
@ -71,7 +70,7 @@ chill_print_type (type, varstring, stream, show, level)
|
||||||
static void
|
static void
|
||||||
chill_type_print_base (type, stream, show, level)
|
chill_type_print_base (type, stream, show, level)
|
||||||
struct type *type;
|
struct type *type;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
int show;
|
int show;
|
||||||
int level;
|
int level;
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Support for printing Chill values for GDB, the GNU debugger.
|
/* 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.
|
Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GDB.
|
This file is part of GDB.
|
||||||
|
@ -33,16 +33,17 @@
|
||||||
#include "ch-lang.h"
|
#include "ch-lang.h"
|
||||||
#include "annotate.h"
|
#include "annotate.h"
|
||||||
|
|
||||||
static void
|
static void chill_print_value_fields (struct type *, char *,
|
||||||
chill_print_value_fields PARAMS ((struct type *, char *, GDB_FILE *, int, int,
|
struct ui_file *, int, int,
|
||||||
enum val_prettyprint, struct type **));
|
enum val_prettyprint, struct type **);
|
||||||
|
|
||||||
static void
|
static void chill_print_type_scalar (struct type *, LONGEST,
|
||||||
chill_print_type_scalar PARAMS ((struct type *, LONGEST, GDB_FILE *));
|
struct ui_file *);
|
||||||
|
|
||||||
static void
|
static void chill_val_print_array_elements (struct type *, char *,
|
||||||
chill_val_print_array_elements PARAMS ((struct type *, char *, CORE_ADDR, GDB_FILE *,
|
CORE_ADDR, struct ui_file *,
|
||||||
int, int, int, enum val_prettyprint));
|
int, int, int,
|
||||||
|
enum val_prettyprint);
|
||||||
|
|
||||||
|
|
||||||
/* Print integral scalar data VAL, of type TYPE, onto stdio stream STREAM.
|
/* 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)
|
chill_print_type_scalar (type, val, stream)
|
||||||
struct type *type;
|
struct type *type;
|
||||||
LONGEST val;
|
LONGEST val;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
{
|
{
|
||||||
switch (TYPE_CODE (type))
|
switch (TYPE_CODE (type))
|
||||||
{
|
{
|
||||||
|
@ -103,7 +104,7 @@ chill_val_print_array_elements (type, valaddr, address, stream,
|
||||||
struct type *type;
|
struct type *type;
|
||||||
char *valaddr;
|
char *valaddr;
|
||||||
CORE_ADDR address;
|
CORE_ADDR address;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
int format;
|
int format;
|
||||||
int deref_ref;
|
int deref_ref;
|
||||||
int recurse;
|
int recurse;
|
||||||
|
@ -204,7 +205,7 @@ chill_val_print (type, valaddr, embedded_offset, address,
|
||||||
char *valaddr;
|
char *valaddr;
|
||||||
int embedded_offset;
|
int embedded_offset;
|
||||||
CORE_ADDR address;
|
CORE_ADDR address;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
int format;
|
int format;
|
||||||
int deref_ref;
|
int deref_ref;
|
||||||
int recurse;
|
int recurse;
|
||||||
|
@ -517,7 +518,7 @@ chill_print_value_fields (type, valaddr, stream, format, recurse, pretty,
|
||||||
dont_print)
|
dont_print)
|
||||||
struct type *type;
|
struct type *type;
|
||||||
char *valaddr;
|
char *valaddr;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
int format;
|
int format;
|
||||||
int recurse;
|
int recurse;
|
||||||
enum val_prettyprint pretty;
|
enum val_prettyprint pretty;
|
||||||
|
@ -587,7 +588,7 @@ chill_print_value_fields (type, valaddr, stream, format, recurse, pretty,
|
||||||
int
|
int
|
||||||
chill_value_print (val, stream, format, pretty)
|
chill_value_print (val, stream, format, pretty)
|
||||||
value_ptr val;
|
value_ptr val;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
int format;
|
int format;
|
||||||
enum val_prettyprint pretty;
|
enum val_prettyprint pretty;
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Handle lists of commands, their decoding and documentation, for GDB.
|
/* 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
|
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
|
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 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));
|
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 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,
|
static struct cmd_list_element *find_cmd PARAMS ((char *command,
|
||||||
int len,
|
int len,
|
||||||
|
@ -388,7 +388,7 @@ delete_cmd (name, list)
|
||||||
void
|
void
|
||||||
help_cmd (command, stream)
|
help_cmd (command, stream)
|
||||||
char *command;
|
char *command;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
{
|
{
|
||||||
struct cmd_list_element *c;
|
struct cmd_list_element *c;
|
||||||
extern struct cmd_list_element *cmdlist;
|
extern struct cmd_list_element *cmdlist;
|
||||||
|
@ -453,7 +453,7 @@ help_list (list, cmdtype, class, stream)
|
||||||
struct cmd_list_element *list;
|
struct cmd_list_element *list;
|
||||||
char *cmdtype;
|
char *cmdtype;
|
||||||
enum command_class class;
|
enum command_class class;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
{
|
{
|
||||||
int len;
|
int len;
|
||||||
char *cmdtype1, *cmdtype2;
|
char *cmdtype1, *cmdtype2;
|
||||||
|
@ -494,7 +494,7 @@ Command name abbreviations are allowed if unambiguous.\n",
|
||||||
/* Print only the first line of STR on STREAM. */
|
/* Print only the first line of STR on STREAM. */
|
||||||
static void
|
static void
|
||||||
print_doc_line (stream, str)
|
print_doc_line (stream, str)
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
char *str;
|
char *str;
|
||||||
{
|
{
|
||||||
static char *line_buffer = 0;
|
static char *line_buffer = 0;
|
||||||
|
@ -545,7 +545,7 @@ help_cmd_list (list, class, prefix, recurse, stream)
|
||||||
enum command_class class;
|
enum command_class class;
|
||||||
char *prefix;
|
char *prefix;
|
||||||
int recurse;
|
int recurse;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
{
|
{
|
||||||
register struct cmd_list_element *c;
|
register struct cmd_list_element *c;
|
||||||
|
|
||||||
|
@ -1530,7 +1530,7 @@ make_command (arg, from_tty)
|
||||||
static void
|
static void
|
||||||
show_user_1 (c, stream)
|
show_user_1 (c, stream)
|
||||||
struct cmd_list_element *c;
|
struct cmd_list_element *c;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
{
|
{
|
||||||
register struct command_line *cmdlines;
|
register struct command_line *cmdlines;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Header file for command-reading library command.c.
|
/* 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
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
|
@ -230,16 +230,13 @@ extern char **
|
||||||
extern void
|
extern void
|
||||||
delete_cmd PARAMS ((char *, struct cmd_list_element **));
|
delete_cmd PARAMS ((char *, struct cmd_list_element **));
|
||||||
|
|
||||||
extern void
|
extern void help_cmd (char *, struct ui_file *);
|
||||||
help_cmd PARAMS ((char *, GDB_FILE *));
|
|
||||||
|
|
||||||
extern void
|
extern void help_list (struct cmd_list_element *, char *,
|
||||||
help_list PARAMS ((struct cmd_list_element *, char *, enum command_class,
|
enum command_class, struct ui_file *);
|
||||||
GDB_FILE *));
|
|
||||||
|
|
||||||
extern void
|
extern void help_cmd_list (struct cmd_list_element *, enum command_class,
|
||||||
help_cmd_list PARAMS ((struct cmd_list_element *, enum command_class, char *,
|
char *, int, struct ui_file *);
|
||||||
int, GDB_FILE *));
|
|
||||||
|
|
||||||
extern struct cmd_list_element *
|
extern struct cmd_list_element *
|
||||||
add_set_cmd PARAMS ((char *, enum command_class, var_types, char *, char *,
|
add_set_cmd PARAMS ((char *, enum command_class, var_types, char *, char *,
|
||||||
|
|
|
@ -51,6 +51,7 @@ extern char *mn10300_register_name PARAMS ((int regnr));
|
||||||
#define PSW_REGNUM 11
|
#define PSW_REGNUM 11
|
||||||
#define LIR_REGNUM 12
|
#define LIR_REGNUM 12
|
||||||
#define LAR_REGNUM 13
|
#define LAR_REGNUM 13
|
||||||
|
#define E0_REGNUM 14
|
||||||
|
|
||||||
/* Pseudo register that contains true address of executing stack frame */
|
/* Pseudo register that contains true address of executing stack frame */
|
||||||
#define FP_REGNUM 31
|
#define FP_REGNUM 31
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
/* Parameters for execution on any Hewlett-Packard PA-RISC machine.
|
/* Parameters for execution on any Hewlett-Packard PA-RISC machine.
|
||||||
Copyright 1986, 1987, 1989, 1990, 1991, 1992, 1993, 1995, 1999
|
Copyright 1986, 1987, 1989-1993, 1995, 1999, 2000 Free Software Foundation, Inc.
|
||||||
Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
Contributed by the Center for Software Science at the
|
Contributed by the Center for Software Science at the
|
||||||
University of Utah (pa-gdb-bugs@cs.utah.edu).
|
University of Utah (pa-gdb-bugs@cs.utah.edu).
|
||||||
|
@ -263,7 +262,7 @@ extern void pa_do_registers_info PARAMS ((int, int));
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
#define STRCAT_REGISTER(regnum, fpregs, stream, precision) pa_do_strcat_registers_info (regnum, fpregs, stream, precision)
|
#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
|
#endif
|
||||||
|
|
||||||
/* PA specific macro to see if the current instruction is nullified. */
|
/* PA specific macro to see if the current instruction is nullified. */
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* OBSOLETE /* Convex stuff for GDB. */
|
/* 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 */
|
||||||
/* OBSOLETE This file is part of GDB. */
|
/* OBSOLETE This file is part of GDB. */
|
||||||
/* OBSOLETE */
|
/* OBSOLETE */
|
||||||
|
@ -491,7 +491,7 @@
|
||||||
/* OBSOLETE If it looks like an address, print it in hex instead. *x/ */
|
/* OBSOLETE If it looks like an address, print it in hex instead. *x/ */
|
||||||
/* OBSOLETE */
|
/* OBSOLETE */
|
||||||
/* OBSOLETE decout (stream, type, val) */
|
/* OBSOLETE decout (stream, type, val) */
|
||||||
/* OBSOLETE GDB_FILE *stream; */
|
/* OBSOLETE struct ui_file *stream; */
|
||||||
/* OBSOLETE struct type *type; */
|
/* OBSOLETE struct type *type; */
|
||||||
/* OBSOLETE LONGEST val; */
|
/* OBSOLETE LONGEST val; */
|
||||||
/* OBSOLETE { */
|
/* OBSOLETE { */
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Core dump and executable file functions above target vector, for GDB.
|
/* 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.
|
Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GDB.
|
This file is part of GDB.
|
||||||
|
@ -236,8 +236,8 @@ memory_error (status, memaddr)
|
||||||
int status;
|
int status;
|
||||||
CORE_ADDR memaddr;
|
CORE_ADDR memaddr;
|
||||||
{
|
{
|
||||||
struct gdb_file *tmp_stream = mem_fileopen ();
|
struct ui_file *tmp_stream = mem_fileopen ();
|
||||||
make_cleanup_gdb_file_delete (tmp_stream);
|
make_cleanup_ui_file_delete (tmp_stream);
|
||||||
|
|
||||||
if (status == EIO)
|
if (status == EIO)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Support for printing C++ values for GDB, the GNU debugger.
|
/* 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.
|
Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GDB.
|
This file is part of GDB.
|
||||||
|
@ -47,24 +47,26 @@ static struct obstack dont_print_statmem_obstack;
|
||||||
|
|
||||||
extern void _initialize_cp_valprint PARAMS ((void));
|
extern void _initialize_cp_valprint PARAMS ((void));
|
||||||
|
|
||||||
static void
|
static void cp_print_static_field (struct type *, value_ptr,
|
||||||
cp_print_static_field PARAMS ((struct type *, value_ptr, GDB_FILE *, int, int,
|
struct ui_file *, int, int,
|
||||||
enum val_prettyprint));
|
enum val_prettyprint);
|
||||||
|
|
||||||
static void
|
static void cp_print_value (struct type *, struct type *, char *, int,
|
||||||
cp_print_value PARAMS ((struct type *, struct type *, char *, int, CORE_ADDR, GDB_FILE *,
|
CORE_ADDR, struct ui_file *, int, int,
|
||||||
int, int, enum val_prettyprint, struct type **));
|
enum val_prettyprint, struct type **);
|
||||||
|
|
||||||
static void
|
static void cp_print_hpacc_virtual_table_entries (struct type *, int *,
|
||||||
cp_print_hpacc_virtual_table_entries PARAMS ((struct type *, int *, value_ptr, GDB_FILE *,
|
value_ptr,
|
||||||
int, int, enum val_prettyprint));
|
struct ui_file *, int,
|
||||||
|
int,
|
||||||
|
enum val_prettyprint);
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
cp_print_class_method (valaddr, type, stream)
|
cp_print_class_method (valaddr, type, stream)
|
||||||
char *valaddr;
|
char *valaddr;
|
||||||
struct type *type;
|
struct type *type;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
{
|
{
|
||||||
struct type *domain;
|
struct type *domain;
|
||||||
struct fn_field *f = NULL;
|
struct fn_field *f = NULL;
|
||||||
|
@ -237,7 +239,7 @@ cp_print_value_fields (type, real_type, valaddr, offset, address, stream, format
|
||||||
char *valaddr;
|
char *valaddr;
|
||||||
int offset;
|
int offset;
|
||||||
CORE_ADDR address;
|
CORE_ADDR address;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
int format;
|
int format;
|
||||||
int recurse;
|
int recurse;
|
||||||
enum val_prettyprint pretty;
|
enum val_prettyprint pretty;
|
||||||
|
@ -500,7 +502,7 @@ cp_print_value (type, real_type, valaddr, offset, address, stream, format, recur
|
||||||
char *valaddr;
|
char *valaddr;
|
||||||
int offset;
|
int offset;
|
||||||
CORE_ADDR address;
|
CORE_ADDR address;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
int format;
|
int format;
|
||||||
int recurse;
|
int recurse;
|
||||||
enum val_prettyprint pretty;
|
enum val_prettyprint pretty;
|
||||||
|
@ -628,7 +630,7 @@ static void
|
||||||
cp_print_static_field (type, val, stream, format, recurse, pretty)
|
cp_print_static_field (type, val, stream, format, recurse, pretty)
|
||||||
struct type *type;
|
struct type *type;
|
||||||
value_ptr val;
|
value_ptr val;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
int format;
|
int format;
|
||||||
int recurse;
|
int recurse;
|
||||||
enum val_prettyprint pretty;
|
enum val_prettyprint pretty;
|
||||||
|
@ -669,7 +671,7 @@ void
|
||||||
cp_print_class_member (valaddr, domain, stream, prefix)
|
cp_print_class_member (valaddr, domain, stream, prefix)
|
||||||
char *valaddr;
|
char *valaddr;
|
||||||
struct type *domain;
|
struct type *domain;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
char *prefix;
|
char *prefix;
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -748,7 +750,7 @@ cp_print_hpacc_virtual_table_entries (type, vfuncs, v, stream, format, recurse,
|
||||||
struct type *type;
|
struct type *type;
|
||||||
int *vfuncs;
|
int *vfuncs;
|
||||||
value_ptr v;
|
value_ptr v;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
int format;
|
int format;
|
||||||
int recurse;
|
int recurse;
|
||||||
enum val_prettyprint pretty;
|
enum val_prettyprint pretty;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Target-dependent code for Mitsubishi D10V, for GDB.
|
/* 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.
|
This file is part of GDB.
|
||||||
|
|
||||||
|
@ -1334,7 +1334,7 @@ trace_info (args, from_tty)
|
||||||
static int
|
static int
|
||||||
print_insn (memaddr, stream)
|
print_insn (memaddr, stream)
|
||||||
CORE_ADDR memaddr;
|
CORE_ADDR memaddr;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
{
|
{
|
||||||
/* If there's no disassembler, something is very wrong. */
|
/* If there's no disassembler, something is very wrong. */
|
||||||
if (tm_print_insn == NULL)
|
if (tm_print_insn == NULL)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Target-dependent code for Mitsubishi D30V, for GDB.
|
/* 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.
|
This file is part of GDB.
|
||||||
|
|
||||||
|
@ -1183,7 +1183,7 @@ trace_info (args, from_tty)
|
||||||
static int
|
static int
|
||||||
print_insn (memaddr, stream)
|
print_insn (memaddr, stream)
|
||||||
CORE_ADDR memaddr;
|
CORE_ADDR memaddr;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
{
|
{
|
||||||
/* If there's no disassembler, something is very wrong. */
|
/* If there's no disassembler, something is very wrong. */
|
||||||
if (tm_print_insn == NULL)
|
if (tm_print_insn == NULL)
|
||||||
|
|
63
gdb/defs.h
63
gdb/defs.h
|
@ -1,6 +1,6 @@
|
||||||
/* *INDENT-OFF* */ /* ATTR_FORMAT confuses indent, avoid running it for now */
|
/* *INDENT-OFF* */ /* ATTR_FORMAT confuses indent, avoid running it for now */
|
||||||
/* Basic, host-specific, and target-specific definitions for GDB.
|
/* 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.
|
Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GDB.
|
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 **);
|
extern struct cleanup *make_cleanup_freeargv (char **);
|
||||||
|
|
||||||
struct gdb_file;
|
struct ui_file;
|
||||||
extern struct cleanup *make_cleanup_gdb_file_delete (struct gdb_file *);
|
extern struct cleanup *make_cleanup_ui_file_delete (struct ui_file *);
|
||||||
|
|
||||||
extern struct cleanup *make_final_cleanup (make_cleanup_func, void *);
|
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);
|
extern void reinitialize_more_filter (void);
|
||||||
|
|
||||||
struct gdb_file;
|
|
||||||
typedef struct gdb_file GDB_FILE; /* deprecated */
|
|
||||||
|
|
||||||
/* Normal results */
|
/* Normal results */
|
||||||
extern GDB_FILE *gdb_stdout;
|
extern struct ui_file *gdb_stdout;
|
||||||
/* Serious error notifications */
|
/* Serious error notifications */
|
||||||
extern GDB_FILE *gdb_stderr;
|
extern struct ui_file *gdb_stderr;
|
||||||
/* Log/debug/trace messages that should bypass normal stdout/stderr
|
/* Log/debug/trace messages that should bypass normal stdout/stderr
|
||||||
filtering. For momement, always call this stream using
|
filtering. For momement, always call this stream using
|
||||||
*_unfiltered. In the very near future that restriction shall be
|
*_unfiltered. In the very near future that restriction shall be
|
||||||
removed - either call shall be unfiltered. (cagney 1999-06-13). */
|
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.
|
/* Target output that should bypass normal stdout/stderr filtering.
|
||||||
For momement, always call this stream using *_unfiltered. In the
|
For momement, always call this stream using *_unfiltered. In the
|
||||||
very near future that restriction shall be removed - either call
|
very near future that restriction shall be removed - either call
|
||||||
shall be unfiltered. (cagney 1999-07-02). */
|
shall be unfiltered. (cagney 1999-07-02). */
|
||||||
extern GDB_FILE *gdb_stdtarg;
|
extern struct ui_file *gdb_stdtarg;
|
||||||
|
|
||||||
#if defined(TUI)
|
#if defined(TUI)
|
||||||
#include "tui.h"
|
#include "tui.h"
|
||||||
|
@ -386,17 +383,17 @@ extern GDB_FILE *gdb_stdtarg;
|
||||||
#include "tuiWin.h"
|
#include "tuiWin.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "gdb-file.h"
|
#include "ui-file.h"
|
||||||
|
|
||||||
/* More generic printf like operations */
|
/* 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);
|
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 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);
|
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 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 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 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''. */
|
/* 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.
|
/* 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
|
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 (t_reg reg);
|
||||||
extern char *preg_nz (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);
|
enum language, int);
|
||||||
|
|
||||||
extern NORETURN void perror_with_name (char *) ATTR_NORETURN;
|
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);
|
extern void generic_load (char *name, int from_tty);
|
||||||
|
|
||||||
/* Summarise a download */
|
/* 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 data_count,
|
||||||
unsigned long write_count,
|
unsigned long write_count,
|
||||||
unsigned long time_count);
|
unsigned long time_count);
|
||||||
|
@ -500,12 +497,12 @@ extern int info_verbose;
|
||||||
|
|
||||||
extern void set_next_address (CORE_ADDR);
|
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 *);
|
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 */
|
/* From source.c */
|
||||||
|
|
||||||
|
@ -784,7 +781,7 @@ extern NORETURN void error (const char *fmt, ...) ATTR_NORETURN;
|
||||||
/* DEPRECATED: Use error(), verror() or error_stream(). */
|
/* DEPRECATED: Use error(), verror() or error_stream(). */
|
||||||
extern NORETURN void error_begin (void);
|
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
|
/* Returns a freshly allocate buffer containing the last error
|
||||||
message. */
|
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 struct frame_info *parse_frame_specification (char *frame_exp);
|
||||||
extern int (*query_hook) (const char *, va_list);
|
extern int (*query_hook) (const char *, va_list);
|
||||||
extern void (*warning_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 (*create_breakpoint_hook) (struct breakpoint * b);
|
||||||
extern void (*delete_breakpoint_hook) (struct breakpoint * bpt);
|
extern void (*delete_breakpoint_hook) (struct breakpoint * bpt);
|
||||||
extern void (*modify_breakpoint_hook) (struct breakpoint * bpt);
|
extern void (*modify_breakpoint_hook) (struct breakpoint * bpt);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Print in infix form a struct expression.
|
/* 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.
|
This file is part of GDB.
|
||||||
|
|
||||||
|
@ -32,13 +32,13 @@
|
||||||
|
|
||||||
/* Prototypes for local functions */
|
/* Prototypes for local functions */
|
||||||
|
|
||||||
static void
|
static void print_subexp (struct expression *, int *, struct ui_file *,
|
||||||
print_subexp PARAMS ((struct expression *, int *, GDB_FILE *, enum precedence));
|
enum precedence);
|
||||||
|
|
||||||
void
|
void
|
||||||
print_expression (exp, stream)
|
print_expression (exp, stream)
|
||||||
struct expression *exp;
|
struct expression *exp;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
{
|
{
|
||||||
int pc = 0;
|
int pc = 0;
|
||||||
print_subexp (exp, &pc, stream, PREC_NULL);
|
print_subexp (exp, &pc, stream, PREC_NULL);
|
||||||
|
@ -53,7 +53,7 @@ static void
|
||||||
print_subexp (exp, pos, stream, prec)
|
print_subexp (exp, pos, stream, prec)
|
||||||
register struct expression *exp;
|
register struct expression *exp;
|
||||||
register int *pos;
|
register int *pos;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
enum precedence prec;
|
enum precedence prec;
|
||||||
{
|
{
|
||||||
register unsigned tem;
|
register unsigned tem;
|
||||||
|
@ -695,7 +695,7 @@ op_name (opcode)
|
||||||
void
|
void
|
||||||
dump_prefix_expression (exp, stream, note)
|
dump_prefix_expression (exp, stream, note)
|
||||||
struct expression *exp;
|
struct expression *exp;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
char *note;
|
char *note;
|
||||||
{
|
{
|
||||||
int elt;
|
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
|
static int
|
||||||
dump_subexp (exp, stream, elt)
|
dump_subexp (exp, stream, elt)
|
||||||
struct expression *exp;
|
struct expression *exp;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
int elt;
|
int elt;
|
||||||
{
|
{
|
||||||
static int indent = 0;
|
static int indent = 0;
|
||||||
|
@ -974,7 +974,7 @@ dump_subexp (exp, stream, elt)
|
||||||
void
|
void
|
||||||
dump_postfix_expression (exp, stream, note)
|
dump_postfix_expression (exp, stream, note)
|
||||||
struct expression *exp;
|
struct expression *exp;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
char *note;
|
char *note;
|
||||||
{
|
{
|
||||||
int elt;
|
int elt;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Definitions for expressions stored in reversed prefix form, for GDB.
|
/* 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.
|
This file is part of GDB.
|
||||||
|
|
||||||
|
@ -366,15 +366,15 @@ extern struct value *evaluate_subexp_standard
|
||||||
|
|
||||||
/* From expprint.c */
|
/* 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 char *op_string PARAMS ((enum exp_opcode));
|
||||||
|
|
||||||
extern void dump_prefix_expression PARAMS ((struct expression *,
|
extern void dump_prefix_expression (struct expression *,
|
||||||
GDB_FILE *,
|
struct ui_file *,
|
||||||
char *));
|
char *);
|
||||||
extern void dump_postfix_expression PARAMS ((struct expression *,
|
extern void dump_postfix_expression (struct expression *,
|
||||||
GDB_FILE *,
|
struct ui_file *,
|
||||||
char *));
|
char *);
|
||||||
|
|
||||||
#endif /* !defined (EXPRESSION_H) */
|
#endif /* !defined (EXPRESSION_H) */
|
||||||
|
|
20
gdb/f-lang.c
20
gdb/f-lang.c
|
@ -1,5 +1,5 @@
|
||||||
/* Fortran language support routines for GDB, the GNU debugger.
|
/* 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
|
Contributed by Motorola. Adapted from the C parser by Farooq Butt
|
||||||
(fmbutt@engage.sps.mot.com).
|
(fmbutt@engage.sps.mot.com).
|
||||||
|
|
||||||
|
@ -84,9 +84,11 @@ static void patch_common_entries PARAMS ((SAVED_F77_COMMON_PTR, CORE_ADDR, int))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static struct type *f_create_fundamental_type PARAMS ((struct objfile *, int));
|
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_printstr (struct ui_file * stream, char *string,
|
||||||
static void f_printchar PARAMS ((int c, GDB_FILE * stream));
|
unsigned int length, int width,
|
||||||
static void f_emit_char PARAMS ((int c, GDB_FILE * stream, int quoter));
|
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
|
/* 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
|
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
|
static void
|
||||||
f_emit_char (c, stream, quoter)
|
f_emit_char (c, stream, quoter)
|
||||||
register int c;
|
register int c;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
int quoter;
|
int quoter;
|
||||||
{
|
{
|
||||||
c &= 0xFF; /* Avoid sign bit follies */
|
c &= 0xFF; /* Avoid sign bit follies */
|
||||||
|
@ -146,7 +148,7 @@ f_emit_char (c, stream, quoter)
|
||||||
static void
|
static void
|
||||||
f_printchar (c, stream)
|
f_printchar (c, stream)
|
||||||
int c;
|
int c;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
{
|
{
|
||||||
fputs_filtered ("'", stream);
|
fputs_filtered ("'", stream);
|
||||||
LA_EMIT_CHAR (c, stream, '\'');
|
LA_EMIT_CHAR (c, stream, '\'');
|
||||||
|
@ -162,7 +164,7 @@ f_printchar (c, stream)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
f_printstr (stream, string, length, width, force_ellipses)
|
f_printstr (stream, string, length, width, force_ellipses)
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
char *string;
|
char *string;
|
||||||
unsigned int length;
|
unsigned int length;
|
||||||
int width;
|
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
|
/* This is declared in c-lang.h but it is silly to import that file for what
|
||||||
is already just a hack. */
|
is already just a hack. */
|
||||||
extern int
|
extern int c_value_print (struct value *, struct ui_file *, int,
|
||||||
c_value_print PARAMS ((struct value *, GDB_FILE *, int, enum val_prettyprint));
|
enum val_prettyprint);
|
||||||
|
|
||||||
const struct language_defn f_language_defn =
|
const struct language_defn f_language_defn =
|
||||||
{
|
{
|
||||||
|
|
12
gdb/f-lang.h
12
gdb/f-lang.h
|
@ -1,5 +1,5 @@
|
||||||
/* Fortran language support definitions for GDB, the GNU debugger.
|
/* 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
|
Contributed by Motorola. Adapted from the C definitions by Farooq Butt
|
||||||
(fmbutt@engage.sps.mot.com).
|
(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_error PARAMS ((char *)); /* Defined in f-exp.y */
|
||||||
|
|
||||||
extern void f_print_type PARAMS ((struct type *, char *,
|
extern void f_print_type (struct type *, char *, struct ui_file *, int,
|
||||||
GDB_FILE *, int, int));
|
int);
|
||||||
|
|
||||||
extern int f_val_print PARAMS ((struct type *, char *, int,
|
extern int f_val_print (struct type *, char *, int, CORE_ADDR,
|
||||||
CORE_ADDR, GDB_FILE *,
|
struct ui_file *, int, int, int,
|
||||||
int, int, int, enum val_prettyprint));
|
enum val_prettyprint);
|
||||||
|
|
||||||
/* Language-specific data structures */
|
/* Language-specific data structures */
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Support for printing Fortran types for GDB, the GNU debugger.
|
/* 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
|
Contributed by Motorola. Adapted from the C version by Farooq Butt
|
||||||
(fmbutt@engage.sps.mot.com).
|
(fmbutt@engage.sps.mot.com).
|
||||||
|
|
||||||
|
@ -41,19 +41,19 @@
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#if 0 /* Currently unused */
|
#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
|
#endif
|
||||||
|
|
||||||
static void print_equivalent_f77_float_type PARAMS ((struct type *,
|
static void print_equivalent_f77_float_type (struct type *,
|
||||||
GDB_FILE *));
|
struct ui_file *);
|
||||||
|
|
||||||
static void f_type_print_varspec_suffix PARAMS ((struct type *, GDB_FILE *,
|
static void f_type_print_varspec_suffix (struct type *, struct ui_file *,
|
||||||
int, int, int));
|
int, int, int);
|
||||||
|
|
||||||
void f_type_print_varspec_prefix PARAMS ((struct type *, GDB_FILE *,
|
void f_type_print_varspec_prefix (struct type *, struct ui_file *,
|
||||||
int, int));
|
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);
|
||||||
|
|
||||||
|
|
||||||
/* LEVEL is the depth to indent lines by. */
|
/* LEVEL is the depth to indent lines by. */
|
||||||
|
@ -62,7 +62,7 @@ void
|
||||||
f_print_type (type, varstring, stream, show, level)
|
f_print_type (type, varstring, stream, show, level)
|
||||||
struct type *type;
|
struct type *type;
|
||||||
char *varstring;
|
char *varstring;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
int show;
|
int show;
|
||||||
int level;
|
int level;
|
||||||
{
|
{
|
||||||
|
@ -105,7 +105,7 @@ f_print_type (type, varstring, stream, show, level)
|
||||||
void
|
void
|
||||||
f_type_print_varspec_prefix (type, stream, show, passed_a_ptr)
|
f_type_print_varspec_prefix (type, stream, show, passed_a_ptr)
|
||||||
struct type *type;
|
struct type *type;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
int show;
|
int show;
|
||||||
int passed_a_ptr;
|
int passed_a_ptr;
|
||||||
{
|
{
|
||||||
|
@ -163,7 +163,7 @@ f_type_print_varspec_prefix (type, stream, show, passed_a_ptr)
|
||||||
static void
|
static void
|
||||||
f_type_print_args (type, stream)
|
f_type_print_args (type, stream)
|
||||||
struct type *type;
|
struct type *type;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
struct type **args;
|
struct type **args;
|
||||||
|
@ -203,7 +203,7 @@ f_type_print_args (type, stream)
|
||||||
static void
|
static void
|
||||||
f_type_print_varspec_suffix (type, stream, show, passed_a_ptr, demangled_args)
|
f_type_print_varspec_suffix (type, stream, show, passed_a_ptr, demangled_args)
|
||||||
struct type *type;
|
struct type *type;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
int show;
|
int show;
|
||||||
int passed_a_ptr;
|
int passed_a_ptr;
|
||||||
int demangled_args;
|
int demangled_args;
|
||||||
|
@ -314,7 +314,7 @@ f_type_print_varspec_suffix (type, stream, show, passed_a_ptr, demangled_args)
|
||||||
static void
|
static void
|
||||||
print_equivalent_f77_float_type (type, stream)
|
print_equivalent_f77_float_type (type, stream)
|
||||||
struct type *type;
|
struct type *type;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
{
|
{
|
||||||
/* Override type name "float" and make it the
|
/* Override type name "float" and make it the
|
||||||
appropriate real. XLC stupidly outputs -12 as a type
|
appropriate real. XLC stupidly outputs -12 as a type
|
||||||
|
@ -339,7 +339,7 @@ print_equivalent_f77_float_type (type, stream)
|
||||||
void
|
void
|
||||||
f_type_print_base (type, stream, show, level)
|
f_type_print_base (type, stream, show, level)
|
||||||
struct type *type;
|
struct type *type;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
int show;
|
int show;
|
||||||
int level;
|
int level;
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Support for printing Fortran values for GDB, the GNU debugger.
|
/* 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
|
Contributed by Motorola. Adapted from the C definitions by Farooq Butt
|
||||||
(fmbutt@engage.sps.mot.com), additionally worked over by Stan Shebs.
|
(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));
|
extern void _initialize_f_valprint PARAMS ((void));
|
||||||
static void info_common_command PARAMS ((char *, int));
|
static void info_common_command PARAMS ((char *, int));
|
||||||
static void list_all_visible_commons PARAMS ((char *));
|
static void list_all_visible_commons PARAMS ((char *));
|
||||||
static void f77_print_array PARAMS ((struct type *, char *, CORE_ADDR,
|
static void f77_print_array (struct type *, char *, CORE_ADDR,
|
||||||
GDB_FILE *, int, int, int,
|
struct ui_file *, int, int, int,
|
||||||
enum val_prettyprint));
|
enum val_prettyprint);
|
||||||
static void f77_print_array_1 PARAMS ((int, int, struct type *, char *,
|
static void f77_print_array_1 (int, int, struct type *, char *,
|
||||||
CORE_ADDR, GDB_FILE *, int, int, int,
|
CORE_ADDR, struct ui_file *, int, int, int,
|
||||||
enum val_prettyprint));
|
enum val_prettyprint);
|
||||||
static void f77_create_arrayprint_offset_tbl PARAMS ((struct type *,
|
static void f77_create_arrayprint_offset_tbl (struct type *,
|
||||||
GDB_FILE *));
|
struct ui_file *);
|
||||||
static void f77_get_dynamic_length_of_aggregate PARAMS ((struct type *));
|
static void f77_get_dynamic_length_of_aggregate PARAMS ((struct type *));
|
||||||
|
|
||||||
int f77_array_offset_tbl[MAX_FORTRAN_DIMS + 1][2];
|
int f77_array_offset_tbl[MAX_FORTRAN_DIMS + 1][2];
|
||||||
|
@ -234,7 +234,7 @@ f77_get_dynamic_length_of_aggregate (type)
|
||||||
static void
|
static void
|
||||||
f77_create_arrayprint_offset_tbl (type, stream)
|
f77_create_arrayprint_offset_tbl (type, stream)
|
||||||
struct type *type;
|
struct type *type;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
{
|
{
|
||||||
struct type *tmp_type;
|
struct type *tmp_type;
|
||||||
int eltlen;
|
int eltlen;
|
||||||
|
@ -288,7 +288,7 @@ f77_print_array_1 (nss, ndimensions, type, valaddr, address,
|
||||||
struct type *type;
|
struct type *type;
|
||||||
char *valaddr;
|
char *valaddr;
|
||||||
CORE_ADDR address;
|
CORE_ADDR address;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
int format;
|
int format;
|
||||||
int deref_ref;
|
int deref_ref;
|
||||||
int recurse;
|
int recurse;
|
||||||
|
@ -336,7 +336,7 @@ f77_print_array (type, valaddr, address, stream, format, deref_ref, recurse,
|
||||||
struct type *type;
|
struct type *type;
|
||||||
char *valaddr;
|
char *valaddr;
|
||||||
CORE_ADDR address;
|
CORE_ADDR address;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
int format;
|
int format;
|
||||||
int deref_ref;
|
int deref_ref;
|
||||||
int recurse;
|
int recurse;
|
||||||
|
@ -381,7 +381,7 @@ f_val_print (type, valaddr, embedded_offset, address, stream, format, deref_ref,
|
||||||
char *valaddr;
|
char *valaddr;
|
||||||
int embedded_offset;
|
int embedded_offset;
|
||||||
CORE_ADDR address;
|
CORE_ADDR address;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
int format;
|
int format;
|
||||||
int deref_ref;
|
int deref_ref;
|
||||||
int recurse;
|
int recurse;
|
||||||
|
|
|
@ -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 int frameless_look_for_prologue PARAMS ((struct frame_info *));
|
||||||
|
|
||||||
extern void print_frame_args PARAMS ((struct symbol *, 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 *));
|
extern struct frame_info *find_relative_frame PARAMS ((struct frame_info *, int *));
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# User Interface Events.
|
# User Interface Events.
|
||||||
# Copyright 1999 Free Software Foundation, Inc.
|
# Copyright 1999-2000 Free Software Foundation, Inc.
|
||||||
#
|
#
|
||||||
# Contributed by Cygnus Solutions.
|
# Contributed by Cygnus Solutions.
|
||||||
#
|
#
|
||||||
|
@ -73,7 +73,7 @@ f:void:breakpoint_modify:int b:b
|
||||||
#*:void:target_wait_loop_hook:void
|
#*:void:target_wait_loop_hook:void
|
||||||
#*:void:init_gdb_hook:char *argv0:argv0
|
#*:void:init_gdb_hook:char *argv0:argv0
|
||||||
#*:void:command_loop_hook:void
|
#*: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
|
#*: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
|
#*:int:query_hook:const char *query, va_list args:query, args
|
||||||
#*:void:warning_hook:const char *string, va_list args:string, args
|
#*:void:warning_hook:const char *string, va_list args:string, args
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Header file for GDB-specific command-line stuff.
|
/* 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
|
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
|
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
|
enum command_control_type
|
||||||
execute_control_command PARAMS ((struct command_line *));
|
execute_control_command PARAMS ((struct command_line *));
|
||||||
|
|
||||||
extern void
|
extern void print_command_line (struct command_line *, unsigned int,
|
||||||
print_command_line PARAMS ((struct command_line *, unsigned int, GDB_FILE *));
|
struct ui_file *);
|
||||||
|
|
||||||
extern char **noop_completer PARAMS ((char *, char *));
|
extern char **noop_completer PARAMS ((char *, char *));
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
/* Internal type definitions for GDB.
|
/* Internal type definitions for GDB.
|
||||||
Copyright (C) 1992, 1993, 1994, 1996, 1998, 1999
|
Copyright (C) 1992-1994, 1996, 1998-2000 Free Software Foundation, Inc.
|
||||||
Free Software Foundation, Inc.
|
|
||||||
Contributed by Cygnus Support, using pieces from other GDB modules.
|
Contributed by Cygnus Support, using pieces from other GDB modules.
|
||||||
|
|
||||||
This file is part of GDB.
|
This file is part of GDB.
|
||||||
|
@ -1151,8 +1150,8 @@ extern void recursive_dump_type PARAMS ((struct type *, int));
|
||||||
|
|
||||||
/* printcmd.c */
|
/* printcmd.c */
|
||||||
|
|
||||||
extern void
|
extern void print_scalar_formatted (char *, struct type *, int, int,
|
||||||
print_scalar_formatted PARAMS ((char *, struct type *, int, int, GDB_FILE *));
|
struct ui_file *);
|
||||||
|
|
||||||
extern int can_dereference PARAMS ((struct type *));
|
extern int can_dereference PARAMS ((struct type *));
|
||||||
|
|
||||||
|
@ -1162,6 +1161,6 @@ extern void maintenance_print_type PARAMS ((char *, int));
|
||||||
|
|
||||||
/* typeprint.c */
|
/* 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 */
|
#endif /* GDBTYPES_H */
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
/* Target-dependent code for the HP PA architecture, for GDB.
|
/* Target-dependent code for the HP PA architecture, for GDB.
|
||||||
Copyright 1986, 87, 89, 90, 91, 92, 93, 94, 95, 96, 1999
|
Copyright 1986, 1987, 1989-1996, 1999-2000 Free Software Foundation, Inc.
|
||||||
Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
Contributed by the Center for Software Science at the
|
Contributed by the Center for Software Science at the
|
||||||
University of Utah (pa-gdb-bugs@cs.utah.edu).
|
University of Utah (pa-gdb-bugs@cs.utah.edu).
|
||||||
|
@ -122,10 +121,10 @@ static void internalize_unwinds PARAMS ((struct objfile *,
|
||||||
asection *, unsigned int,
|
asection *, unsigned int,
|
||||||
unsigned int, CORE_ADDR));
|
unsigned int, CORE_ADDR));
|
||||||
static void pa_print_registers PARAMS ((char *, int, int));
|
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_register_look_aside PARAMS ((char *, int, long *));
|
||||||
static void pa_print_fp_reg PARAMS ((int));
|
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 *));
|
static void record_text_segment_lowaddr PARAMS ((bfd *, asection *, void *));
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
|
@ -2586,7 +2585,7 @@ void
|
||||||
pa_do_strcat_registers_info (regnum, fpregs, stream, precision)
|
pa_do_strcat_registers_info (regnum, fpregs, stream, precision)
|
||||||
int regnum;
|
int regnum;
|
||||||
int fpregs;
|
int fpregs;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
enum precision_type precision;
|
enum precision_type precision;
|
||||||
{
|
{
|
||||||
char raw_regs[REGISTER_BYTES];
|
char raw_regs[REGISTER_BYTES];
|
||||||
|
@ -2801,7 +2800,7 @@ pa_strcat_registers (raw_regs, regnum, fpregs, stream)
|
||||||
char *raw_regs;
|
char *raw_regs;
|
||||||
int regnum;
|
int regnum;
|
||||||
int fpregs;
|
int fpregs;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
{
|
{
|
||||||
int i, j;
|
int i, j;
|
||||||
long raw_val[2]; /* Alas, we are compiled so that "long long" is 32 bits */
|
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
|
static void
|
||||||
pa_strcat_fp_reg (i, stream, precision)
|
pa_strcat_fp_reg (i, stream, precision)
|
||||||
int i;
|
int i;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
enum precision_type precision;
|
enum precision_type precision;
|
||||||
{
|
{
|
||||||
char raw_buffer[MAX_REGISTER_RAW_SIZE];
|
char raw_buffer[MAX_REGISTER_RAW_SIZE];
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Java language support routines for GDB, the GNU debugger.
|
/* 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.
|
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 struct type *java_lookup_type PARAMS ((char *signature));
|
||||||
static value_ptr java_value_string PARAMS ((char *ptr, int len));
|
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
|
/* This objfile contains symtabs that have been dynamically created
|
||||||
to record dynamically loaded Java classes and dynamically
|
to record dynamically loaded Java classes and dynamically
|
||||||
|
@ -837,7 +837,7 @@ java_value_string (ptr, len)
|
||||||
static void
|
static void
|
||||||
java_emit_char (c, stream, quoter)
|
java_emit_char (c, stream, quoter)
|
||||||
int c;
|
int c;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
int quoter;
|
int quoter;
|
||||||
{
|
{
|
||||||
switch (c)
|
switch (c)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Java language support definitions for GDB, the GNU debugger.
|
/* 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.
|
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_double_type;
|
||||||
extern struct type *java_void_type;
|
extern struct type *java_void_type;
|
||||||
|
|
||||||
extern int
|
extern int java_val_print (struct type *, char *, int, CORE_ADDR,
|
||||||
java_val_print PARAMS ((struct type *, char *, int, CORE_ADDR, GDB_FILE *, int, int,
|
struct ui_file *, int, int, int,
|
||||||
int, enum val_prettyprint));
|
enum val_prettyprint);
|
||||||
|
|
||||||
extern int
|
extern int java_value_print (struct value *, struct ui_file *, int,
|
||||||
java_value_print PARAMS ((struct value *, GDB_FILE *, int,
|
enum val_prettyprint);
|
||||||
enum val_prettyprint));
|
|
||||||
|
|
||||||
extern value_ptr java_class_from_object PARAMS ((value_ptr));
|
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 int is_object_type PARAMS ((struct type *));
|
||||||
|
|
||||||
extern void /* Defined in jv-typeprint.c */
|
/* Defined in jv-typeprint.c */
|
||||||
java_print_type PARAMS ((struct type *, char *, GDB_FILE *, int, int));
|
extern void java_print_type (struct type *, char *, struct ui_file *, int,
|
||||||
|
int);
|
||||||
|
|
||||||
extern char *java_demangle_type_signature PARAMS ((char *));
|
extern char *java_demangle_type_signature PARAMS ((char *));
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Support for printing Java types for GDB, the GNU debugger.
|
/* 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.
|
This file is part of GDB.
|
||||||
|
|
||||||
|
@ -31,11 +31,13 @@
|
||||||
|
|
||||||
/* Local functions */
|
/* 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
|
static void
|
||||||
java_type_print_derivation_info (stream, type)
|
java_type_print_derivation_info (stream, type)
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
struct type *type;
|
struct type *type;
|
||||||
{
|
{
|
||||||
char *name;
|
char *name;
|
||||||
|
@ -84,7 +86,7 @@ java_type_print_derivation_info (stream, type)
|
||||||
static void
|
static void
|
||||||
java_type_print_base (type, stream, show, level)
|
java_type_print_base (type, stream, show, level)
|
||||||
struct type *type;
|
struct type *type;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
int show;
|
int show;
|
||||||
int level;
|
int level;
|
||||||
{
|
{
|
||||||
|
@ -323,14 +325,14 @@ java_type_print_base (type, stream, show, level)
|
||||||
|
|
||||||
/* LEVEL is the depth to indent lines by. */
|
/* LEVEL is the depth to indent lines by. */
|
||||||
|
|
||||||
extern void
|
extern void c_type_print_varspec_suffix (struct type *, struct ui_file *,
|
||||||
c_type_print_varspec_suffix PARAMS ((struct type *, GDB_FILE *, int, int, int));
|
int, int, int);
|
||||||
|
|
||||||
void
|
void
|
||||||
java_print_type (type, varstring, stream, show, level)
|
java_print_type (type, varstring, stream, show, level)
|
||||||
struct type *type;
|
struct type *type;
|
||||||
char *varstring;
|
char *varstring;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
int show;
|
int show;
|
||||||
int level;
|
int level;
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Support for printing Java values for GDB, the GNU debugger.
|
/* 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.
|
This file is part of GDB.
|
||||||
|
|
||||||
|
@ -33,13 +33,17 @@
|
||||||
|
|
||||||
/* Local functions */
|
/* 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
|
int
|
||||||
java_value_print (val, stream, format, pretty)
|
java_value_print (val, stream, format, pretty)
|
||||||
value_ptr val;
|
value_ptr val;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
int format;
|
int format;
|
||||||
enum val_prettyprint pretty;
|
enum val_prettyprint pretty;
|
||||||
{
|
{
|
||||||
|
@ -242,7 +246,7 @@ java_print_value_fields (type, valaddr, address, stream,
|
||||||
struct type *type;
|
struct type *type;
|
||||||
char *valaddr;
|
char *valaddr;
|
||||||
CORE_ADDR address;
|
CORE_ADDR address;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
int format;
|
int format;
|
||||||
int recurse;
|
int recurse;
|
||||||
enum val_prettyprint pretty;
|
enum val_prettyprint pretty;
|
||||||
|
@ -451,7 +455,7 @@ java_val_print (type, valaddr, embedded_offset, address, stream, format,
|
||||||
struct type *type;
|
struct type *type;
|
||||||
char *valaddr;
|
char *valaddr;
|
||||||
CORE_ADDR address;
|
CORE_ADDR address;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
int format;
|
int format;
|
||||||
int deref_ref;
|
int deref_ref;
|
||||||
int recurse;
|
int recurse;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Multiple source language support for GDB.
|
/* 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
|
Contributed by the Department of Computer Science at the State University
|
||||||
of New York at Buffalo.
|
of New York at Buffalo.
|
||||||
|
|
||||||
|
@ -86,27 +86,25 @@ set_check PARAMS ((char *, int));
|
||||||
static void
|
static void
|
||||||
set_type_range PARAMS ((void));
|
set_type_range PARAMS ((void));
|
||||||
|
|
||||||
static void
|
static void unk_lang_emit_char (int c, struct ui_file *stream, int quoter);
|
||||||
unk_lang_emit_char PARAMS ((int c, GDB_FILE * stream, int quoter));
|
|
||||||
|
|
||||||
static void
|
static void unk_lang_printchar (int c, struct ui_file *stream);
|
||||||
unk_lang_printchar PARAMS ((int c, GDB_FILE * stream));
|
|
||||||
|
|
||||||
static void
|
static void unk_lang_printstr (struct ui_file * stream, char *string,
|
||||||
unk_lang_printstr PARAMS ((GDB_FILE * stream, char *string, unsigned int length, int width, int force_ellipses));
|
unsigned int length, int width,
|
||||||
|
int force_ellipses);
|
||||||
|
|
||||||
static struct type *
|
static struct type *
|
||||||
unk_lang_create_fundamental_type PARAMS ((struct objfile *, int));
|
unk_lang_create_fundamental_type PARAMS ((struct objfile *, int));
|
||||||
|
|
||||||
static void
|
static void unk_lang_print_type (struct type *, char *, struct ui_file *,
|
||||||
unk_lang_print_type PARAMS ((struct type *, char *, GDB_FILE *, int, int));
|
int, int);
|
||||||
|
|
||||||
static int
|
static int unk_lang_val_print (struct type *, char *, int, CORE_ADDR,
|
||||||
unk_lang_val_print PARAMS ((struct type *, char *, int, CORE_ADDR, GDB_FILE *,
|
struct ui_file *, int, int, int,
|
||||||
int, int, int, enum val_prettyprint));
|
enum val_prettyprint);
|
||||||
|
|
||||||
static int
|
static int unk_lang_value_print (value_ptr, struct ui_file *, int, enum val_prettyprint);
|
||||||
unk_lang_value_print PARAMS ((value_ptr, GDB_FILE *, int, enum val_prettyprint));
|
|
||||||
|
|
||||||
/* Forward declaration */
|
/* Forward declaration */
|
||||||
extern const struct language_defn unknown_language_defn;
|
extern const struct language_defn unknown_language_defn;
|
||||||
|
@ -1364,7 +1362,7 @@ unk_lang_error (msg)
|
||||||
static void
|
static void
|
||||||
unk_lang_emit_char (c, stream, quoter)
|
unk_lang_emit_char (c, stream, quoter)
|
||||||
register int c;
|
register int c;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
int quoter;
|
int quoter;
|
||||||
{
|
{
|
||||||
error ("internal error - unimplemented function unk_lang_emit_char called.");
|
error ("internal error - unimplemented function unk_lang_emit_char called.");
|
||||||
|
@ -1373,14 +1371,14 @@ unk_lang_emit_char (c, stream, quoter)
|
||||||
static void
|
static void
|
||||||
unk_lang_printchar (c, stream)
|
unk_lang_printchar (c, stream)
|
||||||
register int c;
|
register int c;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
{
|
{
|
||||||
error ("internal error - unimplemented function unk_lang_printchar called.");
|
error ("internal error - unimplemented function unk_lang_printchar called.");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
unk_lang_printstr (stream, string, length, width, force_ellipses)
|
unk_lang_printstr (stream, string, length, width, force_ellipses)
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
char *string;
|
char *string;
|
||||||
unsigned int length;
|
unsigned int length;
|
||||||
int width;
|
int width;
|
||||||
|
@ -1401,7 +1399,7 @@ static void
|
||||||
unk_lang_print_type (type, varstring, stream, show, level)
|
unk_lang_print_type (type, varstring, stream, show, level)
|
||||||
struct type *type;
|
struct type *type;
|
||||||
char *varstring;
|
char *varstring;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
int show;
|
int show;
|
||||||
int level;
|
int level;
|
||||||
{
|
{
|
||||||
|
@ -1415,7 +1413,7 @@ unk_lang_val_print (type, valaddr, embedded_offset, address, stream, format, der
|
||||||
char *valaddr;
|
char *valaddr;
|
||||||
int embedded_offset;
|
int embedded_offset;
|
||||||
CORE_ADDR address;
|
CORE_ADDR address;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
int format;
|
int format;
|
||||||
int deref_ref;
|
int deref_ref;
|
||||||
int recurse;
|
int recurse;
|
||||||
|
@ -1427,7 +1425,7 @@ unk_lang_val_print (type, valaddr, embedded_offset, address, stream, format, der
|
||||||
static int
|
static int
|
||||||
unk_lang_value_print (val, stream, format, pretty)
|
unk_lang_value_print (val, stream, format, pretty)
|
||||||
value_ptr val;
|
value_ptr val;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
int format;
|
int format;
|
||||||
enum val_prettyprint pretty;
|
enum val_prettyprint pretty;
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Source-language-related definitions for GDB.
|
/* 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
|
Contributed by the Department of Computer Science at the State University
|
||||||
of New York at Buffalo.
|
of New York at Buffalo.
|
||||||
|
|
||||||
|
@ -151,29 +151,31 @@ struct language_defn
|
||||||
struct value *(*evaluate_exp) PARAMS ((struct type *, struct expression *,
|
struct value *(*evaluate_exp) PARAMS ((struct type *, struct expression *,
|
||||||
int *, enum noside));
|
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,
|
void (*la_printstr) (struct ui_file * stream, char *string,
|
||||||
unsigned int length, int width,
|
unsigned int length, int width,
|
||||||
int force_ellipses));
|
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));
|
struct type *(*la_fund_type) PARAMS ((struct objfile *, int));
|
||||||
|
|
||||||
/* Print a type using syntax appropriate for this language. */
|
/* 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. */
|
/* Print a value using syntax appropriate for this language. */
|
||||||
|
|
||||||
int (*la_val_print) PARAMS ((struct type *, char *, int, CORE_ADDR, GDB_FILE *,
|
int (*la_val_print) (struct type *, char *, int, CORE_ADDR,
|
||||||
int, int, int, enum val_prettyprint));
|
struct ui_file *, int, int, int,
|
||||||
|
enum val_prettyprint);
|
||||||
|
|
||||||
/* Print a top-level value using syntax appropriate for this language. */
|
/* Print a top-level value using syntax appropriate for this language. */
|
||||||
|
|
||||||
int (*la_value_print) PARAMS ((struct value *, GDB_FILE *,
|
int (*la_value_print) (struct value *, struct ui_file *,
|
||||||
int, enum val_prettyprint));
|
int, enum val_prettyprint);
|
||||||
|
|
||||||
/* Base 2 (binary) formats. */
|
/* Base 2 (binary) formats. */
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Modula 2 language support routines for GDB, the GNU debugger.
|
/* 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.
|
This file is part of GDB.
|
||||||
|
|
||||||
|
@ -29,9 +29,11 @@
|
||||||
|
|
||||||
extern void _initialize_m2_language PARAMS ((void));
|
extern void _initialize_m2_language PARAMS ((void));
|
||||||
static struct type *m2_create_fundamental_type PARAMS ((struct objfile *, int));
|
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_printstr (struct ui_file * stream, char *string,
|
||||||
static void m2_printchar PARAMS ((int, GDB_FILE *));
|
unsigned int length, int width,
|
||||||
static void m2_emit_char PARAMS ((int, GDB_FILE *, int));
|
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
|
/* 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
|
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
|
static void
|
||||||
m2_emit_char (c, stream, quoter)
|
m2_emit_char (c, stream, quoter)
|
||||||
register int c;
|
register int c;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
int quoter;
|
int quoter;
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -95,7 +97,7 @@ m2_emit_char (c, stream, quoter)
|
||||||
static void
|
static void
|
||||||
m2_printchar (c, stream)
|
m2_printchar (c, stream)
|
||||||
int c;
|
int c;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
{
|
{
|
||||||
fputs_filtered ("'", stream);
|
fputs_filtered ("'", stream);
|
||||||
LA_EMIT_CHAR (c, stream, '\'');
|
LA_EMIT_CHAR (c, stream, '\'');
|
||||||
|
@ -111,7 +113,7 @@ m2_printchar (c, stream)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
m2_printstr (stream, string, length, width, force_ellipses)
|
m2_printstr (stream, string, length, width, force_ellipses)
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
char *string;
|
char *string;
|
||||||
unsigned int length;
|
unsigned int length;
|
||||||
int width;
|
int width;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Modula 2 language support definitions for GDB, the GNU debugger.
|
/* 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.
|
This file is part of GDB.
|
||||||
|
|
||||||
|
@ -24,9 +24,10 @@ m2_parse PARAMS ((void)); /* Defined in m2-exp.y */
|
||||||
extern void
|
extern void
|
||||||
m2_error PARAMS ((char *)); /* Defined in m2-exp.y */
|
m2_error PARAMS ((char *)); /* Defined in m2-exp.y */
|
||||||
|
|
||||||
extern void /* Defined in m2-typeprint.c */
|
/* Defined in m2-typeprint.c */
|
||||||
m2_print_type PARAMS ((struct type *, char *, GDB_FILE *, int, int));
|
extern void m2_print_type (struct type *, char *, struct ui_file *, int,
|
||||||
|
int);
|
||||||
|
|
||||||
extern int
|
extern int m2_val_print (struct type *, char *, int, CORE_ADDR,
|
||||||
m2_val_print PARAMS ((struct type *, char *, int, CORE_ADDR, GDB_FILE *, int, int,
|
struct ui_file *, int, int, int,
|
||||||
int, enum val_prettyprint));
|
enum val_prettyprint);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Support for printing Modula 2 types for GDB, the GNU debugger.
|
/* 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.
|
This file is part of GDB.
|
||||||
|
|
||||||
|
@ -40,11 +40,12 @@ void
|
||||||
m2_print_type (type, varstring, stream, show, level)
|
m2_print_type (type, varstring, stream, show, level)
|
||||||
struct type *type;
|
struct type *type;
|
||||||
char *varstring;
|
char *varstring;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
int show;
|
int show;
|
||||||
int level;
|
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 */
|
c_print_type (type, varstring, stream, show, level); /* FIXME */
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Support for printing Modula 2 values for GDB, the GNU debugger.
|
/* 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.
|
This file is part of GDB.
|
||||||
|
|
||||||
|
@ -34,15 +34,15 @@ m2_val_print (type, valaddr, embedded_offset, address,
|
||||||
char *valaddr;
|
char *valaddr;
|
||||||
int embedded_offset;
|
int embedded_offset;
|
||||||
CORE_ADDR address;
|
CORE_ADDR address;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
int format;
|
int format;
|
||||||
int deref_ref;
|
int deref_ref;
|
||||||
int recurse;
|
int recurse;
|
||||||
enum val_prettyprint pretty;
|
enum val_prettyprint pretty;
|
||||||
{
|
{
|
||||||
extern int
|
extern int c_val_print (struct type *, char *, int, CORE_ADDR,
|
||||||
c_val_print PARAMS ((struct type *, char *, int, CORE_ADDR,
|
struct ui_file *, int, int, int,
|
||||||
GDB_FILE *, int, int, int, enum val_prettyprint));
|
enum val_prettyprint);
|
||||||
return (c_val_print (type, valaddr, 0, address, stream, format, deref_ref,
|
return (c_val_print (type, valaddr, 0, address, stream, format, deref_ref,
|
||||||
recurse, pretty));
|
recurse, pretty));
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/* Interface GDB to Mach 3.0 operating systems.
|
/* Interface GDB to Mach 3.0 operating systems.
|
||||||
(Most) Mach 3.0 related routines live in this file.
|
(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.
|
This file is part of GDB.
|
||||||
|
|
||||||
|
@ -2472,7 +2472,7 @@ map_cprocs_to_kernel_threads (cprocs, mthreads, thread_count)
|
||||||
|
|
||||||
void
|
void
|
||||||
print_tl_address (stream, pc)
|
print_tl_address (stream, pc)
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
CORE_ADDR pc;
|
CORE_ADDR pc;
|
||||||
{
|
{
|
||||||
if (!lookup_minimal_symbol_by_pc (pc))
|
if (!lookup_minimal_symbol_by_pc (pc))
|
||||||
|
|
18
gdb/main.c
18
gdb/main.c
|
@ -1,6 +1,5 @@
|
||||||
/* Top level stuff for GDB, the GNU debugger.
|
/* Top level stuff for GDB, the GNU debugger.
|
||||||
Copyright 1986, 87, 88, 89, 90, 91, 92, 93, 94, 95, 1999
|
Copyright 1986-1995, 1999-2000 Free Software Foundation, Inc.
|
||||||
Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
This file is part of GDB.
|
This file is part of GDB.
|
||||||
|
|
||||||
|
@ -62,10 +61,10 @@ int xdb_commands = 0;
|
||||||
/* Whether dbx commands will be handled */
|
/* Whether dbx commands will be handled */
|
||||||
int dbx_commands = 0;
|
int dbx_commands = 0;
|
||||||
|
|
||||||
GDB_FILE *gdb_stdout;
|
struct ui_file *gdb_stdout;
|
||||||
GDB_FILE *gdb_stderr;
|
struct ui_file *gdb_stderr;
|
||||||
GDB_FILE *gdb_stdlog;
|
struct ui_file *gdb_stdlog;
|
||||||
GDB_FILE *gdb_stdtarg;
|
struct ui_file *gdb_stdtarg;
|
||||||
|
|
||||||
/* Used to initialize error() - defined in utils.c */
|
/* 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 */
|
/* Whether to enable writing into executable and core files */
|
||||||
extern int write_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
|
/* These two are used to set the external editor commands when gdb is farming
|
||||||
out files to be edited by another program. */
|
out files to be edited by another program. */
|
||||||
|
@ -194,7 +193,7 @@ captured_main (void *data)
|
||||||
|
|
||||||
#if defined (TUI) || defined (GDBTK)
|
#if defined (TUI) || defined (GDBTK)
|
||||||
/* Older code uses the tui_file and fputs_unfiltered_hook(). It
|
/* 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. */
|
within its own _initialize function. */
|
||||||
gdb_stdout = tui_fileopen (stdout);
|
gdb_stdout = tui_fileopen (stdout);
|
||||||
gdb_stderr = tui_fileopen (stderr);
|
gdb_stderr = tui_fileopen (stderr);
|
||||||
|
@ -714,8 +713,7 @@ main (int argc, char **argv)
|
||||||
to print. */
|
to print. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
print_gdb_help (stream)
|
print_gdb_help (struct ui_file *stream)
|
||||||
GDB_FILE *stream;
|
|
||||||
{
|
{
|
||||||
fputs_unfiltered ("\
|
fputs_unfiltered ("\
|
||||||
This is the GNU debugger. Usage:\n\n\
|
This is the GNU debugger. Usage:\n\n\
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
/* Remote debugging interface for boot monitors, for GDB.
|
/* Remote debugging interface for boot monitors, for GDB.
|
||||||
Copyright 1990, 1991, 1992, 1993, 1995, 1996, 1997, 1999
|
Copyright 1990-1993, 1995-1997, 1999-2000 Free Software Foundation, Inc.
|
||||||
Free Software Foundation, Inc.
|
|
||||||
Contributed by Cygnus Support. Written by Rob Savoye for Cygnus.
|
Contributed by Cygnus Support. Written by Rob Savoye for Cygnus.
|
||||||
Resurrected from the ashes by Stu Grossman.
|
Resurrected from the ashes by Stu Grossman.
|
||||||
|
|
||||||
|
@ -2270,7 +2269,7 @@ monitor_stop ()
|
||||||
|
|
||||||
static void
|
static void
|
||||||
monitor_rcmd (char *command,
|
monitor_rcmd (char *command,
|
||||||
struct gdb_file *outbuf)
|
struct ui_file *outbuf)
|
||||||
{
|
{
|
||||||
char *p;
|
char *p;
|
||||||
int resp_len;
|
int resp_len;
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
/* Print values for GNU debugger GDB.
|
/* Print values for GNU debugger GDB.
|
||||||
Copyright 1986, 87, 88, 89, 90, 91, 93, 94, 95, 1998
|
Copyright 1986-1991, 1993-1995, 1998, 2000 Free Software Foundation, Inc.
|
||||||
Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
This file is part of GDB.
|
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 printf_command PARAMS ((char *, int));
|
||||||
|
|
||||||
static void print_frame_nameless_args PARAMS ((struct frame_info *, long,
|
static void print_frame_nameless_args (struct frame_info *, long,
|
||||||
int, int, GDB_FILE *));
|
int, int, struct ui_file *);
|
||||||
|
|
||||||
static void display_info PARAMS ((char *, int));
|
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 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 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));
|
static void sym_info PARAMS ((char *, int));
|
||||||
|
|
||||||
|
@ -281,7 +280,7 @@ print_formatted (val, format, size, stream)
|
||||||
register value_ptr val;
|
register value_ptr val;
|
||||||
register int format;
|
register int format;
|
||||||
int size;
|
int size;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
{
|
{
|
||||||
struct type *type = check_typedef (VALUE_TYPE (val));
|
struct type *type = check_typedef (VALUE_TYPE (val));
|
||||||
int len = TYPE_LENGTH (type);
|
int len = TYPE_LENGTH (type);
|
||||||
|
@ -349,7 +348,7 @@ print_scalar_formatted (valaddr, type, format, size, stream)
|
||||||
struct type *type;
|
struct type *type;
|
||||||
int format;
|
int format;
|
||||||
int size;
|
int size;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
{
|
{
|
||||||
LONGEST val_long;
|
LONGEST val_long;
|
||||||
unsigned int len = TYPE_LENGTH (type);
|
unsigned int len = TYPE_LENGTH (type);
|
||||||
|
@ -540,7 +539,7 @@ set_next_address (addr)
|
||||||
void
|
void
|
||||||
print_address_symbolic (addr, stream, do_demangle, leadin)
|
print_address_symbolic (addr, stream, do_demangle, leadin)
|
||||||
CORE_ADDR addr;
|
CORE_ADDR addr;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
int do_demangle;
|
int do_demangle;
|
||||||
char *leadin;
|
char *leadin;
|
||||||
{
|
{
|
||||||
|
@ -667,7 +666,7 @@ void
|
||||||
print_address_numeric (addr, use_local, stream)
|
print_address_numeric (addr, use_local, stream)
|
||||||
CORE_ADDR addr;
|
CORE_ADDR addr;
|
||||||
int use_local;
|
int use_local;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
{
|
{
|
||||||
/* This assumes a CORE_ADDR can fit in a LONGEST. Probably a safe
|
/* This assumes a CORE_ADDR can fit in a LONGEST. Probably a safe
|
||||||
assumption. */
|
assumption. */
|
||||||
|
@ -681,7 +680,7 @@ print_address_numeric (addr, use_local, stream)
|
||||||
void
|
void
|
||||||
print_address (addr, stream)
|
print_address (addr, stream)
|
||||||
CORE_ADDR addr;
|
CORE_ADDR addr;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
{
|
{
|
||||||
print_address_numeric (addr, 1, stream);
|
print_address_numeric (addr, 1, stream);
|
||||||
print_address_symbolic (addr, stream, asm_demangle, " ");
|
print_address_symbolic (addr, stream, asm_demangle, " ");
|
||||||
|
@ -695,7 +694,7 @@ print_address (addr, stream)
|
||||||
void
|
void
|
||||||
print_address_demangle (addr, stream, do_demangle)
|
print_address_demangle (addr, stream, do_demangle)
|
||||||
CORE_ADDR addr;
|
CORE_ADDR addr;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
int do_demangle;
|
int do_demangle;
|
||||||
{
|
{
|
||||||
if (addr == 0)
|
if (addr == 0)
|
||||||
|
@ -1743,7 +1742,7 @@ void
|
||||||
print_variable_value (var, frame, stream)
|
print_variable_value (var, frame, stream)
|
||||||
struct symbol *var;
|
struct symbol *var;
|
||||||
struct frame_info *frame;
|
struct frame_info *frame;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
{
|
{
|
||||||
value_ptr val = read_var_value (var, frame);
|
value_ptr val = read_var_value (var, frame);
|
||||||
|
|
||||||
|
@ -1763,7 +1762,7 @@ print_frame_args (func, fi, num, stream)
|
||||||
struct symbol *func;
|
struct symbol *func;
|
||||||
struct frame_info *fi;
|
struct frame_info *fi;
|
||||||
int num;
|
int num;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
{
|
{
|
||||||
struct block *b = NULL;
|
struct block *b = NULL;
|
||||||
int nsyms = 0;
|
int nsyms = 0;
|
||||||
|
@ -1948,7 +1947,7 @@ print_frame_nameless_args (fi, start, num, first, stream)
|
||||||
long start;
|
long start;
|
||||||
int num;
|
int num;
|
||||||
int first;
|
int first;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
CORE_ADDR argsaddr;
|
CORE_ADDR argsaddr;
|
||||||
|
@ -2398,7 +2397,7 @@ disassemble_command (arg, from_tty)
|
||||||
static int
|
static int
|
||||||
print_insn (memaddr, stream)
|
print_insn (memaddr, stream)
|
||||||
CORE_ADDR memaddr;
|
CORE_ADDR memaddr;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
{
|
{
|
||||||
if (TARGET_BYTE_ORDER == BIG_ENDIAN)
|
if (TARGET_BYTE_ORDER == BIG_ENDIAN)
|
||||||
TARGET_PRINT_INSN_INFO->endian = BFD_ENDIAN_BIG;
|
TARGET_PRINT_INSN_INFO->endian = BFD_ENDIAN_BIG;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* OBSOLETE /* Pyramid target-dependent code for GDB. */
|
/* 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 */
|
||||||
/* OBSOLETE This file is part of GDB. */
|
/* OBSOLETE This file is part of GDB. */
|
||||||
/* OBSOLETE */
|
/* OBSOLETE */
|
||||||
|
@ -184,7 +184,7 @@
|
||||||
/* OBSOLETE int */
|
/* OBSOLETE int */
|
||||||
/* OBSOLETE pyr_print_insn (memaddr, stream) */
|
/* OBSOLETE pyr_print_insn (memaddr, stream) */
|
||||||
/* OBSOLETE CORE_ADDR memaddr; */
|
/* OBSOLETE CORE_ADDR memaddr; */
|
||||||
/* OBSOLETE GDB_FILE *stream; */
|
/* OBSOLETE struct ui_file *stream; */
|
||||||
/* OBSOLETE { */
|
/* OBSOLETE { */
|
||||||
/* OBSOLETE unsigned char buffer[MAXLEN]; */
|
/* OBSOLETE unsigned char buffer[MAXLEN]; */
|
||||||
/* OBSOLETE register int i, nargs, insn_size =4; */
|
/* OBSOLETE register int i, nargs, insn_size =4; */
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Remote debugging interface for MIPS remote debugging protocol.
|
/* 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
|
Contributed by Cygnus Support. Written by Ian Lance Taylor
|
||||||
<ian@cygnus.com>.
|
<ian@cygnus.com>.
|
||||||
|
|
||||||
|
@ -514,7 +514,7 @@ mips_error (char *string,...)
|
||||||
static void
|
static void
|
||||||
fputc_readable (ch, file)
|
fputc_readable (ch, file)
|
||||||
int ch;
|
int ch;
|
||||||
struct gdb_file *file;
|
struct ui_file *file;
|
||||||
{
|
{
|
||||||
if (ch == '\n')
|
if (ch == '\n')
|
||||||
fputc_unfiltered ('\n', file);
|
fputc_unfiltered ('\n', file);
|
||||||
|
@ -535,7 +535,7 @@ fputc_readable (ch, file)
|
||||||
static void
|
static void
|
||||||
fputs_readable (string, file)
|
fputs_readable (string, file)
|
||||||
char *string;
|
char *string;
|
||||||
struct gdb_file *file;
|
struct ui_file *file;
|
||||||
{
|
{
|
||||||
int c;
|
int c;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Generic remote debugging interface for simulators.
|
/* 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.
|
Contributed by Cygnus Support.
|
||||||
Steve Chamberlain (sac@cygnus.com).
|
Steve Chamberlain (sac@cygnus.com).
|
||||||
|
|
||||||
|
@ -194,7 +194,7 @@ gdb_os_write_stdout (p, buf, len)
|
||||||
int i;
|
int i;
|
||||||
char b[2];
|
char b[2];
|
||||||
|
|
||||||
gdb_file_write (gdb_stdtarg, buf, len);
|
ui_file_write (gdb_stdtarg, buf, len);
|
||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Remote debugging interface for AMD 29k interfaced via UDI, for GDB.
|
/* 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.
|
Written by Daniel Mann. Contributed by AMD.
|
||||||
|
|
||||||
This file is part of GDB.
|
This file is part of GDB.
|
||||||
|
@ -1673,7 +1673,7 @@ void
|
||||||
convert32 ()
|
convert32 ()
|
||||||
{;
|
{;
|
||||||
}
|
}
|
||||||
GDB_FILE *EchoFile = 0; /* used for debugging */
|
struct ui_file *EchoFile = 0; /* used for debugging */
|
||||||
int QuietMode = 0; /* used for debugging */
|
int QuietMode = 0; /* used for debugging */
|
||||||
|
|
||||||
#ifdef NO_HIF_SUPPORT
|
#ifdef NO_HIF_SUPPORT
|
||||||
|
|
31
gdb/remote.c
31
gdb/remote.c
|
@ -1,6 +1,5 @@
|
||||||
/* Remote target communications for serial-line targets in custom GDB protocol
|
/* Remote target communications for serial-line targets in custom GDB protocol
|
||||||
Copyright 1988, 91, 92, 93, 94, 95, 96, 97, 98, 1999
|
Copyright 1988, 1991-2000 Free Software Foundation, Inc.
|
||||||
Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
This file is part of GDB.
|
This file is part of GDB.
|
||||||
|
|
||||||
|
@ -56,6 +55,7 @@
|
||||||
/* Prototypes for local functions */
|
/* Prototypes for local functions */
|
||||||
static void cleanup_sigint_signal_handler (void *dummy);
|
static void cleanup_sigint_signal_handler (void *dummy);
|
||||||
static void initialize_sigint_signal_handler (void);
|
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 PARAMS ((int));
|
||||||
static void handle_remote_sigint_twice 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;
|
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
|
this is used (in synchronous mode) to wait for a target that is is
|
||||||
executing user code to stop. */
|
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
|
void
|
||||||
getpkt (char *buf,
|
getpkt (char *buf,
|
||||||
long sizeof_buf,
|
long sizeof_buf,
|
||||||
int forever)
|
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 c;
|
||||||
int tries;
|
int tries;
|
||||||
|
@ -3971,7 +3991,7 @@ getpkt (char *buf,
|
||||||
fprintf_unfiltered (gdb_stdlog, "\n");
|
fprintf_unfiltered (gdb_stdlog, "\n");
|
||||||
}
|
}
|
||||||
SERIAL_WRITE (remote_desc, "+", 1);
|
SERIAL_WRITE (remote_desc, "+", 1);
|
||||||
return;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Try the whole thing again. */
|
/* Try the whole thing again. */
|
||||||
|
@ -3983,6 +4003,7 @@ getpkt (char *buf,
|
||||||
|
|
||||||
printf_unfiltered ("Ignoring packet error, continuing...\n");
|
printf_unfiltered ("Ignoring packet error, continuing...\n");
|
||||||
SERIAL_WRITE (remote_desc, "+", 1);
|
SERIAL_WRITE (remote_desc, "+", 1);
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -4605,7 +4626,7 @@ remote_query (query_type, buf, outbuf, bufsiz)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
remote_rcmd (char *command,
|
remote_rcmd (char *command,
|
||||||
struct gdb_file *outbuf)
|
struct ui_file *outbuf)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
char *buf = alloca (PBUFSIZ);
|
char *buf = alloca (PBUFSIZ);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Scheme/Guile language support routines for GDB, the GNU debugger.
|
/* 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.
|
This file is part of GDB.
|
||||||
|
|
||||||
|
@ -36,7 +36,9 @@ static value_ptr evaluate_subexp_scm PARAMS ((struct type *, struct expression *
|
||||||
int *, enum noside));
|
int *, enum noside));
|
||||||
static value_ptr scm_lookup_name PARAMS ((char *));
|
static value_ptr scm_lookup_name PARAMS ((char *));
|
||||||
static int in_eval_c PARAMS ((void));
|
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[]);
|
extern struct type **CONST_PTR (c_builtin_types[]);
|
||||||
|
|
||||||
|
@ -45,14 +47,14 @@ struct type *builtin_type_scm;
|
||||||
void
|
void
|
||||||
scm_printchar (c, stream)
|
scm_printchar (c, stream)
|
||||||
int c;
|
int c;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
{
|
{
|
||||||
fprintf_filtered (stream, "#\\%c", c);
|
fprintf_filtered (stream, "#\\%c", c);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
scm_printstr (stream, string, length, width, force_ellipses)
|
scm_printstr (stream, string, length, width, force_ellipses)
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
char *string;
|
char *string;
|
||||||
unsigned int length;
|
unsigned int length;
|
||||||
int width;
|
int width;
|
||||||
|
|
|
@ -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
|
#define SICP
|
||||||
#include "scm-tags.h"
|
#include "scm-tags.h"
|
||||||
#undef SCM_NCELLP
|
#undef SCM_NCELLP
|
||||||
|
@ -25,20 +45,21 @@
|
||||||
/* Forward decls for prototypes */
|
/* Forward decls for prototypes */
|
||||||
struct value;
|
struct value;
|
||||||
|
|
||||||
extern int scm_value_print PARAMS ((struct value *, GDB_FILE *,
|
extern int scm_value_print (struct value *, struct ui_file *,
|
||||||
int, enum val_prettyprint));
|
int, enum val_prettyprint);
|
||||||
|
|
||||||
extern int scm_val_print PARAMS ((struct type *, char *, int, CORE_ADDR, GDB_FILE *,
|
extern int scm_val_print (struct type *, char *, int, CORE_ADDR,
|
||||||
int, int, int, enum val_prettyprint));
|
struct ui_file *, int, int, int,
|
||||||
|
enum val_prettyprint);
|
||||||
|
|
||||||
extern LONGEST scm_get_field PARAMS ((LONGEST, int));
|
extern LONGEST scm_get_field PARAMS ((LONGEST, int));
|
||||||
|
|
||||||
extern void scm_scmval_print PARAMS ((LONGEST, GDB_FILE *,
|
extern void scm_scmval_print (LONGEST, struct ui_file *, int, int, int,
|
||||||
int, int, int, enum val_prettyprint));
|
enum val_prettyprint);
|
||||||
|
|
||||||
extern int is_scmvalue_type PARAMS ((struct type *));
|
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));
|
extern struct value *scm_evaluate_string PARAMS ((char *, int));
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Scheme/Guile language support routines for GDB, the GNU debugger.
|
/* 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.
|
This file is part of GDB.
|
||||||
|
|
||||||
|
@ -30,15 +30,15 @@
|
||||||
#include "gdbcore.h"
|
#include "gdbcore.h"
|
||||||
|
|
||||||
/* FIXME: Should be in a header file that we import. */
|
/* FIXME: Should be in a header file that we import. */
|
||||||
extern int
|
extern int c_val_print (struct type *, char *, int, CORE_ADDR,
|
||||||
c_val_print PARAMS ((struct type *, char *, int, CORE_ADDR, GDB_FILE *, int, int,
|
struct ui_file *, int, int, int,
|
||||||
int, enum val_prettyprint));
|
enum val_prettyprint);
|
||||||
|
|
||||||
static void scm_ipruk PARAMS ((char *, LONGEST, GDB_FILE *));
|
static void scm_ipruk (char *, LONGEST, struct ui_file *);
|
||||||
static void scm_scmlist_print PARAMS ((LONGEST, GDB_FILE *, int, int,
|
static void scm_scmlist_print (LONGEST, struct ui_file *, int, int,
|
||||||
int, enum val_prettyprint));
|
int, enum val_prettyprint);
|
||||||
static int scm_inferior_print PARAMS ((LONGEST, GDB_FILE *, int, int,
|
static int scm_inferior_print (LONGEST, struct ui_file *, int, int,
|
||||||
int, enum val_prettyprint));
|
int, enum val_prettyprint);
|
||||||
|
|
||||||
/* Prints the SCM value VALUE by invoking the inferior, if appropraite.
|
/* Prints the SCM value VALUE by invoking the inferior, if appropraite.
|
||||||
Returns >= 0 on succes; retunr -1 if the inferior cannot/should not
|
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
|
static int
|
||||||
scm_inferior_print (value, stream, format, deref_ref, recurse, pretty)
|
scm_inferior_print (value, stream, format, deref_ref, recurse, pretty)
|
||||||
LONGEST value;
|
LONGEST value;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
int format;
|
int format;
|
||||||
int deref_ref;
|
int deref_ref;
|
||||||
int recurse;
|
int recurse;
|
||||||
|
@ -98,7 +98,7 @@ static char *scm_isymnames[] =
|
||||||
static void
|
static void
|
||||||
scm_scmlist_print (svalue, stream, format, deref_ref, recurse, pretty)
|
scm_scmlist_print (svalue, stream, format, deref_ref, recurse, pretty)
|
||||||
LONGEST svalue;
|
LONGEST svalue;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
int format;
|
int format;
|
||||||
int deref_ref;
|
int deref_ref;
|
||||||
int recurse;
|
int recurse;
|
||||||
|
@ -138,7 +138,7 @@ static void
|
||||||
scm_ipruk (hdr, ptr, stream)
|
scm_ipruk (hdr, ptr, stream)
|
||||||
char *hdr;
|
char *hdr;
|
||||||
LONGEST ptr;
|
LONGEST ptr;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
{
|
{
|
||||||
fprintf_filtered (stream, "#<unknown-%s", hdr);
|
fprintf_filtered (stream, "#<unknown-%s", hdr);
|
||||||
#define SCM_SIZE TYPE_LENGTH (builtin_type_scm)
|
#define SCM_SIZE TYPE_LENGTH (builtin_type_scm)
|
||||||
|
@ -151,7 +151,7 @@ scm_ipruk (hdr, ptr, stream)
|
||||||
void
|
void
|
||||||
scm_scmval_print (svalue, stream, format, deref_ref, recurse, pretty)
|
scm_scmval_print (svalue, stream, format, deref_ref, recurse, pretty)
|
||||||
LONGEST svalue;
|
LONGEST svalue;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
int format;
|
int format;
|
||||||
int deref_ref;
|
int deref_ref;
|
||||||
int recurse;
|
int recurse;
|
||||||
|
@ -382,7 +382,7 @@ scm_val_print (type, valaddr, embedded_offset, address,
|
||||||
char *valaddr;
|
char *valaddr;
|
||||||
int embedded_offset;
|
int embedded_offset;
|
||||||
CORE_ADDR address;
|
CORE_ADDR address;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
int format;
|
int format;
|
||||||
int deref_ref;
|
int deref_ref;
|
||||||
int recurse;
|
int recurse;
|
||||||
|
@ -414,7 +414,7 @@ scm_val_print (type, valaddr, embedded_offset, address,
|
||||||
int
|
int
|
||||||
scm_value_print (val, stream, format, pretty)
|
scm_value_print (val, stream, format, pretty)
|
||||||
value_ptr val;
|
value_ptr val;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
int format;
|
int format;
|
||||||
enum val_prettyprint pretty;
|
enum val_prettyprint pretty;
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Remote serial interface using Hitachi E7000 PC ISA card in a PC
|
/* 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.
|
This file is part of GDB.
|
||||||
|
|
||||||
|
@ -422,7 +422,7 @@ e7000pc_noflush_set_tty_state (scb, new_ttystate, old_ttystate)
|
||||||
static void
|
static void
|
||||||
e7000pc_print_tty_state (serial_t scb,
|
e7000pc_print_tty_state (serial_t scb,
|
||||||
serial_ttystate ttystate,
|
serial_ttystate ttystate,
|
||||||
struct gdb_file *stream)
|
struct ui_file *stream)
|
||||||
{
|
{
|
||||||
/* Nothing to print. */
|
/* Nothing to print. */
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Remote serial interface for local (hardwired) serial ports for
|
/* Remote serial interface for local (hardwired) serial ports for GO32.
|
||||||
GO32. Copyright 1992, 1993 Free Software Foundation, Inc.
|
Copyright 1992, 1993, 2000 Free Software Foundation, Inc.
|
||||||
|
|
||||||
Contributed by Nigel Stephens, Algorithmics Ltd. (nigel@algor.co.uk).
|
Contributed by Nigel Stephens, Algorithmics Ltd. (nigel@algor.co.uk).
|
||||||
|
|
||||||
|
@ -698,7 +698,7 @@ dos_flush_input (scb)
|
||||||
static void
|
static void
|
||||||
dos_print_tty_state (serial_t scb,
|
dos_print_tty_state (serial_t scb,
|
||||||
serial_ttystate ttystate,
|
serial_ttystate ttystate,
|
||||||
struct gdb_file *stream)
|
struct ui_file *stream)
|
||||||
{
|
{
|
||||||
/* Nothing to print */
|
/* Nothing to print */
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Remote serial interface for local (hardwired) serial ports for Macintosh.
|
/* 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.
|
Contributed by Cygnus Support. Written by Stan Shebs.
|
||||||
|
|
||||||
This file is part of GDB.
|
This file is part of GDB.
|
||||||
|
@ -234,7 +234,7 @@ mac_noflush_set_tty_state (scb, new_ttystate, old_ttystate)
|
||||||
static void
|
static void
|
||||||
mac_print_tty_state (serial_t scb,
|
mac_print_tty_state (serial_t scb,
|
||||||
serial_ttystate ttystate,
|
serial_ttystate ttystate,
|
||||||
struct gdb_file *stream)
|
struct ui_file *stream)
|
||||||
{
|
{
|
||||||
/* Nothing to print. */
|
/* Nothing to print. */
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/* Remote serial interface for Macraigor Systems implementation of
|
/* Remote serial interface for Macraigor Systems implementation of
|
||||||
On-Chip Debugging using serial target box or serial wiggler
|
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.
|
This file is part of GDB.
|
||||||
|
|
||||||
|
@ -132,7 +132,7 @@ ocd_noflush_set_tty_state (scb, new_ttystate, old_ttystate)
|
||||||
static void
|
static void
|
||||||
ocd_print_tty_state (serial_t scb,
|
ocd_print_tty_state (serial_t scb,
|
||||||
serial_ttystate ttystate,
|
serial_ttystate ttystate,
|
||||||
struct gdb_file *stream)
|
struct ui_file *stream)
|
||||||
{
|
{
|
||||||
/* Nothing to print. */
|
/* Nothing to print. */
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Serial interface for local (hardwired) serial ports on Un*x like systems
|
/* 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.
|
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_set_tty_state (serial_t scb, serial_ttystate state);
|
||||||
static int hardwire_noflush_set_tty_state (serial_t, serial_ttystate,
|
static int hardwire_noflush_set_tty_state (serial_t, serial_ttystate,
|
||||||
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_drain_output (serial_t);
|
||||||
static int hardwire_flush_output (serial_t);
|
static int hardwire_flush_output (serial_t);
|
||||||
static int hardwire_flush_input (serial_t);
|
static int hardwire_flush_input (serial_t);
|
||||||
|
@ -228,7 +228,7 @@ hardwire_noflush_set_tty_state (serial_t scb,
|
||||||
static void
|
static void
|
||||||
hardwire_print_tty_state (serial_t scb,
|
hardwire_print_tty_state (serial_t scb,
|
||||||
serial_ttystate ttystate,
|
serial_ttystate ttystate,
|
||||||
struct gdb_file *stream)
|
struct ui_file *stream)
|
||||||
{
|
{
|
||||||
struct hardwire_ttystate *state = (struct hardwire_ttystate *) ttystate;
|
struct hardwire_ttystate *state = (struct hardwire_ttystate *) ttystate;
|
||||||
int i;
|
int i;
|
||||||
|
@ -1046,7 +1046,7 @@ ser_unix_nop_noflush_set_tty_state (serial_t scb,
|
||||||
void
|
void
|
||||||
ser_unix_nop_print_tty_state (serial_t scb,
|
ser_unix_nop_print_tty_state (serial_t scb,
|
||||||
serial_ttystate ttystate,
|
serial_ttystate ttystate,
|
||||||
struct gdb_file *stream)
|
struct ui_file *stream)
|
||||||
{
|
{
|
||||||
/* Nothing to print. */
|
/* Nothing to print. */
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Serial interface for UN*X file-descriptor based connection.
|
/* 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.
|
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 void ser_unix_nop_raw (serial_t scb);
|
||||||
extern serial_ttystate ser_unix_nop_get_tty_state (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 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_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_setbaudrate (serial_t scb, int rate);
|
||||||
extern int ser_unix_nop_setstopbits (serial_t scb, int rate);
|
extern int ser_unix_nop_setstopbits (serial_t scb, int rate);
|
||||||
|
|
12
gdb/serial.c
12
gdb/serial.c
|
@ -1,5 +1,5 @@
|
||||||
/* Generic serial interface routines
|
/* 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.
|
This file is part of GDB.
|
||||||
|
|
||||||
|
@ -46,10 +46,10 @@ static serial_t scb_base;
|
||||||
suitable for playback by gdbserver. */
|
suitable for playback by gdbserver. */
|
||||||
|
|
||||||
static char *serial_logfile = NULL;
|
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 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_hex[] = "hex";
|
||||||
static char logbase_octal[] = "octal";
|
static char logbase_octal[] = "octal";
|
||||||
static char logbase_ascii[] = "ascii";
|
static char logbase_ascii[] = "ascii";
|
||||||
|
@ -68,7 +68,7 @@ static int serial_current_type = 0;
|
||||||
#define SERIAL_BREAK 1235
|
#define SERIAL_BREAK 1235
|
||||||
|
|
||||||
static void
|
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)
|
if (ch_type != serial_current_type)
|
||||||
{
|
{
|
||||||
|
@ -288,7 +288,7 @@ do_serial_close (serial_t scb, int really_close)
|
||||||
serial_current_type = 0;
|
serial_current_type = 0;
|
||||||
|
|
||||||
/* XXX - What if serial_logfp == gdb_stdout or gdb_stderr? */
|
/* XXX - What if serial_logfp == gdb_stdout or gdb_stderr? */
|
||||||
gdb_file_delete (serial_logfp);
|
ui_file_delete (serial_logfp);
|
||||||
serial_logfp = NULL;
|
serial_logfp = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -449,7 +449,7 @@ serial_set_tty_state (serial_t scb, serial_ttystate ttystate)
|
||||||
void
|
void
|
||||||
serial_print_tty_state (serial_t scb,
|
serial_print_tty_state (serial_t scb,
|
||||||
serial_ttystate ttystate,
|
serial_ttystate ttystate,
|
||||||
struct gdb_file *stream)
|
struct ui_file *stream)
|
||||||
{
|
{
|
||||||
scb->ops->print_tty_state (scb, ttystate, stream);
|
scb->ops->print_tty_state (scb, ttystate, stream);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Remote serial support interface definitions for GDB, the GNU Debugger.
|
/* 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.
|
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
|
the specified STREAM. FIXME: At present this sends output to the
|
||||||
default stream - GDB_STDOUT. */
|
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))
|
#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
|
/* Set the tty state to NEW_TTYSTATE, where OLD_TTYSTATE is the
|
||||||
|
@ -238,7 +238,7 @@ struct serial_ops
|
||||||
void (*go_raw) (serial_t);
|
void (*go_raw) (serial_t);
|
||||||
serial_ttystate (*get_tty_state) (serial_t);
|
serial_ttystate (*get_tty_state) (serial_t);
|
||||||
int (*set_tty_state) (serial_t, serial_ttystate);
|
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 (*noflush_set_tty_state) (serial_t, serial_ttystate, serial_ttystate);
|
||||||
int (*setbaudrate) (serial_t, int rate);
|
int (*setbaudrate) (serial_t, int rate);
|
||||||
int (*setstopbits) (serial_t, int num);
|
int (*setstopbits) (serial_t, int num);
|
||||||
|
|
39
gdb/stack.c
39
gdb/stack.c
|
@ -1,6 +1,5 @@
|
||||||
/* Print and select stack frames for GDB, the GNU debugger.
|
/* Print and select stack frames for GDB, the GNU debugger.
|
||||||
Copyright 1986, 87, 89, 91, 92, 93, 94, 95, 96, 98, 1999, 2000
|
Copyright 1986, 1987, 1989, 1991-1996, 1998-2000 Free Software Foundation, Inc.
|
||||||
Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
This file is part of GDB.
|
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 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 catch_info PARAMS ((char *, int));
|
||||||
|
|
||||||
static void args_plus_locals_info PARAMS ((char *, int));
|
static void args_plus_locals_info PARAMS ((char *, int));
|
||||||
|
|
||||||
static void print_frame_label_vars PARAMS ((struct frame_info *,
|
static void print_frame_label_vars (struct frame_info *, int,
|
||||||
int,
|
struct ui_file *);
|
||||||
GDB_FILE *));
|
|
||||||
|
|
||||||
static void print_frame_local_vars PARAMS ((struct frame_info *,
|
static void print_frame_local_vars (struct frame_info *, int,
|
||||||
int,
|
struct ui_file *);
|
||||||
GDB_FILE *));
|
|
||||||
|
|
||||||
static int print_block_frame_labels PARAMS ((struct block *, int *,
|
static int print_block_frame_labels (struct block *, int *,
|
||||||
GDB_FILE *));
|
struct ui_file *);
|
||||||
|
|
||||||
static int print_block_frame_locals PARAMS ((struct block *,
|
static int print_block_frame_locals (struct block *,
|
||||||
struct frame_info *,
|
struct frame_info *,
|
||||||
int,
|
int,
|
||||||
GDB_FILE *));
|
struct ui_file *);
|
||||||
|
|
||||||
static void print_frame (struct frame_info *fi,
|
static void print_frame (struct frame_info *fi,
|
||||||
int level,
|
int level,
|
||||||
|
@ -314,7 +311,7 @@ struct print_args_args
|
||||||
{
|
{
|
||||||
struct symbol *func;
|
struct symbol *func;
|
||||||
struct frame_info *fi;
|
struct frame_info *fi;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
};
|
};
|
||||||
|
|
||||||
static int print_args_stub PARAMS ((PTR));
|
static int print_args_stub PARAMS ((PTR));
|
||||||
|
@ -1189,7 +1186,7 @@ print_block_frame_locals (b, fi, num_tabs, stream)
|
||||||
struct block *b;
|
struct block *b;
|
||||||
register struct frame_info *fi;
|
register struct frame_info *fi;
|
||||||
int num_tabs;
|
int num_tabs;
|
||||||
register GDB_FILE *stream;
|
register struct ui_file *stream;
|
||||||
{
|
{
|
||||||
int nsyms;
|
int nsyms;
|
||||||
register int i, j;
|
register int i, j;
|
||||||
|
@ -1230,7 +1227,7 @@ static int
|
||||||
print_block_frame_labels (b, have_default, stream)
|
print_block_frame_labels (b, have_default, stream)
|
||||||
struct block *b;
|
struct block *b;
|
||||||
int *have_default;
|
int *have_default;
|
||||||
register GDB_FILE *stream;
|
register struct ui_file *stream;
|
||||||
{
|
{
|
||||||
int nsyms;
|
int nsyms;
|
||||||
register int i;
|
register int i;
|
||||||
|
@ -1278,7 +1275,7 @@ static void
|
||||||
print_frame_local_vars (fi, num_tabs, stream)
|
print_frame_local_vars (fi, num_tabs, stream)
|
||||||
register struct frame_info *fi;
|
register struct frame_info *fi;
|
||||||
register int num_tabs;
|
register int num_tabs;
|
||||||
register GDB_FILE *stream;
|
register struct ui_file *stream;
|
||||||
{
|
{
|
||||||
register struct block *block = get_frame_block (fi);
|
register struct block *block = get_frame_block (fi);
|
||||||
register int values_printed = 0;
|
register int values_printed = 0;
|
||||||
|
@ -1313,7 +1310,7 @@ static void
|
||||||
print_frame_label_vars (fi, this_level_only, stream)
|
print_frame_label_vars (fi, this_level_only, stream)
|
||||||
register struct frame_info *fi;
|
register struct frame_info *fi;
|
||||||
int this_level_only;
|
int this_level_only;
|
||||||
register GDB_FILE *stream;
|
register struct ui_file *stream;
|
||||||
{
|
{
|
||||||
register struct blockvector *bl;
|
register struct blockvector *bl;
|
||||||
register struct block *block = get_frame_block (fi);
|
register struct block *block = get_frame_block (fi);
|
||||||
|
@ -1423,7 +1420,7 @@ catch_info (ignore, from_tty)
|
||||||
static void
|
static void
|
||||||
print_frame_arg_vars (fi, stream)
|
print_frame_arg_vars (fi, stream)
|
||||||
register struct frame_info *fi;
|
register struct frame_info *fi;
|
||||||
register GDB_FILE *stream;
|
register struct ui_file *stream;
|
||||||
{
|
{
|
||||||
struct symbol *func = get_frame_function (fi);
|
struct symbol *func = get_frame_function (fi);
|
||||||
register struct block *b;
|
register struct block *b;
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
/* Generic symbol file reading for the GNU debugger, GDB.
|
/* Generic symbol file reading for the GNU debugger, GDB.
|
||||||
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998
|
Copyright 1990-1996, 1998, 2000 Free Software Foundation, Inc.
|
||||||
Free Software Foundation, Inc.
|
|
||||||
Contributed by Cygnus Support, using pieces from other GDB modules.
|
Contributed by Cygnus Support, using pieces from other GDB modules.
|
||||||
|
|
||||||
This file is part of GDB.
|
This file is part of GDB.
|
||||||
|
@ -1400,7 +1399,7 @@ report_transfer_performance (data_count, start_time, end_time)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
print_transfer_performance (struct gdb_file *stream,
|
print_transfer_performance (struct ui_file *stream,
|
||||||
unsigned long data_count,
|
unsigned long data_count,
|
||||||
unsigned long write_count,
|
unsigned long write_count,
|
||||||
unsigned long time_count)
|
unsigned long time_count)
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
/* Do various things to symbol tables (other than lookup), for GDB.
|
/* Do various things to symbol tables (other than lookup), for GDB.
|
||||||
Copyright 1986, 87, 89, 91, 92, 93, 94, 95, 96, 1998
|
Copyright 1986, 1987, 1989, 1991-1996, 1998, 2000 Free Software Foundation, Inc.
|
||||||
Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
This file is part of GDB.
|
This file is part of GDB.
|
||||||
|
|
||||||
|
@ -49,20 +48,20 @@ FILE *std_err;
|
||||||
|
|
||||||
/* Prototypes for local functions */
|
/* Prototypes for local functions */
|
||||||
|
|
||||||
static void dump_symtab PARAMS ((struct objfile *, struct symtab *,
|
static void dump_symtab (struct objfile *, struct symtab *,
|
||||||
GDB_FILE *));
|
struct ui_file *);
|
||||||
|
|
||||||
static void dump_psymtab PARAMS ((struct objfile *, struct partial_symtab *,
|
static void dump_psymtab (struct objfile *, struct partial_symtab *,
|
||||||
GDB_FILE *));
|
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 void dump_objfile PARAMS ((struct objfile *));
|
||||||
|
|
||||||
static int block_depth PARAMS ((struct block *));
|
static int block_depth PARAMS ((struct block *));
|
||||||
|
|
||||||
static void print_partial_symbols PARAMS ((struct partial_symbol **, int,
|
static void print_partial_symbols (struct partial_symbol **, int,
|
||||||
char *, GDB_FILE *));
|
char *, struct ui_file *);
|
||||||
|
|
||||||
static void free_symtab_block PARAMS ((struct objfile *, struct block *));
|
static void free_symtab_block PARAMS ((struct objfile *, struct block *));
|
||||||
|
|
||||||
|
@ -72,7 +71,7 @@ struct print_symbol_args
|
||||||
{
|
{
|
||||||
struct symbol *symbol;
|
struct symbol *symbol;
|
||||||
int depth;
|
int depth;
|
||||||
GDB_FILE *outfile;
|
struct ui_file *outfile;
|
||||||
};
|
};
|
||||||
|
|
||||||
static int print_symbol PARAMS ((PTR));
|
static int print_symbol PARAMS ((PTR));
|
||||||
|
@ -269,7 +268,7 @@ dump_objfile (objfile)
|
||||||
static void
|
static void
|
||||||
dump_msymbols (objfile, outfile)
|
dump_msymbols (objfile, outfile)
|
||||||
struct objfile *objfile;
|
struct objfile *objfile;
|
||||||
GDB_FILE *outfile;
|
struct ui_file *outfile;
|
||||||
{
|
{
|
||||||
struct minimal_symbol *msymbol;
|
struct minimal_symbol *msymbol;
|
||||||
int index;
|
int index;
|
||||||
|
@ -346,7 +345,7 @@ static void
|
||||||
dump_psymtab (objfile, psymtab, outfile)
|
dump_psymtab (objfile, psymtab, outfile)
|
||||||
struct objfile *objfile;
|
struct objfile *objfile;
|
||||||
struct partial_symtab *psymtab;
|
struct partial_symtab *psymtab;
|
||||||
GDB_FILE *outfile;
|
struct ui_file *outfile;
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -415,7 +414,7 @@ static void
|
||||||
dump_symtab (objfile, symtab, outfile)
|
dump_symtab (objfile, symtab, outfile)
|
||||||
struct objfile *objfile;
|
struct objfile *objfile;
|
||||||
struct symtab *symtab;
|
struct symtab *symtab;
|
||||||
GDB_FILE *outfile;
|
struct ui_file *outfile;
|
||||||
{
|
{
|
||||||
register int i, j;
|
register int i, j;
|
||||||
int len, blen;
|
int len, blen;
|
||||||
|
@ -507,7 +506,7 @@ maintenance_print_symbols (args, from_tty)
|
||||||
int from_tty;
|
int from_tty;
|
||||||
{
|
{
|
||||||
char **argv;
|
char **argv;
|
||||||
GDB_FILE *outfile;
|
struct ui_file *outfile;
|
||||||
struct cleanup *cleanups;
|
struct cleanup *cleanups;
|
||||||
char *symname = NULL;
|
char *symname = NULL;
|
||||||
char *filename = DEV_TTY;
|
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);
|
outfile = gdb_fopen (filename, FOPEN_WT);
|
||||||
if (outfile == 0)
|
if (outfile == 0)
|
||||||
perror_with_name (filename);
|
perror_with_name (filename);
|
||||||
make_cleanup_gdb_file_delete (outfile);
|
make_cleanup_ui_file_delete (outfile);
|
||||||
|
|
||||||
immediate_quit++;
|
immediate_quit++;
|
||||||
ALL_SYMTABS (objfile, s)
|
ALL_SYMTABS (objfile, s)
|
||||||
|
@ -564,7 +563,7 @@ print_symbol (args)
|
||||||
{
|
{
|
||||||
struct symbol *symbol = ((struct print_symbol_args *) args)->symbol;
|
struct symbol *symbol = ((struct print_symbol_args *) args)->symbol;
|
||||||
int depth = ((struct print_symbol_args *) args)->depth;
|
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);
|
print_spaces (depth, outfile);
|
||||||
if (SYMBOL_NAMESPACE (symbol) == LABEL_NAMESPACE)
|
if (SYMBOL_NAMESPACE (symbol) == LABEL_NAMESPACE)
|
||||||
|
@ -745,7 +744,7 @@ maintenance_print_psymbols (args, from_tty)
|
||||||
int from_tty;
|
int from_tty;
|
||||||
{
|
{
|
||||||
char **argv;
|
char **argv;
|
||||||
GDB_FILE *outfile;
|
struct ui_file *outfile;
|
||||||
struct cleanup *cleanups;
|
struct cleanup *cleanups;
|
||||||
char *symname = NULL;
|
char *symname = NULL;
|
||||||
char *filename = DEV_TTY;
|
char *filename = DEV_TTY;
|
||||||
|
@ -780,7 +779,7 @@ maintenance_print_psymbols (args, from_tty)
|
||||||
outfile = gdb_fopen (filename, FOPEN_WT);
|
outfile = gdb_fopen (filename, FOPEN_WT);
|
||||||
if (outfile == 0)
|
if (outfile == 0)
|
||||||
perror_with_name (filename);
|
perror_with_name (filename);
|
||||||
make_cleanup_gdb_file_delete (outfile);
|
make_cleanup_ui_file_delete (outfile);
|
||||||
|
|
||||||
immediate_quit++;
|
immediate_quit++;
|
||||||
ALL_PSYMTABS (objfile, ps)
|
ALL_PSYMTABS (objfile, ps)
|
||||||
|
@ -795,7 +794,7 @@ print_partial_symbols (p, count, what, outfile)
|
||||||
struct partial_symbol **p;
|
struct partial_symbol **p;
|
||||||
int count;
|
int count;
|
||||||
char *what;
|
char *what;
|
||||||
GDB_FILE *outfile;
|
struct ui_file *outfile;
|
||||||
{
|
{
|
||||||
fprintf_filtered (outfile, " %s partial symbols:\n", what);
|
fprintf_filtered (outfile, " %s partial symbols:\n", what);
|
||||||
while (count-- > 0)
|
while (count-- > 0)
|
||||||
|
@ -894,7 +893,7 @@ maintenance_print_msymbols (args, from_tty)
|
||||||
int from_tty;
|
int from_tty;
|
||||||
{
|
{
|
||||||
char **argv;
|
char **argv;
|
||||||
GDB_FILE *outfile;
|
struct ui_file *outfile;
|
||||||
struct cleanup *cleanups;
|
struct cleanup *cleanups;
|
||||||
char *filename = DEV_TTY;
|
char *filename = DEV_TTY;
|
||||||
char *symname = NULL;
|
char *symname = NULL;
|
||||||
|
@ -928,7 +927,7 @@ maintenance_print_msymbols (args, from_tty)
|
||||||
outfile = gdb_fopen (filename, FOPEN_WT);
|
outfile = gdb_fopen (filename, FOPEN_WT);
|
||||||
if (outfile == 0)
|
if (outfile == 0)
|
||||||
perror_with_name (filename);
|
perror_with_name (filename);
|
||||||
make_cleanup_gdb_file_delete (outfile);
|
make_cleanup_ui_file_delete (outfile);
|
||||||
|
|
||||||
immediate_quit++;
|
immediate_quit++;
|
||||||
ALL_OBJFILES (objfile)
|
ALL_OBJFILES (objfile)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* OBSOLETE /* Print instructions for Tahoe target machines, for GDB. */
|
/* 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 Contributed by the State University of New York at Buffalo, by the */
|
||||||
/* OBSOLETE Distributed Computer Systems Lab, Department of Computer Science, 1991. */
|
/* OBSOLETE Distributed Computer Systems Lab, Department of Computer Science, 1991. */
|
||||||
/* OBSOLETE */
|
/* OBSOLETE */
|
||||||
|
@ -78,7 +78,7 @@
|
||||||
/* OBSOLETE int */
|
/* OBSOLETE int */
|
||||||
/* OBSOLETE tahoe_print_insn (memaddr, stream) */
|
/* OBSOLETE tahoe_print_insn (memaddr, stream) */
|
||||||
/* OBSOLETE CORE_ADDR memaddr; */
|
/* OBSOLETE CORE_ADDR memaddr; */
|
||||||
/* OBSOLETE GDB_FILE *stream; */
|
/* OBSOLETE struct ui_file *stream; */
|
||||||
/* OBSOLETE { */
|
/* OBSOLETE { */
|
||||||
/* OBSOLETE unsigned char buffer[MAXLEN]; */
|
/* OBSOLETE unsigned char buffer[MAXLEN]; */
|
||||||
/* OBSOLETE register int i; */
|
/* OBSOLETE register int i; */
|
||||||
|
@ -124,7 +124,7 @@
|
||||||
/* OBSOLETE char *d; */
|
/* OBSOLETE char *d; */
|
||||||
/* OBSOLETE register char *p; */
|
/* OBSOLETE register char *p; */
|
||||||
/* OBSOLETE CORE_ADDR addr; */
|
/* OBSOLETE CORE_ADDR addr; */
|
||||||
/* OBSOLETE GDB_FILE *stream; */
|
/* OBSOLETE struct ui_file *stream; */
|
||||||
/* OBSOLETE { */
|
/* OBSOLETE { */
|
||||||
/* OBSOLETE int temp1 = 0; */
|
/* OBSOLETE int temp1 = 0; */
|
||||||
/* OBSOLETE register int regnum = *p & 0xf; */
|
/* OBSOLETE register int regnum = *p & 0xf; */
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Select target systems and architectures at runtime for GDB.
|
/* 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.
|
Contributed by Cygnus Support.
|
||||||
|
|
||||||
This file is part of GDB.
|
This file is part of GDB.
|
||||||
|
@ -549,7 +549,7 @@ cleanup_target (t)
|
||||||
(int (*) (int, char *, char *, int *))
|
(int (*) (int, char *, char *, int *))
|
||||||
return_zero);
|
return_zero);
|
||||||
de_fault (to_rcmd,
|
de_fault (to_rcmd,
|
||||||
(void (*) (char *, struct gdb_file *))
|
(void (*) (char *, struct ui_file *))
|
||||||
tcomplain);
|
tcomplain);
|
||||||
de_fault (to_enable_exception_callback,
|
de_fault (to_enable_exception_callback,
|
||||||
(struct symtab_and_line * (*) (enum exception_event_kind, int))
|
(struct symtab_and_line * (*) (enum exception_event_kind, int))
|
||||||
|
@ -2892,7 +2892,7 @@ debug_to_query (type, req, resp, siz)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
debug_to_rcmd (char *command,
|
debug_to_rcmd (char *command,
|
||||||
struct gdb_file *outbuf)
|
struct ui_file *outbuf)
|
||||||
{
|
{
|
||||||
debug_target.to_rcmd (command, outbuf);
|
debug_target.to_rcmd (command, outbuf);
|
||||||
fprintf_unfiltered (gdb_stdlog, "target_rcmd (%s, ...)\n", command);
|
fprintf_unfiltered (gdb_stdlog, "target_rcmd (%s, ...)\n", command);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Interface between GDB and target environments, including files and processes
|
/* 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.
|
Contributed by Cygnus Support. Written by John Gilmore.
|
||||||
|
|
||||||
This file is part of GDB.
|
This file is part of GDB.
|
||||||
|
@ -425,7 +425,7 @@ struct target_ops
|
||||||
char *(*to_extra_thread_info) PARAMS ((struct thread_info *));
|
char *(*to_extra_thread_info) PARAMS ((struct thread_info *));
|
||||||
void (*to_stop) PARAMS ((void));
|
void (*to_stop) PARAMS ((void));
|
||||||
int (*to_query) PARAMS ((int /*char */ , char *, char *, int *));
|
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 symtab_and_line *(*to_enable_exception_callback) PARAMS ((enum exception_event_kind, int));
|
||||||
struct exception_event_record *(*to_get_current_exception_event) PARAMS ((void));
|
struct exception_event_record *(*to_get_current_exception_event) PARAMS ((void));
|
||||||
char *(*to_pid_to_exec_file) PARAMS ((int pid));
|
char *(*to_pid_to_exec_file) PARAMS ((int pid));
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
/* Top level stuff for GDB, the GNU debugger.
|
/* Top level stuff for GDB, the GNU debugger.
|
||||||
Copyright 1986, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 1999
|
Copyright 1986-2000 Free Software Foundation, Inc.
|
||||||
Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
This file is part of GDB.
|
This file is part of GDB.
|
||||||
|
|
||||||
|
@ -840,7 +839,7 @@ void
|
||||||
print_command_line (cmd, depth, stream)
|
print_command_line (cmd, depth, stream)
|
||||||
struct command_line *cmd;
|
struct command_line *cmd;
|
||||||
unsigned int depth;
|
unsigned int depth;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
{
|
{
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
|
|
||||||
|
@ -2970,7 +2969,7 @@ document_command (comname, from_tty)
|
||||||
/* Print the GDB banner. */
|
/* Print the GDB banner. */
|
||||||
void
|
void
|
||||||
print_gdb_version (stream)
|
print_gdb_version (stream)
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
{
|
{
|
||||||
/* From GNU coding standards, first line is meant to be easy for a
|
/* From GNU coding standards, first line is meant to be easy for a
|
||||||
program to parse, and is just canonical program name and version
|
program to parse, and is just canonical program name and version
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
/* Top level stuff for GDB, the GNU debugger.
|
/* Top level stuff for GDB, the GNU debugger.
|
||||||
Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994
|
Copyright 1986-1994, 2000 Free Software Foundation, Inc.
|
||||||
Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
This file is part of GDB.
|
This file is part of GDB.
|
||||||
|
|
||||||
|
@ -28,7 +27,7 @@ extern int inhibit_gdbinit;
|
||||||
extern int epoch_interface;
|
extern int epoch_interface;
|
||||||
extern char gdbinit[];
|
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 source_command PARAMS ((char *, int));
|
||||||
extern void cd_command PARAMS ((char *, int));
|
extern void cd_command PARAMS ((char *, int));
|
||||||
|
|
|
@ -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>
|
Mon Jan 31 18:12:43 2000 Andrew Cagney <cagney@b1.cygnus.com>
|
||||||
|
|
||||||
* tui-file.c (enum streamtype, struct tui_stream, tui_file_new,
|
* tui-file.c (enum streamtype, struct tui_stream, tui_file_new,
|
||||||
|
|
|
@ -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.
|
Copyright (C) 1999, 2000 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GDB.
|
This file is part of GDB.
|
||||||
|
@ -19,16 +19,17 @@
|
||||||
Boston, MA 02111-1307, USA. */
|
Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
#include "defs.h"
|
#include "defs.h"
|
||||||
#include "gdb-file.h"
|
#include "ui-file.h"
|
||||||
#include "tui/tui-file.h"
|
#include "tui/tui-file.h"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
/* Called instead of fputs for all TUI_FILE output. */
|
/* 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. */
|
code. */
|
||||||
|
|
||||||
/* new */
|
/* new */
|
||||||
|
@ -48,35 +49,35 @@ struct tui_stream
|
||||||
int ts_buflen;
|
int ts_buflen;
|
||||||
};
|
};
|
||||||
|
|
||||||
static gdb_file_flush_ftype tui_file_flush;
|
static ui_file_flush_ftype tui_file_flush;
|
||||||
extern gdb_file_fputs_ftype tui_file_fputs;
|
extern ui_file_fputs_ftype tui_file_fputs;
|
||||||
static gdb_file_isatty_ftype tui_file_isatty;
|
static ui_file_isatty_ftype tui_file_isatty;
|
||||||
static gdb_file_rewind_ftype tui_file_rewind;
|
static ui_file_rewind_ftype tui_file_rewind;
|
||||||
static gdb_file_put_ftype tui_file_put;
|
static ui_file_put_ftype tui_file_put;
|
||||||
static gdb_file_delete_ftype tui_file_delete;
|
static ui_file_delete_ftype tui_file_delete;
|
||||||
static struct gdb_file *tui_file_new PARAMS ((void));
|
static struct ui_file *tui_file_new PARAMS ((void));
|
||||||
static int tui_file_magic;
|
static int tui_file_magic;
|
||||||
|
|
||||||
static struct gdb_file *
|
static struct ui_file *
|
||||||
tui_file_new ()
|
tui_file_new ()
|
||||||
{
|
{
|
||||||
struct tui_stream *tui = xmalloc (sizeof (struct tui_stream));
|
struct tui_stream *tui = xmalloc (sizeof (struct tui_stream));
|
||||||
struct gdb_file *file = gdb_file_new ();
|
struct ui_file *file = ui_file_new ();
|
||||||
set_gdb_file_data (file, tui, tui_file_delete);
|
set_ui_file_data (file, tui, tui_file_delete);
|
||||||
set_gdb_file_flush (file, tui_file_flush);
|
set_ui_file_flush (file, tui_file_flush);
|
||||||
set_gdb_file_fputs (file, tui_file_fputs);
|
set_ui_file_fputs (file, tui_file_fputs);
|
||||||
set_gdb_file_isatty (file, tui_file_isatty);
|
set_ui_file_isatty (file, tui_file_isatty);
|
||||||
set_gdb_file_rewind (file, tui_file_rewind);
|
set_ui_file_rewind (file, tui_file_rewind);
|
||||||
set_gdb_file_put (file, tui_file_put);
|
set_ui_file_put (file, tui_file_put);
|
||||||
tui->ts_magic = &tui_file_magic;
|
tui->ts_magic = &tui_file_magic;
|
||||||
return file;
|
return file;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
tui_file_delete (file)
|
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)
|
if (tmpstream->ts_magic != &tui_file_magic)
|
||||||
internal_error ("tui_file_delete: bad magic number");
|
internal_error ("tui_file_delete: bad magic number");
|
||||||
if ((tmpstream->ts_streamtype == astring) &&
|
if ((tmpstream->ts_streamtype == astring) &&
|
||||||
|
@ -87,12 +88,12 @@ tui_file_delete (file)
|
||||||
free (tmpstream);
|
free (tmpstream);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct gdb_file *
|
struct ui_file *
|
||||||
tui_fileopen (stream)
|
tui_fileopen (stream)
|
||||||
FILE *stream;
|
FILE *stream;
|
||||||
{
|
{
|
||||||
struct gdb_file *file = tui_file_new ();
|
struct ui_file *file = tui_file_new ();
|
||||||
struct tui_stream *tmpstream = gdb_file_data (file);
|
struct tui_stream *tmpstream = ui_file_data (file);
|
||||||
tmpstream->ts_streamtype = afile;
|
tmpstream->ts_streamtype = afile;
|
||||||
tmpstream->ts_filestream = stream;
|
tmpstream->ts_filestream = stream;
|
||||||
tmpstream->ts_strbuf = NULL;
|
tmpstream->ts_strbuf = NULL;
|
||||||
|
@ -100,12 +101,12 @@ tui_fileopen (stream)
|
||||||
return file;
|
return file;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct gdb_file *
|
struct ui_file *
|
||||||
tui_sfileopen (n)
|
tui_sfileopen (n)
|
||||||
int n;
|
int n;
|
||||||
{
|
{
|
||||||
struct gdb_file *file = tui_file_new ();
|
struct ui_file *file = tui_file_new ();
|
||||||
struct tui_stream *tmpstream = gdb_file_data (file);
|
struct tui_stream *tmpstream = ui_file_data (file);
|
||||||
tmpstream->ts_streamtype = astring;
|
tmpstream->ts_streamtype = astring;
|
||||||
tmpstream->ts_filestream = NULL;
|
tmpstream->ts_filestream = NULL;
|
||||||
if (n > 0)
|
if (n > 0)
|
||||||
|
@ -123,9 +124,9 @@ tui_sfileopen (n)
|
||||||
|
|
||||||
static int
|
static int
|
||||||
tui_file_isatty (file)
|
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)
|
if (stream->ts_magic != &tui_file_magic)
|
||||||
internal_error ("tui_file_isatty: bad magic number");
|
internal_error ("tui_file_isatty: bad magic number");
|
||||||
if (stream->ts_streamtype == afile)
|
if (stream->ts_streamtype == afile)
|
||||||
|
@ -136,20 +137,20 @@ tui_file_isatty (file)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
tui_file_rewind (file)
|
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)
|
if (stream->ts_magic != &tui_file_magic)
|
||||||
internal_error ("tui_file_rewind: bad magic number");
|
internal_error ("tui_file_rewind: bad magic number");
|
||||||
stream->ts_strbuf[0] = '\0';
|
stream->ts_strbuf[0] = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
tui_file_put (struct gdb_file *file,
|
tui_file_put (struct ui_file *file,
|
||||||
gdb_file_put_method_ftype *write,
|
ui_file_put_method_ftype *write,
|
||||||
void *dest)
|
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)
|
if (stream->ts_magic != &tui_file_magic)
|
||||||
internal_error ("tui_file_put: bad magic number");
|
internal_error ("tui_file_put: bad magic number");
|
||||||
if (stream->ts_streamtype == astring)
|
if (stream->ts_streamtype == astring)
|
||||||
|
@ -168,15 +169,15 @@ tui_file_put (struct gdb_file *file,
|
||||||
void
|
void
|
||||||
tui_file_fputs (linebuffer, file)
|
tui_file_fputs (linebuffer, file)
|
||||||
const char *linebuffer;
|
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)
|
#if defined(TUI)
|
||||||
extern int tui_owns_terminal;
|
extern int tui_owns_terminal;
|
||||||
#endif
|
#endif
|
||||||
/* NOTE: cagney/1999-10-13: The use of fputs_unfiltered_hook is
|
/* NOTE: cagney/1999-10-13: The use of fputs_unfiltered_hook is
|
||||||
seriously discouraged. Those wanting to hook output should
|
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(). */
|
also tui_file_flush(). */
|
||||||
if (fputs_unfiltered_hook
|
if (fputs_unfiltered_hook
|
||||||
&& (file == gdb_stdout
|
&& (file == gdb_stdout
|
||||||
|
@ -235,9 +236,9 @@ tui_file_fputs (linebuffer, file)
|
||||||
}
|
}
|
||||||
|
|
||||||
char *
|
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)
|
if (stream->ts_magic != &tui_file_magic)
|
||||||
internal_error ("tui_file_get_strbuf: bad magic number");
|
internal_error ("tui_file_get_strbuf: bad magic number");
|
||||||
return (stream->ts_strbuf);
|
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
|
/* adjust the length of the buffer by the amount necessary
|
||||||
to accomodate appending a string of length N to the buffer contents */
|
to accomodate appending a string of length N to the buffer contents */
|
||||||
void
|
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;
|
int non_null_chars;
|
||||||
if (stream->ts_magic != &tui_file_magic)
|
if (stream->ts_magic != &tui_file_magic)
|
||||||
internal_error ("tui_file_adjust_strbuf: bad magic number");
|
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
|
static void
|
||||||
tui_file_flush (file)
|
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)
|
if (stream->ts_magic != &tui_file_magic)
|
||||||
internal_error ("tui_file_flush: bad magic number");
|
internal_error ("tui_file_flush: bad magic number");
|
||||||
|
|
||||||
/* NOTE: cagney/1999-10-12: If we've been linked with code that uses
|
/* 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
|
fputs_unfiltered_hook then we assume that it doesn't need to know
|
||||||
about flushes. Code that does need to know about flushes can
|
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)
|
if (fputs_unfiltered_hook)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -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.
|
Copyright (C) 1999, 2000 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GDB.
|
This file is part of GDB.
|
||||||
|
@ -21,14 +21,14 @@
|
||||||
#ifndef TUI_FILE_H
|
#ifndef TUI_FILE_H
|
||||||
#define TUI_FILE_H
|
#define TUI_FILE_H
|
||||||
|
|
||||||
extern struct gdb_file *tui_fileopen (FILE *);
|
extern struct ui_file *tui_fileopen (FILE *);
|
||||||
extern struct gdb_file *tui_sfileopen (int);
|
extern struct ui_file *tui_sfileopen (int);
|
||||||
extern char *tui_file_get_strbuf (struct gdb_file *);
|
extern char *tui_file_get_strbuf (struct ui_file *);
|
||||||
extern void tui_file_adjust_strbuf (int, struct gdb_file *);
|
extern void tui_file_adjust_strbuf (int, struct ui_file *);
|
||||||
|
|
||||||
/* NOTE: cagney/1999-10-14: fputs_unfiltered_hook is deprecated. Code
|
/* NOTE: cagney/1999-10-14: fputs_unfiltered_hook is deprecated. Code
|
||||||
wanting to control GDB's output should override the gdb_std...
|
wanting to control GDB's output should override the gdb_std...
|
||||||
files. */
|
files. */
|
||||||
extern void (*fputs_unfiltered_hook) (const char *linebuffer,
|
extern void (*fputs_unfiltered_hook) (const char *linebuffer,
|
||||||
GDB_FILE * stream);
|
struct ui_file * stream);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -43,7 +43,7 @@ tuiSetDisassemContent (s, startAddr)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
TuiStatus ret = TUI_FAILURE;
|
TuiStatus ret = TUI_FAILURE;
|
||||||
GDB_FILE *gdb_dis_out;
|
struct ui_file *gdb_dis_out;
|
||||||
|
|
||||||
if (startAddr != (Opaque) NULL)
|
if (startAddr != (Opaque) NULL)
|
||||||
{
|
{
|
||||||
|
@ -65,7 +65,7 @@ tuiSetDisassemContent (s, startAddr)
|
||||||
lineWidth = disassemWin->generic.width - 1;
|
lineWidth = disassemWin->generic.width - 1;
|
||||||
threshold = (lineWidth - 1) + offset;
|
threshold = (lineWidth - 1) + offset;
|
||||||
|
|
||||||
/* now init the gdb_file structure */
|
/* now init the ui_file structure */
|
||||||
gdb_dis_out = tui_sfileopen (threshold);
|
gdb_dis_out = tui_sfileopen (threshold);
|
||||||
|
|
||||||
INIT_DISASSEMBLE_INFO_NO_ARCH (asmInfo, gdb_dis_out, (fprintf_ftype) fprintf_filtered);
|
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 */
|
/* reset the buffer to empty */
|
||||||
tui_file_get_strbuf (gdb_dis_out)[0] = '\0';
|
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;
|
gdb_dis_out = NULL;
|
||||||
disassemWin->generic.contentSize = curLine;
|
disassemWin->generic.contentSize = curLine;
|
||||||
ret = TUI_SUCCESS;
|
ret = TUI_SUCCESS;
|
||||||
|
|
|
@ -50,11 +50,11 @@ void
|
||||||
#ifdef __STDC__
|
#ifdef __STDC__
|
||||||
tuiPuts_unfiltered (
|
tuiPuts_unfiltered (
|
||||||
const char *string,
|
const char *string,
|
||||||
GDB_FILE * stream)
|
struct ui_file * stream)
|
||||||
#else
|
#else
|
||||||
tuiPuts_unfiltered (string, stream)
|
tuiPuts_unfiltered (string, stream)
|
||||||
char *string;
|
char *string;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
int len = strlen (string);
|
int len = strlen (string);
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
#include <stdio.h>
|
#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 tuiGetc PARAMS ((void));
|
||||||
extern unsigned int tuiBufferGetc PARAMS ((void));
|
extern unsigned int tuiBufferGetc PARAMS ((void));
|
||||||
extern int tuiRead PARAMS ((int, char *, int));
|
extern int tuiRead PARAMS ((int, char *, int));
|
||||||
|
|
|
@ -669,12 +669,12 @@ _tuiRegisterFormat (buf, bufLen, regNum, dataElement, precision)
|
||||||
{
|
{
|
||||||
char tmpBuf[15];
|
char tmpBuf[15];
|
||||||
char *fmt;
|
char *fmt;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
|
|
||||||
stream = tui_sfileopen (bufLen);
|
stream = tui_sfileopen (bufLen);
|
||||||
pa_do_strcat_registers_info (regNum, 0, stream, precision);
|
pa_do_strcat_registers_info (regNum, 0, stream, precision);
|
||||||
strcpy (buf, tui_file_get_strbuf (stream));
|
strcpy (buf, tui_file_get_strbuf (stream));
|
||||||
gdb_file_delete (stream);
|
ui_file_delete (stream);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
} /* _tuiRegisterFormat */
|
} /* _tuiRegisterFormat */
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Language independent support for printing types for GDB, the GNU debugger.
|
/* 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.
|
This file is part of GDB.
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ void
|
||||||
type_print (type, varstring, stream, show)
|
type_print (type, varstring, stream, show)
|
||||||
struct type *type;
|
struct type *type;
|
||||||
char *varstring;
|
char *varstring;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
int show;
|
int show;
|
||||||
{
|
{
|
||||||
LA_PRINT_TYPE (type, varstring, stream, show, 0);
|
LA_PRINT_TYPE (type, varstring, stream, show, 0);
|
||||||
|
@ -197,7 +197,7 @@ void
|
||||||
print_type_scalar (type, val, stream)
|
print_type_scalar (type, val, stream)
|
||||||
struct type *type;
|
struct type *type;
|
||||||
LONGEST val;
|
LONGEST val;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
{
|
{
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
unsigned len;
|
unsigned len;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Language independent support for printing types for GDB, the GNU debugger.
|
/* 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.
|
Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GDB.
|
This file is part of GDB.
|
||||||
|
@ -19,8 +19,7 @@
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330,
|
Foundation, Inc., 59 Temple Place - Suite 330,
|
||||||
Boston, MA 02111-1307, USA. */
|
Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
void
|
void print_type_scalar (struct type * type, LONGEST, struct ui_file *);
|
||||||
print_type_scalar PARAMS ((struct type * type, LONGEST, GDB_FILE *));
|
|
||||||
|
|
||||||
void
|
void c_type_print_varspec_suffix (struct type *, struct ui_file *, int,
|
||||||
c_type_print_varspec_suffix PARAMS ((struct type *, GDB_FILE *, int, int, int));
|
int, int);
|
||||||
|
|
511
gdb/ui-file.c
Normal file
511
gdb/ui-file.c
Normal file
|
@ -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;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ``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);
|
||||||
|
}
|
93
gdb/ui-file.h
Normal file
93
gdb/ui-file.h
Normal file
|
@ -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
|
81
gdb/utils.c
81
gdb/utils.c
|
@ -1,5 +1,6 @@
|
||||||
/* General utility routines for GDB, the GNU debugger.
|
/* 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.
|
This file is part of GDB.
|
||||||
|
|
||||||
|
@ -57,14 +58,14 @@ void (*error_begin_hook) PARAMS ((void));
|
||||||
|
|
||||||
/* Holds the last error message issued by gdb */
|
/* Holds the last error message issued by gdb */
|
||||||
|
|
||||||
static GDB_FILE *gdb_lasterr;
|
static struct ui_file *gdb_lasterr;
|
||||||
|
|
||||||
/* Prototypes for local functions */
|
/* Prototypes for local functions */
|
||||||
|
|
||||||
static void vfprintf_maybe_filtered PARAMS ((GDB_FILE *, const char *,
|
static void vfprintf_maybe_filtered (struct ui_file *, const char *,
|
||||||
va_list, int));
|
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)
|
#if defined (USE_MMALLOC) && !defined (NO_MMCHECK)
|
||||||
static void malloc_botch PARAMS ((void));
|
static void malloc_botch PARAMS ((void));
|
||||||
|
@ -79,10 +80,6 @@ set_width_command PARAMS ((char *, int, struct cmd_list_element *));
|
||||||
static void
|
static void
|
||||||
set_width PARAMS ((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,
|
/* Chain of cleanup actions established with make_cleanup,
|
||||||
to be executed if an error happens. */
|
to be executed if an error happens. */
|
||||||
|
|
||||||
|
@ -213,15 +210,15 @@ make_cleanup_freeargv (arg)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
do_gdb_file_delete (void *arg)
|
do_ui_file_delete (void *arg)
|
||||||
{
|
{
|
||||||
gdb_file_delete (arg);
|
ui_file_delete (arg);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct cleanup *
|
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 *
|
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
|
va_list twice which works on some platforms and fails miserably on
|
||||||
others. */
|
others. */
|
||||||
/* Save it as the last error */
|
/* Save it as the last error */
|
||||||
gdb_file_rewind (gdb_lasterr);
|
ui_file_rewind (gdb_lasterr);
|
||||||
vfprintf_filtered (gdb_lasterr, string, args);
|
vfprintf_filtered (gdb_lasterr, string, args);
|
||||||
/* Retrieve the last error and print it to gdb_stderr */
|
/* Retrieve the last error and print it to gdb_stderr */
|
||||||
err_string = error_last_message ();
|
err_string = error_last_message ();
|
||||||
|
@ -638,10 +635,10 @@ error (const char *string,...)
|
||||||
}
|
}
|
||||||
|
|
||||||
NORETURN void
|
NORETURN void
|
||||||
error_stream (GDB_FILE *stream)
|
error_stream (struct ui_file *stream)
|
||||||
{
|
{
|
||||||
long size;
|
long size;
|
||||||
char *msg = gdb_file_xstrdup (stream, &size);
|
char *msg = ui_file_xstrdup (stream, &size);
|
||||||
make_cleanup (free, msg);
|
make_cleanup (free, msg);
|
||||||
error ("%s", msg);
|
error ("%s", msg);
|
||||||
}
|
}
|
||||||
|
@ -652,7 +649,7 @@ char *
|
||||||
error_last_message (void)
|
error_last_message (void)
|
||||||
{
|
{
|
||||||
long len;
|
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 */
|
/* This is to be called by main() at the very beginning */
|
||||||
|
@ -1193,7 +1190,7 @@ mstrsave (md, ptr)
|
||||||
void
|
void
|
||||||
print_spaces (n, file)
|
print_spaces (n, file)
|
||||||
register int n;
|
register int n;
|
||||||
register GDB_FILE *file;
|
register struct ui_file *file;
|
||||||
{
|
{
|
||||||
fputs_unfiltered (n_spaces (n), file);
|
fputs_unfiltered (n_spaces (n), file);
|
||||||
}
|
}
|
||||||
|
@ -1201,7 +1198,7 @@ print_spaces (n, file)
|
||||||
/* Print a host address. */
|
/* Print a host address. */
|
||||||
|
|
||||||
void
|
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
|
/* 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
|
be call for printing things which are independent of the language
|
||||||
of the program being debugged. */
|
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
|
static void
|
||||||
printchar (c, do_fputs, do_fprintf, stream, quoter)
|
printchar (c, do_fputs, do_fprintf, stream, quoter)
|
||||||
int c;
|
int c;
|
||||||
void (*do_fputs) PARAMS ((const char *, GDB_FILE*));
|
void (*do_fputs) PARAMS ((const char *, struct ui_file*));
|
||||||
void (*do_fprintf) PARAMS ((GDB_FILE*, const char *, ...));
|
void (*do_fprintf) PARAMS ((struct ui_file*, const char *, ...));
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
int quoter;
|
int quoter;
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -1467,7 +1464,7 @@ void
|
||||||
fputstr_filtered (str, quoter, stream)
|
fputstr_filtered (str, quoter, stream)
|
||||||
const char *str;
|
const char *str;
|
||||||
int quoter;
|
int quoter;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
{
|
{
|
||||||
while (*str)
|
while (*str)
|
||||||
printchar (*str++, fputs_filtered, fprintf_filtered, stream, quoter);
|
printchar (*str++, fputs_filtered, fprintf_filtered, stream, quoter);
|
||||||
|
@ -1477,7 +1474,7 @@ void
|
||||||
fputstr_unfiltered (str, quoter, stream)
|
fputstr_unfiltered (str, quoter, stream)
|
||||||
const char *str;
|
const char *str;
|
||||||
int quoter;
|
int quoter;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
{
|
{
|
||||||
while (*str)
|
while (*str)
|
||||||
printchar (*str++, fputs_unfiltered, fprintf_unfiltered, stream, quoter);
|
printchar (*str++, fputs_unfiltered, fprintf_unfiltered, stream, quoter);
|
||||||
|
@ -1488,7 +1485,7 @@ fputstrn_unfiltered (str, n, quoter, stream)
|
||||||
const char *str;
|
const char *str;
|
||||||
int n;
|
int n;
|
||||||
int quoter;
|
int quoter;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < n; i++)
|
for (i = 0; i < n; i++)
|
||||||
|
@ -1598,7 +1595,7 @@ init_page_info ()
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
/* If the output is not a terminal, don't paginate it. */
|
/* If the output is not a terminal, don't paginate it. */
|
||||||
if (!GDB_FILE_ISATTY (gdb_stdout))
|
if (!ui_file_isatty (gdb_stdout))
|
||||||
lines_per_page = UINT_MAX;
|
lines_per_page = UINT_MAX;
|
||||||
} /* the command_line_version */
|
} /* the command_line_version */
|
||||||
set_width ();
|
set_width ();
|
||||||
|
@ -1788,7 +1785,7 @@ begin_line ()
|
||||||
static void
|
static void
|
||||||
fputs_maybe_filtered (linebuffer, stream, filter)
|
fputs_maybe_filtered (linebuffer, stream, filter)
|
||||||
const char *linebuffer;
|
const char *linebuffer;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
int filter;
|
int filter;
|
||||||
{
|
{
|
||||||
const char *lineptr;
|
const char *lineptr;
|
||||||
|
@ -1892,7 +1889,7 @@ fputs_maybe_filtered (linebuffer, stream, filter)
|
||||||
void
|
void
|
||||||
fputs_filtered (linebuffer, stream)
|
fputs_filtered (linebuffer, stream)
|
||||||
const char *linebuffer;
|
const char *linebuffer;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
{
|
{
|
||||||
fputs_maybe_filtered (linebuffer, stream, 1);
|
fputs_maybe_filtered (linebuffer, stream, 1);
|
||||||
}
|
}
|
||||||
|
@ -1902,24 +1899,24 @@ putchar_unfiltered (c)
|
||||||
int c;
|
int c;
|
||||||
{
|
{
|
||||||
char buf = c;
|
char buf = c;
|
||||||
gdb_file_write (gdb_stdout, &buf, 1);
|
ui_file_write (gdb_stdout, &buf, 1);
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
fputc_unfiltered (c, stream)
|
fputc_unfiltered (c, stream)
|
||||||
int c;
|
int c;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
{
|
{
|
||||||
char buf = c;
|
char buf = c;
|
||||||
gdb_file_write (stream, &buf, 1);
|
ui_file_write (stream, &buf, 1);
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
fputc_filtered (c, stream)
|
fputc_filtered (c, stream)
|
||||||
int c;
|
int c;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
{
|
{
|
||||||
char buf[2];
|
char buf[2];
|
||||||
|
|
||||||
|
@ -2033,7 +2030,7 @@ puts_debug (prefix, string, suffix)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
vfprintf_maybe_filtered (stream, format, args, filter)
|
vfprintf_maybe_filtered (stream, format, args, filter)
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
const char *format;
|
const char *format;
|
||||||
va_list args;
|
va_list args;
|
||||||
int filter;
|
int filter;
|
||||||
|
@ -2055,7 +2052,7 @@ vfprintf_maybe_filtered (stream, format, args, filter)
|
||||||
|
|
||||||
void
|
void
|
||||||
vfprintf_filtered (stream, format, args)
|
vfprintf_filtered (stream, format, args)
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
const char *format;
|
const char *format;
|
||||||
va_list args;
|
va_list args;
|
||||||
{
|
{
|
||||||
|
@ -2064,7 +2061,7 @@ vfprintf_filtered (stream, format, args)
|
||||||
|
|
||||||
void
|
void
|
||||||
vfprintf_unfiltered (stream, format, args)
|
vfprintf_unfiltered (stream, format, args)
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
const char *format;
|
const char *format;
|
||||||
va_list args;
|
va_list args;
|
||||||
{
|
{
|
||||||
|
@ -2099,7 +2096,7 @@ vprintf_unfiltered (format, args)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
fprintf_filtered (GDB_FILE * stream, const char *format,...)
|
fprintf_filtered (struct ui_file * stream, const char *format,...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
va_start (args, format);
|
va_start (args, format);
|
||||||
|
@ -2108,7 +2105,7 @@ fprintf_filtered (GDB_FILE * stream, const char *format,...)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
fprintf_unfiltered (GDB_FILE * stream, const char *format,...)
|
fprintf_unfiltered (struct ui_file * stream, const char *format,...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
va_start (args, format);
|
va_start (args, format);
|
||||||
|
@ -2120,7 +2117,7 @@ fprintf_unfiltered (GDB_FILE * stream, const char *format,...)
|
||||||
Called as fprintfi_filtered (spaces, stream, format, ...); */
|
Called as fprintfi_filtered (spaces, stream, format, ...); */
|
||||||
|
|
||||||
void
|
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_list args;
|
||||||
va_start (args, format);
|
va_start (args, format);
|
||||||
|
@ -2210,7 +2207,7 @@ n_spaces (n)
|
||||||
void
|
void
|
||||||
print_spaces_filtered (n, stream)
|
print_spaces_filtered (n, stream)
|
||||||
int n;
|
int n;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
{
|
{
|
||||||
fputs_filtered (n_spaces (n), stream);
|
fputs_filtered (n_spaces (n), stream);
|
||||||
}
|
}
|
||||||
|
@ -2224,7 +2221,7 @@ print_spaces_filtered (n, stream)
|
||||||
|
|
||||||
void
|
void
|
||||||
fprintf_symbol_filtered (stream, name, lang, arg_mode)
|
fprintf_symbol_filtered (stream, name, lang, arg_mode)
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
char *name;
|
char *name;
|
||||||
enum language lang;
|
enum language lang;
|
||||||
int arg_mode;
|
int arg_mode;
|
||||||
|
@ -2365,7 +2362,7 @@ initialize_utils ()
|
||||||
init_page_info ();
|
init_page_info ();
|
||||||
|
|
||||||
/* If the output is not a terminal, don't paginate it. */
|
/* 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;
|
lines_per_page = UINT_MAX;
|
||||||
|
|
||||||
set_width_command ((char *) NULL, 0, c);
|
set_width_command ((char *) NULL, 0, c);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* ICE interface for the NEC V850 for GDB, the GNU debugger.
|
/* 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.
|
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_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 *));
|
static int ice_file PARAMS ((char *));
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Print values for GDB, the GNU debugger.
|
/* 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.
|
Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is part of GDB.
|
This file is part of GDB.
|
||||||
|
@ -40,8 +40,8 @@
|
||||||
static int partial_memory_read (CORE_ADDR memaddr, char *myaddr,
|
static int partial_memory_read (CORE_ADDR memaddr, char *myaddr,
|
||||||
int len, int *errnoptr);
|
int len, int *errnoptr);
|
||||||
|
|
||||||
static void print_hex_chars PARAMS ((GDB_FILE *, unsigned char *,
|
static void print_hex_chars (struct ui_file *, unsigned char *,
|
||||||
unsigned int));
|
unsigned int);
|
||||||
|
|
||||||
static void show_print PARAMS ((char *, int));
|
static void show_print PARAMS ((char *, int));
|
||||||
|
|
||||||
|
@ -130,7 +130,7 @@ val_print (type, valaddr, embedded_offset, address,
|
||||||
char *valaddr;
|
char *valaddr;
|
||||||
int embedded_offset;
|
int embedded_offset;
|
||||||
CORE_ADDR address;
|
CORE_ADDR address;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
int format;
|
int format;
|
||||||
int deref_ref;
|
int deref_ref;
|
||||||
int recurse;
|
int recurse;
|
||||||
|
@ -167,7 +167,7 @@ val_print (type, valaddr, embedded_offset, address,
|
||||||
int
|
int
|
||||||
value_print (val, stream, format, pretty)
|
value_print (val, stream, format, pretty)
|
||||||
value_ptr val;
|
value_ptr val;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
int format;
|
int format;
|
||||||
enum val_prettyprint pretty;
|
enum val_prettyprint pretty;
|
||||||
{
|
{
|
||||||
|
@ -192,7 +192,7 @@ void
|
||||||
val_print_type_code_int (type, valaddr, stream)
|
val_print_type_code_int (type, valaddr, stream)
|
||||||
struct type *type;
|
struct type *type;
|
||||||
char *valaddr;
|
char *valaddr;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
{
|
{
|
||||||
if (TYPE_LENGTH (type) > sizeof (LONGEST))
|
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)
|
#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
|
static void
|
||||||
print_decimal (stream, sign, use_local, val_ulong)
|
print_decimal (stream, sign, use_local, val_ulong)
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
char *sign;
|
char *sign;
|
||||||
int use_local;
|
int use_local;
|
||||||
ULONGEST val_ulong;
|
ULONGEST val_ulong;
|
||||||
|
@ -280,7 +281,7 @@ print_decimal (stream, sign, use_local, val_ulong)
|
||||||
|
|
||||||
void
|
void
|
||||||
print_longest (stream, format, use_local, val_long)
|
print_longest (stream, format, use_local, val_long)
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
int format;
|
int format;
|
||||||
int use_local;
|
int use_local;
|
||||||
LONGEST val_long;
|
LONGEST val_long;
|
||||||
|
@ -567,7 +568,7 @@ void
|
||||||
print_floating (valaddr, type, stream)
|
print_floating (valaddr, type, stream)
|
||||||
char *valaddr;
|
char *valaddr;
|
||||||
struct type *type;
|
struct type *type;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
{
|
{
|
||||||
DOUBLEST doub;
|
DOUBLEST doub;
|
||||||
int inv;
|
int inv;
|
||||||
|
@ -675,7 +676,7 @@ print_floating (valaddr, type, stream)
|
||||||
|
|
||||||
void
|
void
|
||||||
print_binary_chars (stream, valaddr, len)
|
print_binary_chars (stream, valaddr, len)
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
unsigned char *valaddr;
|
unsigned char *valaddr;
|
||||||
unsigned len;
|
unsigned len;
|
||||||
{
|
{
|
||||||
|
@ -739,7 +740,7 @@ print_binary_chars (stream, valaddr, len)
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
print_octal_chars (stream, valaddr, len)
|
print_octal_chars (stream, valaddr, len)
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
unsigned char *valaddr;
|
unsigned char *valaddr;
|
||||||
unsigned len;
|
unsigned len;
|
||||||
{
|
{
|
||||||
|
@ -890,7 +891,7 @@ print_octal_chars (stream, valaddr, len)
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
print_decimal_chars (stream, valaddr, len)
|
print_decimal_chars (stream, valaddr, len)
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
unsigned char *valaddr;
|
unsigned char *valaddr;
|
||||||
unsigned len;
|
unsigned len;
|
||||||
{
|
{
|
||||||
|
@ -1033,7 +1034,7 @@ print_decimal_chars (stream, valaddr, len)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
print_hex_chars (stream, valaddr, len)
|
print_hex_chars (stream, valaddr, len)
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
unsigned char *valaddr;
|
unsigned char *valaddr;
|
||||||
unsigned len;
|
unsigned len;
|
||||||
{
|
{
|
||||||
|
@ -1078,7 +1079,7 @@ val_print_array_elements (type, valaddr, address, stream, format, deref_ref,
|
||||||
struct type *type;
|
struct type *type;
|
||||||
char *valaddr;
|
char *valaddr;
|
||||||
CORE_ADDR address;
|
CORE_ADDR address;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
int format;
|
int format;
|
||||||
int deref_ref;
|
int deref_ref;
|
||||||
int recurse;
|
int recurse;
|
||||||
|
@ -1206,7 +1207,7 @@ val_print_string (addr, len, width, stream)
|
||||||
CORE_ADDR addr;
|
CORE_ADDR addr;
|
||||||
int len;
|
int len;
|
||||||
int width;
|
int width;
|
||||||
GDB_FILE *stream;
|
struct ui_file *stream;
|
||||||
{
|
{
|
||||||
int force_ellipsis = 0; /* Force ellipsis to be printed if nonzero. */
|
int force_ellipsis = 0; /* Force ellipsis to be printed if nonzero. */
|
||||||
int errcode; /* Errno returned from bad reads. */
|
int errcode; /* Errno returned from bad reads. */
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
/* Declarations for value printing routines for GDB, the GNU debugger.
|
/* Declarations for value printing routines for GDB, the GNU debugger.
|
||||||
Copyright 1986, 1988, 1989, 1991, 1992, 1993, 1994
|
Copyright 1986, 1988, 1989, 1991-1994, 2000 Free Software Foundation, Inc.
|
||||||
Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
This file is part of GDB.
|
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 int stop_print_at_null; /* Stop printing at null char? */
|
||||||
|
|
||||||
extern void
|
extern void val_print_array_elements (struct type *, char *, CORE_ADDR,
|
||||||
val_print_array_elements PARAMS ((struct type *, char *, CORE_ADDR, GDB_FILE *,
|
struct ui_file *, int, int, int,
|
||||||
int, int, int, enum val_prettyprint,
|
enum val_prettyprint, unsigned int);
|
||||||
unsigned int));
|
|
||||||
|
|
||||||
extern void
|
extern void val_print_type_code_int (struct type *, char *,
|
||||||
val_print_type_code_int PARAMS ((struct type *, char *, GDB_FILE *));
|
struct ui_file *);
|
||||||
|
|
||||||
extern void
|
extern void print_binary_chars (struct ui_file *, unsigned char *,
|
||||||
print_binary_chars PARAMS ((GDB_FILE *, unsigned char *, unsigned int));
|
unsigned int);
|
||||||
|
|
||||||
extern void
|
extern void print_octal_chars (struct ui_file *, unsigned char *,
|
||||||
print_octal_chars PARAMS ((GDB_FILE *, unsigned char *, unsigned int));
|
unsigned int);
|
||||||
|
|
||||||
extern void
|
extern void print_decimal_chars (struct ui_file *, unsigned char *,
|
||||||
print_decimal_chars PARAMS ((GDB_FILE *, unsigned char *, unsigned int));
|
unsigned int);
|
||||||
|
|
53
gdb/value.h
53
gdb/value.h
|
@ -1,6 +1,5 @@
|
||||||
/* Definitions for values of C expressions, for GDB.
|
/* Definitions for values of C expressions, for GDB.
|
||||||
Copyright 1986, 1987, 1989, 1992, 1993, 1994, 1995, 1996
|
Copyright 1986, 1987, 1989, 1992-1996, 2000 Free Software Foundation, Inc.
|
||||||
Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
This file is part of GDB.
|
This file is part of GDB.
|
||||||
|
|
||||||
|
@ -245,8 +244,7 @@ struct internalvar
|
||||||
struct frame_info;
|
struct frame_info;
|
||||||
struct fn_field;
|
struct fn_field;
|
||||||
|
|
||||||
extern void
|
extern void print_address_demangle (CORE_ADDR, struct ui_file *, int);
|
||||||
print_address_demangle PARAMS ((CORE_ADDR, GDB_FILE *, int));
|
|
||||||
|
|
||||||
extern LONGEST value_as_long PARAMS ((value_ptr val));
|
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
|
extern void
|
||||||
modify_field PARAMS ((char *addr, LONGEST fieldval, int bitpos, int bitsize));
|
modify_field PARAMS ((char *addr, LONGEST fieldval, int bitpos, int bitsize));
|
||||||
|
|
||||||
extern void
|
extern void type_print (struct type * type, char *varstring,
|
||||||
type_print PARAMS ((struct type * type, char *varstring, GDB_FILE * stream,
|
struct ui_file * stream, int show);
|
||||||
int show));
|
|
||||||
|
|
||||||
extern char *baseclass_addr PARAMS ((struct type * type, int index,
|
extern char *baseclass_addr PARAMS ((struct type * type, int index,
|
||||||
char *valaddr,
|
char *valaddr,
|
||||||
value_ptr * valuep, int *errp));
|
value_ptr * valuep, int *errp));
|
||||||
|
|
||||||
extern void
|
extern void print_longest (struct ui_file * stream, int format,
|
||||||
print_longest PARAMS ((GDB_FILE * stream, int format, int use_local,
|
int use_local, LONGEST val);
|
||||||
LONGEST val));
|
|
||||||
|
|
||||||
extern void
|
extern void print_floating (char *valaddr, struct type * type,
|
||||||
print_floating PARAMS ((char *valaddr, struct type * type, GDB_FILE * stream));
|
struct ui_file * stream);
|
||||||
|
|
||||||
extern int value_print PARAMS ((value_ptr val, GDB_FILE * stream, int format,
|
extern int value_print (value_ptr val, struct ui_file *stream, int format,
|
||||||
enum val_prettyprint pretty));
|
enum val_prettyprint pretty);
|
||||||
|
|
||||||
extern void
|
extern void value_print_array_elements (value_ptr val,
|
||||||
value_print_array_elements PARAMS ((value_ptr val, GDB_FILE * stream,
|
struct ui_file *stream,
|
||||||
int format, enum val_prettyprint pretty));
|
int format,
|
||||||
|
enum val_prettyprint pretty);
|
||||||
|
|
||||||
extern value_ptr
|
extern value_ptr
|
||||||
value_release_to_mark PARAMS ((value_ptr mark));
|
value_release_to_mark PARAMS ((value_ptr mark));
|
||||||
|
|
||||||
extern int
|
extern int val_print (struct type * type, char *valaddr,
|
||||||
val_print PARAMS ((struct type * type, char *valaddr, int embedded_offset, CORE_ADDR address,
|
int embedded_offset, CORE_ADDR address,
|
||||||
GDB_FILE * stream, int format, int deref_ref,
|
struct ui_file * stream, int format,
|
||||||
int recurse, enum val_prettyprint pretty));
|
int deref_ref, int recurse,
|
||||||
|
enum val_prettyprint pretty);
|
||||||
|
|
||||||
extern int
|
extern int val_print_string (CORE_ADDR addr, int len, int width, struct ui_file *stream);
|
||||||
val_print_string PARAMS ((CORE_ADDR addr, int len, int width, GDB_FILE * stream));
|
|
||||||
|
|
||||||
extern void
|
extern void print_variable_value (struct symbol * var,
|
||||||
print_variable_value PARAMS ((struct symbol * var, struct frame_info * frame,
|
struct frame_info * frame,
|
||||||
GDB_FILE * stream));
|
struct ui_file *stream);
|
||||||
|
|
||||||
extern int check_field PARAMS ((value_ptr, const char *));
|
extern int check_field PARAMS ((value_ptr, const char *));
|
||||||
|
|
||||||
extern void
|
extern void c_typedef_print (struct type * type, struct symbol * news,
|
||||||
c_typedef_print PARAMS ((struct type * type, struct symbol * news, GDB_FILE * stream));
|
struct ui_file * stream);
|
||||||
|
|
||||||
extern char *
|
extern char *
|
||||||
internalvar_name PARAMS ((struct internalvar * var));
|
internalvar_name PARAMS ((struct internalvar * var));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue