Commit Graph

74 Commits

Author SHA1 Message Date
Fred Fish e58de8a230 * Makefile.in (SFILES_MAINDIR): Add ch-exp.y.
* Makefile.in (YYFILES):  Add ch-exp.tab.c.
	* Makefile.in (YYOBJ):  Add ch-exp.tab.o.
	* Makefile.in (saber_gdb):  Add unload of ch-exp.y and load
	of ch-exp.tab.c.
	* Makefile.in (distclean):  Add target ch-exp.tab.c.
	* Makefile.in (realclean):  Add rm of ch-exp.tab.c.
	* Makefile.in (c-exp.tab.c, m2-exp.tab.c):  Add dependency on
	Makefile since it contains sed patterns used in generation.
	Add sed pattern to also delete #include of any malloc.h.
	* Makefile.in (ch-exp.tab.o, ch-exp.tab.c):  New targets.
	* ch-exp.y:  New expression parser, for GNU-Chill.
	* c-exp.y, expr.c, expression.h, language.c, m2-exp.y,
	parser-defs.h, valarith.c, valops.c, value.h:  Remap macros and
	function names to conform to K&R terminology with respect to
	logical and bitwise operators:
	UNOP_ZEROP => UNOP_LOGICAL_NOT
	UNOP_LOGNOT => UNOP_COMPLEMENT
	BINOP_LOGAND => BINOP_BITWISE_AND
	BINOP_LOGXOR => BINOP_BITWISE_XOR
	BINOP_LOGIOR => BINOP_BITWISE_IOR
	BINOP_AND => BINOP_LOGICAL_AND
	BINOP_OR => BINOP_LOGICAL_OR
	PREC_OR => PREC_LOGICAL_OR
	PREC_AND => PREC_LOGICAL_AND
	PREC_LOGIOR => PREC_BITWISE_IOR
	PREC_LOGXOR => PREC_BITWISE_XOR
	PREC_LOGAND => PREC_BITWISE_AND
	value_zerop() => value_logical_not()
	value_lognot() => value_complement()
	* c-exp.y (c_op_print_tab):  Add explicit empty terminator.
	* m2-exp.y (m2_op_print_tab):  Add explicit empty terminator.
	* defs.h (enum language):  Add language_chill.
	* dwarfread.c (set_cu_language):  Add LANG_CHILL case and make
	LANG_MODULA2 a recognized language.
	* eval.c (evaluate_subexp):  Add OP_BOOL case.
	* expprint.c (print_subexp):  Add OP_BOOL case.
	* gdbtypes.h (enum_typecode):  Note TYPE_CODE_BOOL used for
	Chill as well as Modula-2.
	* gdbtypes.y (builtin_type_chill_bool, builtin_type_chill_long,
	builtin_type_chill_ulong, builtin_type_chill_real):  Add.
	* i387-tdep.c (sys/dir.h):  Remove, appears to be unnecessary
	and is nonexistant in some SVR4 based systems.
	* language.c (DEFAULT_ALLOCSIZE):  Change from 3 => 4.
	* language.c (set_language_command):  Add chill.
	* language.c (binop_result_type, integral_type, character_type,
	boolean_type, structured_type, value_true, binop_type_check):
	Add language_chill cases.
	* language.h (_LANG_chill):  Define.
	* m2-exp.y (number_sign, modblock):  Make static, #ifdef out
	unused modblock.
	* m2-exp.y (ANDAND):  Rename to LOGICAL_AND.
	* source.c (source_info):  Fix minor nits, print "1 line" rather
	than "1 lines", and "language is <lang>".
	* symfile.c (deduce_language_from_filename):  Recognize the
	filename extensions ".chill", ".c186", and ".c286" for Chill.
	* valarith.c (value_binop):  Handle TYPE_CODE_BOOL as well
	as TYPE_CODE_INT and TYPE_CODE_FLOAT.
	* valprint.c (val_print):  Print TYPE_CODE_BOOL type values as
	"TRUE" or "FALSE".
	* valprint.c (typedef_print):  Add case for language_chill.
	* values.c (value_from_longest):  Handle TYPE_CODE_BOOL.
