From: K. Richard Pixley Date: Sun, 19 May 1991 07:27:02 +0000 (+0000) Subject: configure changes and -opcode.h movement. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=beff312ea7d0f3aec7bb7c5bc83cc4cacc18823b;p=binutils-gdb.git configure changes and -opcode.h movement. --- diff --git a/gdb/Makefile.dist b/gdb/Makefile.dist index fffccd24e9a..47712148826 100755 --- a/gdb/Makefile.dist +++ b/gdb/Makefile.dist @@ -75,10 +75,14 @@ INCLUDE_DEP = $$(INCLUDE_DIR) BFD_DIR = ${srcdir}/../bfd BFD_DEP = $$(BFD_DIR) +# the parent of the directory in which live the readline headers. +READLINE_DIR = ${srcdir}/.. +READLINE_DEP = $$(READLINE_DIR) + # All the includes used for CFLAGS and for lint. # -I. for config files. # -I${srcdir} possibly for regex.h also. -INCLUDE_CFLAGS = -I. -I${srcdir} -I$(INCLUDE_DIR) -I${srcdir}/vx-share +INCLUDE_CFLAGS = -I. -I${srcdir} -I$(INCLUDE_DIR) -I$(READLINE_DIR) -I${srcdir}/vx-share # {X,T}M_CFLAGS, if defined, has system-dependent CFLAGS. # CFLAGS for both GDB and readline. @@ -106,9 +110,9 @@ TERMCAP = -ltermcap # For example, -lPW for System V to get alloca(). # FIXME STOPGAP FOR BFD LIBRARY: BFD stuff CLIBS = ${TERMCAP} $(XM_CLIBS) ${TM_CLIBS} ${BFD_DIR}${subdir}/libbfd.a \ - ${LIBIBERTY} -CDEPS = ${XM_CDEPS} ${TM_CDEPS} ${BFD_DIR}/libbfd.a \ - ${LIBIBERTY} + ${LIBIBERTY} ${READLINE_DIR}/readline${subdir}/libreadline.a +CDEPS = ${XM_CDEPS} ${TM_CDEPS} ${BFD_DIR}${subdir}/libbfd.a \ + ${LIBIBERTY} ${READLINE_DIR}/readline${subdir}/libreadline.a ADD_FILES = ${REGEX} ${ALLOCA} ${GNU_MALLOC} ADD_DEPS = ${REGEX1} ${ALLOCA1} ${GNU_MALLOC} @@ -176,9 +180,11 @@ HFILES= breakpoint.h command.h defs.h environ.h \ target.h tdesc.h terminal.h tm-68k.h tm-i960.h tm-sunos.h \ value.h -OPCODES = pn-opcode.h np1-opcode.h sparc-opcode.h vax-opcode.h m68k-opcode.h \ - ns32k-opcode.h convx-opcode.h pyr-opcode.h mips-opcode.h \ - am29k-opcode.h +OPCODES = $(INCLUDE_DIR)/pn-opcode.h $(INCLUDE_DIR)/np1-opcode.h \ + $(INCLUDE_DIR)/sparc-opcode.h $(INCLUDE_DIR)/vax-opcode.h \ + $(INCLUDE_DIR)/m68k-opcode.h $(INCLUDE_DIR)/ns32k-opcode.h \ + $(INCLUDE_DIR)/convx-opcode.h $(INCLUDE_DIR)/pyr-opcode.h \ + $(INCLUDE_DIR)/mips-opcode.h $(INCLUDE_DIR)/am29k-opcode.h REMOTE_EXAMPLES = rem-m68k.shar rem-multi.shar @@ -229,7 +235,7 @@ TSSTART = /lib/crt0.o NTSSTART = kdb-start.o -RL_LIB = readline/libreadline.a +RL_LIB = ../readline/libreadline.a RL_LIB_DEP = $(RL_LIB) # Prevent Sun make from putting in the machine type. Setting @@ -357,7 +363,7 @@ depend: $(SOURCES) Makefile.dist @echo can safely be ignored. @echo Also ignore parse errors in valops.c, and any errors in @echo arm-convert.s. - -$(GCC) -MM $(CFLAGS) -I$(BFD_DIR) \ + -$(GCC) -MM $(CFLAGS) -I$(READLINE_DIR) -I$(BFD_DIR) \ `ls $(SOURCES) | sort -u` >depend.tmp depend.tmp #include "defs.h" #include "param.h" @@ -28,6 +29,8 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "bfd.h" #include "symfile.h" +#ifndef NO_COFF + #if defined (TDESC) /* Need to get C_VERSION and friends. */ #include @@ -2048,3 +2051,5 @@ _initialize_coffread () { add_symtab_fns(&coff_sym_fns); } + +#endif /* NO_COFF */ diff --git a/gdb/configure.in b/gdb/configure.in index 6cc5fba34b3..cd6844d1978 100644 --- a/gdb/configure.in +++ b/gdb/configure.in @@ -12,7 +12,7 @@ if [ ! -f xconfig/${host} ]; then exit 1 fi -targetfile=`awk ' +hostfile=`awk ' $1 == "XM_FILE=" { print $2 }' '","LEQ","GEQ","LSH","RSH","'@'","'+'","'-'","'*'","'/'", "'%'","UNARY","INCREMENT","DECREMENT","ARROW","'.'","'['","'('","'!'","'~'", -"']'","')'","'{'","'}'","':'","start" +"']'","')'","'{'","'}'","':'","start","exp1","exp","@1","arglist", +"block","variable","ptype","abs_decl","direct_abs_decl","array_mod","func_mod","type","typebase","typename", +"nonempty_typelist","name","name_not_typename","" }; +#endif static const short yyr1[] = { 0, 66, 67, 67, 68, 68, 68, 68, 68, 68, 68, @@ -461,13 +522,11 @@ static const short yycheck[] = { 14, 53, 54, 55, 56, 57, 58, -1, 49, 50, 51, -1, 53, 54, 55, 56, 57, 58 }; -#define YYPURE 1 - /* -*-C-*- Note some compilers choke on comments on `#line' lines. */ -#line 3 "bison.simple" +#line 3 "/usr/unsupported/lib/bison.simple" /* Skeleton output parser for bison, - Copyright (C) 1984 Bob Corbett and Richard Stallman + Copyright (C) 1984, 1989, 1990 Bob Corbett and Richard Stallman 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 @@ -484,9 +543,19 @@ static const short yycheck[] = { 14, Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#ifndef alloca +#ifdef __GNUC__ +#define alloca __builtin_alloca +#else /* Not GNU C. */ #if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) #include -#endif +#else /* Not sparc */ +#ifdef MSDOS +#include +#endif /* MSDOS */ +#endif /* Not sparc. */ +#endif /* Not GNU C. */ +#endif /* alloca not defined. */ /* This is the parser code that is written into each bison parser when the %semantic_parser declaration is not specified in the grammar. @@ -501,35 +570,57 @@ static const short yycheck[] = { 14, #define yyclearin (yychar = YYEMPTY) #define YYEMPTY -2 #define YYEOF 0 -#define YYFAIL goto yyerrlab; #define YYACCEPT return(0) #define YYABORT return(1) -#define YYERROR goto yyerrlab +#define YYERROR goto yyerrlab1 +/* Like YYERROR except do call yyerror. + This remains here temporarily to ease the + transition to the new meaning of YYERROR, for GCC. + Once GCC version 2 has supplanted version 1, this can go. */ +#define YYFAIL goto yyerrlab +#define YYRECOVERING() (!!yyerrstatus) +#define YYBACKUP(token, value) \ +do \ + if (yychar == YYEMPTY && yylen == 1) \ + { yychar = (token), yylval = (value); \ + yychar1 = YYTRANSLATE (yychar); \ + YYPOPSTACK; \ + goto yybackup; \ + } \ + else \ + { yyerror ("syntax error: cannot back up"); YYERROR; } \ +while (0) #define YYTERROR 1 #define YYERRCODE 256 -#ifndef YYIMPURE +#ifndef YYPURE #define YYLEX yylex() #endif -#ifndef YYPURE +#ifdef YYPURE +#ifdef YYLSP_NEEDED #define YYLEX yylex(&yylval, &yylloc) +#else +#define YYLEX yylex(&yylval) +#endif #endif /* If nonreentrant, generate the variables here */ -#ifndef YYIMPURE +#ifndef YYPURE int yychar; /* the lookahead symbol */ YYSTYPE yylval; /* the semantic value of the */ /* lookahead symbol */ +#ifdef YYLSP_NEEDED YYLTYPE yylloc; /* location data for the lookahead */ /* symbol */ +#endif int yynerrs; /* number of parse errors so far */ -#endif /* YYIMPURE */ +#endif /* not YYPURE */ #if YYDEBUG != 0 int yydebug; /* nonzero means print parse trace */ @@ -537,21 +628,59 @@ int yydebug; /* nonzero means print parse trace */ from coexisting. */ #endif -/* YYMAXDEPTH indicates the initial size of the parser's stacks */ +/* YYINITDEPTH indicates the initial size of the parser's stacks */ -#ifndef YYMAXDEPTH -#define YYMAXDEPTH 200 +#ifndef YYINITDEPTH +#define YYINITDEPTH 200 #endif -/* YYMAXLIMIT is the maximum size the stacks can grow to +/* YYMAXDEPTH is the maximum size the stacks can grow to (effective only if the built-in stack extension method is used). */ -#ifndef YYMAXLIMIT -#define YYMAXLIMIT 10000 +#if YYMAXDEPTH == 0 +#undef YYMAXDEPTH +#endif + +#ifndef YYMAXDEPTH +#define YYMAXDEPTH 10000 #endif + +#ifndef __cplusplus + +/* This is the most reliable way to avoid incompatibilities + in available built-in functions on various systems. */ +static void +__yy_bcopy (from, to, count) + char *from; + char *to; + int count; +{ + register char *f = from; + register char *t = to; + register int i = count; + + while (i-- > 0) + *t++ = *f++; +} + +#else /* __cplusplus */ +/* This is the most reliable way to avoid incompatibilities + in available built-in functions on various systems. */ +static void +__yy_bcopy (char *from, char *to, int count) +{ + register char *f = from; + register char *t = to; + register int i = count; + + while (i-- > 0) + *t++ = *f++; +} -#line 90 "bison.simple" +#endif + +#line 160 "/usr/unsupported/lib/bison.simple" int yyparse() { @@ -559,25 +688,34 @@ yyparse() register int yyn; register short *yyssp; register YYSTYPE *yyvsp; - YYLTYPE *yylsp; int yyerrstatus; /* number of tokens to shift before error messages enabled */ int yychar1; /* lookahead token as an internal (translated) token number */ - short yyssa[YYMAXDEPTH]; /* the state stack */ - YYSTYPE yyvsa[YYMAXDEPTH]; /* the semantic value stack */ - YYLTYPE yylsa[YYMAXDEPTH]; /* the location stack */ + short yyssa[YYINITDEPTH]; /* the state stack */ + YYSTYPE yyvsa[YYINITDEPTH]; /* the semantic value stack */ short *yyss = yyssa; /* refer to the stacks thru separate pointers */ YYSTYPE *yyvs = yyvsa; /* to allow yyoverflow to reallocate them elsewhere */ + +#ifdef YYLSP_NEEDED YYLTYPE *yyls = yylsa; + YYLTYPE *yylsp; + YYLTYPE yylsa[YYINITDEPTH]; /* the location stack */ - int yymaxdepth = YYMAXDEPTH; +#define YYPOPSTACK (yyvsp--, yysp--, yylsp--) +#else +#define YYPOPSTACK (yyvsp--, yysp--) +#endif -#ifndef YYPURE + int yystacksize = YYINITDEPTH; + +#ifdef YYPURE int yychar; YYSTYPE yylval; - YYLTYPE yylloc; int yynerrs; +#ifdef YYLSP_NEEDED + YYLTYPE yylloc; +#endif #endif YYSTYPE yyval; /* the variable used to return */ @@ -602,7 +740,9 @@ yyparse() yyssp = yyss - 1; yyvsp = yyvs; +#ifdef YYLSP_NEEDED yylsp = yyls; +#endif /* Push a new state, which is found in yystate . */ /* In all cases, when you get here, the value and location stacks @@ -611,13 +751,15 @@ yynewstate: *++yyssp = yystate; - if (yyssp >= yyss + yymaxdepth - 1) + if (yyssp >= yyss + yystacksize - 1) { /* Give user a chance to reallocate the stack */ /* Use copies of these so that the &'s don't force the real ones into memory. */ YYSTYPE *yyvs1 = yyvs; - YYLTYPE *yyls1 = yyls; short *yyss1 = yyss; +#ifdef YYLSP_NEEDED + YYLTYPE *yyls1 = yyls; +#endif /* Get the current used size of the three stacks, in elements. */ int size = yyssp - yyss + 1; @@ -628,24 +770,32 @@ yynewstate: yyoverflow("parser stack overflow", &yyss1, size * sizeof (*yyssp), &yyvs1, size * sizeof (*yyvsp), +#ifdef YYLSP_NEEDED &yyls1, size * sizeof (*yylsp), - &yymaxdepth); +#endif + &yystacksize); - yyss = yyss1; yyvs = yyvs1; yyls = yyls1; + yyss = yyss1; yyvs = yyvs1; +#ifdef YYLSP_NEEDED + yyls = yyls1; +#endif #else /* no yyoverflow */ /* Extend the stack our own way. */ - if (yymaxdepth >= YYMAXLIMIT) - yyerror("parser stack overflow"); - yymaxdepth *= 2; - if (yymaxdepth > YYMAXLIMIT) - yymaxdepth = YYMAXLIMIT; - yyss = (short *) alloca (yymaxdepth * sizeof (*yyssp)); - bcopy ((char *)yyss1, (char *)yyss, size * sizeof (*yyssp)); - yyvs = (YYSTYPE *) alloca (yymaxdepth * sizeof (*yyvsp)); - bcopy ((char *)yyvs1, (char *)yyvs, size * sizeof (*yyvsp)); + if (yystacksize >= YYMAXDEPTH) + { + yyerror("parser stack overflow"); + return 2; + } + yystacksize *= 2; + if (yystacksize > YYMAXDEPTH) + yystacksize = YYMAXDEPTH; + yyss = (short *) alloca (yystacksize * sizeof (*yyssp)); + __yy_bcopy ((char *)yyss1, (char *)yyss, size * sizeof (*yyssp)); + yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp)); + __yy_bcopy ((char *)yyvs1, (char *)yyvs, size * sizeof (*yyvsp)); #ifdef YYLSP_NEEDED - yyls = (YYLTYPE *) alloca (yymaxdepth * sizeof (*yylsp)); - bcopy ((char *)yyls1, (char *)yyls, size * sizeof (*yylsp)); + yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp)); + __yy_bcopy ((char *)yyls1, (char *)yyls, size * sizeof (*yylsp)); #endif #endif /* no yyoverflow */ @@ -657,10 +807,10 @@ yynewstate: #if YYDEBUG != 0 if (yydebug) - fprintf(stderr, "Stack size increased to %d\n", yymaxdepth); + fprintf(stderr, "Stack size increased to %d\n", yystacksize); #endif - if (yyssp >= yyss + yymaxdepth - 1) + if (yyssp >= yyss + yystacksize - 1) YYABORT; } @@ -669,9 +819,11 @@ yynewstate: fprintf(stderr, "Entering state %d\n", yystate); #endif + yybackup: + /* Do appropriate processing given the current state. */ /* Read a lookahead token if we need one and don't already have one. */ -yyresume: +/* yyresume: */ /* First try to decide what to do without reference to lookahead token. */ @@ -778,12 +930,15 @@ yyreduce: #if YYDEBUG != 0 if (yydebug) { - if (yylen == 1) - fprintf (stderr, "Reducing 1 value via line %d, ", - yyrline[yyn]); - else - fprintf (stderr, "Reducing %d values via line %d, ", - yylen, yyrline[yyn]); + int i; + + fprintf (stderr, "Reducing via rule %d (line %d), ", + yyn, yyrline[yyn]); + + /* Print the symboles being reduced, and their result. */ + for (i = yyprhs[yyn]; yyrhs[i] > 0; i++) + fprintf (stderr, "%s ", yytname[yyrhs[i]]); + fprintf (stderr, " -> %s\n", yytname[yyr1[yyn]]); } #endif @@ -1543,7 +1698,7 @@ case 118: break;} } /* the action file gets copied in in place of this dollarsign */ -#line 327 "bison.simple" +#line 423 "/usr/unsupported/lib/bison.simple" yyvsp -= yylen; yyssp -= yylen; @@ -1602,9 +1757,45 @@ yyerrlab: /* here on detecting error */ /* If not already recovering from an error, report this error. */ { ++yynerrs; - yyerror("parse error"); + +#ifdef YYERROR_VERBOSE + yyn = yypact[yystate]; + + if (yyn > YYFLAG && yyn < YYLAST) + { + int size = 0; + char *msg; + int x, count; + + count = 0; + for (x = 0; x < (sizeof(yytname) / sizeof(char *)); x++) + if (yycheck[x + yyn] == x) + size += strlen(yytname[x]) + 15, count++; + msg = (char *) xmalloc(size + 15); + strcpy(msg, "parse error"); + + if (count < 5) + { + count = 0; + for (x = 0; x < (sizeof(yytname) / sizeof(char *)); x++) + if (yycheck[x + yyn] == x) + { + strcat(msg, count == 0 ? ", expecting `" : " or `"); + strcat(msg, yytname[x]); + strcat(msg, "'"); + count++; + } + } + yyerror(msg); + free(msg); + } + else +#endif /* YYERROR_VERBOSE */ + yyerror("parse error"); } +yyerrlab1: /* here on error raised explicitly by an action */ + if (yyerrstatus == 3) { /* if just tried and failed to reuse lookahead token after an error, discard it. */ diff --git a/gdb/sparc-xdep.c b/gdb/sparc-xdep.c index 89fcb8d0a97..1bc392ba984 100644 --- a/gdb/sparc-xdep.c +++ b/gdb/sparc-xdep.c @@ -37,6 +37,8 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ extern char register_valid[]; +int deferred_stores = 0; /* Cumulates stores we want to do eventually. */ + /* Fetch one or more registers from the inferior. REGNO == -1 to get them all. We actually fetch more than requested, when convenient, marking them as valid so we won't fetch them again. */ @@ -131,7 +133,6 @@ fetch_inferior_registers (regno) #define INT_REGS 1 #define STACK_REGS 2 #define FP_REGS 4 -int deferred_stores = 0; /* Cumulates stores we want to do eventually. */ int store_inferior_registers (regno) diff --git a/gdb/tm-sun4os4.h b/gdb/tm-sun4os4.h index 971bb4fbd7a..f31a8c3738f 100644 --- a/gdb/tm-sun4os4.h +++ b/gdb/tm-sun4os4.h @@ -22,3 +22,5 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #undef STACK_END_ADDRESS #define STACK_END_ADDRESS 0xf8000000 + +#define NO_COFF