1992-11-15 17:28:02 +00:00
Fred Fish e35843d476 * Makefile.in (c-exp.tab.c, m2-exp.tab.c): Add sed patterns to
remap all malloc's to xmalloc's and all realloc's to xrealloc's.
	* c-exp.y, m2-exp.y:  Add comment about how malloc/realloc are
	  remapped to xmalloc/xrealloc, use only malloc/realloc in grammer
	  file.  Remove preprocessor defines that previously did remapping.
1992-10-31 00:35:08 +00:00
Michael Tiemann 368c8614bc Minor changes to make these work with bison again. 1992-07-09 11:47:50 +00:00
Fred Fish 4ed3a9ea66 * breakpoint.c, buildsym.c, c-exp.y, coffread.c, command.c,
core.c, cplus-dem.c, dbxread.c, dwarfread.c, elfread.c, environ.c,
	eval.c, findvar.c, gdbtypes.c, hppabsd-tdep.c, hppahpux-tdep.c,
	i386-tdep.c, ieee-float.c, infcmd.c, inflow.c, infptrace.c,
	infrun.c, m2-exp.y, mipsread.c, objfiles.c, parse.c, procfs.c,
	putenv.c, remote-mm.c, remote-vx.c, solib.c, sparc-tdep.c,
	sparc-xdep.c, stack.c, symfile.c, symtab.c, symtab.h, target.c,
	tm-i386v.h, tm-sparc.h, utils.c, valarith.c, valops.c, valprint.c,
	values.c, xcoffread.c:
	Remove "(void)" casts from function calls where the return value
	is ignored, in accordance with GNU coding standards.
1992-07-04 03:22:08 +00:00
Fred Fish 51b57ded88 * dbxread.c, i386-pinsn.c, i386-tdep.c, regex.c, solib.c, symmisc.c,
symtab.h, tm-i386v4.h, valprint.c, values.c:  Lint.
	* breakpoint.c, c-exp.y, coffread.c, command.c, environ.c, eval.c,
	findvar.c, infcmd.c, infptrace.c, infrun.c, m2-exp.y, parse.c,
	putenv.c, solib.c, sparc-xdep.c, symtab.c, tm-i386v.h, tm-sparc.h,
	utils.c, valarith.c, valops.c, valprint.c, values.c:
	Replace bcopy() use with memcpy(), which is more standard and can
	take advantage of gcc's builtin functions for increased performance.
	* breakpoint.c, buildsym.c, coffread.c, dbxread.c, i386-tdep.c,
	ieee-float.c, infcmd.c, sparc-tdep.c, stack.c, symtab.c, symtab.h,
	target.c, values.c:
	Replace bzero() use with memset(), which is more standard and can
	take advantage of gcc's builtin functions for increased performance.
	* i386-tdep.c, main.c, valprint.c:
	Replace bcmp() use with memcmp(), which is more standard and can
	take advantage of gcc's builtin functions for increased performance.
1992-06-29 23:34:38 +00:00
Stu Grossman 9aa448333d * Makefile.in (c-exp.tab.c, m2-exp.tab.c): Filter out bogus extern
declarations of malloc/realloc/free that are inserted by some
versions of yacc.
* m2-exp.y:  Prevent conflicts with TRUE and FALSE tokens by
#undeffing them.
* xm-rs6000.h:  Declare malloc/realloc/free appropriately.  Yet
another decl of strdup (this really ought to come from libiberty.h!).
1992-06-19 22:39:44 +00:00
Fred Fish 36ce1b6469 * c-exp.y, m2-exp.y: Move remapping defines for malloc and
realloc.  Add remapping defines for {yyss, yyssp, yyvs, yyvsp}.
	* config/{amix.mh, i386v4.mh, ncr3000.mh, stratus.mh,
	sun4os5.mh}:  Add definition for INSTALL using /usr/ucb/install.
1992-06-10 02:05:20 +00:00
Fred Fish 1867b3be84 Back out of TYPE_FLAG_FUND_TYPE change, solve the problem in valprint.c by
just printing the type name from the type if it is not otherwise handled.
Implement new handling of the ".syms" file for reusable symbol files.
1992-04-18 02:30:28 +00:00
Per Bothner d453b386ac * rs6000-pinsn.c: New version from IBM (Metin).
* m2-exp.y:  Re-write string initializers ("<>" => {'<', '>'})
	to avoid warnings from some compilers.
1992-04-17 01:35:42 +00:00
Fred Fish 4a11eef2eb Add TYPE_FLAG_FUND_TYPE bit to the flags member of the type structure,
and use it to decide when to print the actual type name rather than
trying to invent the name of a fundamental type.  This clears up the
confusion between int/long when they are the same sizes, removes one
obstacle to multi-language support (previously valprint.c thought
everything was a C type), and allows gdb to support distinctions between
explicitly and implicitly signed types when the compiler supports such
distinction in the debug output (as does every ANSI compiler I tested
except for gcc).
1992-04-15 05:42:00 +00:00
John Gilmore ac88ca205c Lint.
* symfile.c (add_symbol_file_command):  Initialize mapped/readnow.
1992-04-02 10:35:19 +00:00
John Gilmore be772100b5 Lint 1992-03-29 23:26:47 +00:00
Fred Fish 318bf84ffe Globs of changes. See the ChangeLog for details. Most related to
using the new mmalloc package.
1992-03-15 01:09:14 +00:00
John Gilmore 1ab3bf1b14 * Check in Fred Fish's changes in these modules. Fred
will make ChangeLog entries for all of them.
1992-02-22 01:46:16 +00:00
John Gilmore 088c3a0b74 * defs.h: Include ansidecl.h and PARAMS macro. Use PARAMS
to make prototypes for all functions declared here.
* cplus-dem.c:  Avoid declaring xmalloc and xrealloc.
* c-exp.y:  Rename SIGNED, OR, and AND to avoid conflict.
* environ.c:  Include <stdio.h> before defs.h.  Minor cleanup.
* ieee-float.h:  Use PARAMS for prototypes; make some params const.
* ieee-float.c, valarith.c:  Include <stdio.h>.  Lint.  b*=>mem*.
* m2-exp.y:  Remove unused CONST; Rename OR and AND.
* utils.c:  Avoid declaring malloc and realloc.  Lint.
(request_quit):  Accept signal-number parameter.
1992-02-20 19:23:42 +00:00
John Gilmore 7130224967 * m2-exp.y (MAX, MIN): Rename to MAX_FUNC, MIN_FUNC to avoid
conflicts with system header files.
1991-11-23 05:26:22 +00:00
John Gilmore 1a5a8f2a3e CLeanups to compile, mostly on BSD (okeeffe) and sco (kithrup). 1991-11-22 19:30:03 +00:00
John Gilmore 7d9884b927 * defs.h: Incorporate param.h. All users changed.
* param-no-tm.h:  Change users to define TM_FILE_OVERRIDE instead.
* param.h, param-no-tm.h:  Removed.
* Update copyrights in all changed files.
* dbxread.c, dwarfread.c, inflow.c, infrun.c, m2-exp.y, putenv.c,
solib.c, symtab.h, tm-umax.h, valprint.c:  Lint.
* tm-convex.h, tm-hp300hpux.h, tm-merlin.h, tm-sparc.h,
xm-merlin.h:  Avoid host include files in target descriptions.
* getpagesize.h:  Removed, libiberty copes now.
1991-11-21 18:42:05 +00:00
Fred Fish d018c8a6e1 Add defines so that parsers produced by SVR4 versions of yacc can coexist
in the same executable without collision (c-exp.y, m2-exp.y).  Add forward
delaration of function returning pointer to shut up compiler warnings about
conversion of int to pointer (symtab.h).
1991-11-19 15:59:55 +00:00
John Gilmore 39bf59520b * c-exp.y, m2-exp.y: Define more yysymbols that happen to be
"bss" rather than "data" symbols, but which still conflict.
* m2-exp.y:  Lint.
1991-09-28 01:30:41 +00:00
Stu Grossman 9ce7cb7c52 #define yyerrflag and yynerrs to avoid global name conflicts. 1991-09-20 19:30:36 +00:00
John Gilmore f24adda313 * c-exp.y, m2-exp.y: Lint.
* m2-exp.y:  Avoid using yytname[] which is a Bison-ism.
1991-09-19 22:16:40 +00:00
John Gilmore 9dffe475b5 Lint 1991-09-19 11:51:26 +00:00
John Gilmore 3d6b6a9075 * parse.c: New file with the common code remains of expread.y.
* expread.y, expread.tab.c:  Remove.
* parser-defs.h:  New file with common declarations from expread.y.
* c-exp.y:  New file with the C parser from expread.y.
* m2-exp.y:  New file with the Modula-2 parser.
1991-09-19 10:31:00 +00:00