Commit Graph

248 Commits

Author SHA1 Message Date
Fred Fish 85f0a8484f * gdbtypes.c (create_array_type): Complete rewrite. Now requires
a optional type to decorate as an array type, the type of the
	index, and the bounds of the array.  Records this additional info
	in the array type for use with languages with nonzero array
	bounds.
	* gdbtypes.h (enum type_code):  Update comment for TYPE_CODE_ARRAY
	to note that arrays may have bounds.
	* gdbtypes.h (create_array_type):  Update prototype.
	* c-exp.y (ptype production):  Adjust for new create_array_type
	calling conventions.
	* coffread.c (decode_type):  Call create_array_type rather than
	handcrafting array types.
	* convex-tdep.c (value_type):  Remove, now use create_array_type.
	* convex-tdep.c (value_of_trapped_internalvar):  Convert calls to
	vector_type into calls to create_array_type.
	* dwarfread.c (decode_subscr_data):  Name changed to
	decode_subscript_data_item throughout.
	* dwarfread.c (decode_subscript_data_item):  Rewrite to use
	create_array_type.  Now records index type and range as well.
	* dwarfread.c (dwarf_read_array_type):  Rewrite as part of
	change to use create_array_type.
	* dwarfread.c (read_subroutine_type):  Test existing user defined
	types before decorating them, to ensure they are blank, and
	complain about it if they are not.
	* dwarfread.c (decode_fund_type):  For unrecognized types, always
	return some valid type (type integer).  If the unrecognized type
	cannot be an implementation defined type, complain as well.
	* m88k-tdep.c (pushed_size):  Update comment for TYPE_CODE_ARRAY.
	* m88k-tdep.c (store_param):  Update comment for TYPE_CODE_ARRAY.
	* mipsread.c (upgrade_type):  Add FIXME comment that code to
	handcraft arrays should be replaced with call to create_array_type.
	* stabsread.c (read_array_type):  Replace code to handcraft
	array types with call to create_array_type.
	* valprint.c (type_print_varspec_prefix):  Minor formatting
	change, join lines that don't need to be split.
1992-12-15 02:52:11 +00:00
Fred Fish 22e3975901 * c-exp.y, m2-exp.y: Migrate code that has nothing to do with
expression parsing into c-lang.c and m2-lang.c respectively.
	* c-lang.c, m2-lang.c:  New files, code migrated from c-exp.y and
	m2-exp.y respectively.
	* c-lang.h, m2-lang.h:  New files, internal interfaces between c-*
	and m2-* files respectively.
	* Makefile.in (SFILES_MAINDIR):  Add c-lang.c, m2-lang.c.
	* Makefile.in (HFILES):  Add c-lang.h, m2-lang.h.
	* Makefile.in (OBS):  Add c-lang.o, m2-lang.o.
	* expression.h (struct block):  Forward declaration for prototypes.
	* language.h (struct objfile):  Forward declaration for prototypes.
	**** start-sanitize-chill ****
	* Makefile.in (SFILES_MAINDIR):  Add ch-lang.c.
	* Makefile.in (HFILES):  Add ch-lang.h.
	* Makefile.in (OBS):  Add ch-lang.o.
	* ch-exp.y:  Migrate code that has nothing to do with expression
	parsing into ch-lang.c.
	* ch-lang.c:  New file, code migrated from c-exp.y.
	* ch-lang.h:  New file, internal interface between ch-* files.
	**** end-sanitize-chill ****
1992-12-09 06:50:30 +00:00
Fred Fish bf229b4ea5 * c-exp.y (c_create_fundamental_type): New function to create
language specific fundamental types for C.
	* m2-exp.y (m2_create_fundamental_type):  New function to create
	language specific fundamental types for Modula 2.
	* c-exp.y (c_language_defn, cplus_language_defn):  Add
	c_create_fundamental_type to language struct initializers.
	* m2-exp.y (m2_language_defn):  Add m2_create_fundamental_type
	to language struct initializers.
	* dwarfread.c (expression.h, language.h):  Include.
	* dwarfread.c (ftypes):  New array to hold fundamental types
	for current compilation unit.
	* dwarfread.c (cu_language_defn):  New pointer to language
	struct for language of current compilation unit.
	* dwarfread.c (dwarf_fundamental_type):  New function to
	create/lookup fundamental types.
	* dwarfread.c (set_cu_language):  Initialize cu_language_defn.
	* dwarfread.c (throughout):  Replace lookup_fundamental_type
	with dwarf_fundamental_type.
	* dwarfread.c (read_file_scope):  Zero out ftypes for each new
	compilation unit (may be different language or different objfile).
	* gdbtypes.c (lookup_fundamental_type):  Move actual type
	creations into language specific fundamental type creation
	functions and call via create_fundamental_type.  Add comment
	about this function being obsolescent.
	* gdbtypes.h (FT_BYTE, FT_UNSIGNED_BYTE):  New types, true byte
	sized signed and unsigned integers.
	* gdbtypes.h (FT_NUM_MEMBERS):  Increment, new types added.
	* language.c (language_def):  New function to lookup a language
	struct given it's enumeration.
	* language.h (struct language_defn):  Add la_fund_type, a pointer
	to a function that creates fundamental types for this language.
	* language.h (create_fundamental_type):  New macro to create
	fundamental types based on the current language.
	* language.h (language_def):  Add prototype.
	* language.c (unk_lang_create_fundamental_type):  New function
	for initializing language structs, calls error if called.
	* language.c (unk_language_defn, auto_language_defn,
	local_language_defn):  Use unk_lang_create_fundamental_type.
	**** start-sanitize-chill ****
	ch-exp.y (chill_create_fundamental_type):  New function.
	ch-exp.y (chill_language_defn):  Add chill_create_fundamental_type.
	ch-exp.y (_initialize_chill_exp):  BOOL types are only one byte.
	**** end-sanitize-chill ****
1992-12-03 20:28:16 +00:00
Fred Fish bac89d6ca8 * c-exp.y (yylex): Add tempbuf, tempbufindex, and tempbufsize,
which together maintain a dynamically expandable static buffer
	for the lexer to use when translating C strings to their internal
	form (other future uses possible).  Fix parsing of C style strings
	to do the normal C style input conversions of escaped character
	sequences.
	* valops.c (value_string):  Remove translation of escaped
	character sequences, now done in C expression parser.
1992-11-24 03:02:10 +00:00
Fred Fish 5707ea9fad * language.h (PRINT_LITERAL_FORM): New macro that takes character
and decides if it should be printed in literal form or some other
	form, based on it's ASCII value and setting of sevenbit_strings.
	* {c-exp.y, m2-exp.y} (emit_char):  Use new PRINT_LITERAL_FORM
	macro, change indentation style.
	**** start-sanitize-chill ****
	* ch-exp.y (chill_printchar):  Use new PRINT_LITERAL_FORM macro.
	* ch-exp.y (chill_printstr):  First cut at real function instead
	of error stub.
	**** end-sanitize-chill ****
1992-11-23 19:57:29 +00:00
Fred Fish 5d074aa977 * defs.h (sevenbit_strings): Add declaration.
* defs.h (printchar):  Replace with gdb_printchar.
	* language.h (language_defn):  Add new function pointers
	la_printchar and la_printstr, to do language dependent
	printing of characters and strings.
	* language.h (local_printchar, local_printstr):  New macros
	to call language dependent functions pointed to by la_printchar
	and la_printstr respectively.
	* c-exp.y (emit_char, c_printchar, c_printstr):  New language
	dependent functions for printing characters and strings.
	* c-exp.y (c_language_defn, cplus_language_defn):  Add
	c_printchar and c_printstr.
	* command.c (do_setshow_command):  Rename printchar use to
	gdb_printchar.
	* expprint.c (print_subexp):  Replace C style string output
	with call to local_printstr.
	* language.c (unk_lang_printchar, unk_lang_printstr):
	New stubs, currently errors.
	* language.c (unknown_language_defn, auto_language_defn,
	local_language_defn):  Add unk_lang_printchar and
	unk_lang_printstr.
	* m2-exp.y (emit_char, m2_printchar, m2_printstr):  New
	language dependent functions to print characters and strings.
	* m2-exp.y (m2_language_defn):  Add m2_printchar and m2_printstr.
	* utils.c (printchar):  Renamed to gdb_printchar.
	* valprint.c (print_string):  Remove prototype, function moved
	to c-exp.y, where it becomes c_printstr.
	* valprint.c (print_max):  Made global for reference from the
	language dependent printing routines in *-exp.y.
	* valprint.c (repeat_count_threshold):  New variable with function
	of old REPEAT_COUNT_THREHOLD define, but now settable by user.
	Change all references to old macro to references to new variable.
	* valprint.c (value_print, val_print):  Replace calls to
	print_string with calls to local_printstr.
	* valprint.c (val_print):  Replace C style character printing
	with call to local_printchar.
	* valprint.c (val_print):  Add case for TYPE_CODE_CHAR.
	* valprint.c (_initialize_valprint):  Add add_show_from_set
	call for setting up repeat_count_threshold as print variable.
	**** start-sanitize-chill ****
	* ch-exp.y (decode_integer_value):  New function.
	* ch-exp.y (decode_integer_literal):  Use decode_integer_value.
	* ch-exp.y (chill_printchar, chill_printstr):  New language
	dependent functions for printing characters and strings.
	* ch-exp.y (chill_language_defn):  Add chill_printchar and
	chill_printstr.
	**** end-sanitize-chill ****
1992-11-21 06:10:08 +00:00
Fred Fish 2e66cf7d6d * language.h (language_format_info): New structure to bundle
local formatting information.
	* language.h (language_defn):  Replace individual format info
	with language_format_info structs.
	* language.h (local_*_format, local_*_format_prefix,
	local_*_format_specifier, local_*_format_suffix):  New macros
	for binary/octal/decimal/hex formats to access info elements.
	* c-exp.y (c_language_defn):  Update for new format handling.
	* m2-exp.y (m2_language_defn):  Update for new format handling.
	* dbxread.c (language.h):  Include for partial-stab.h use.
	* defs.h (local_hex_format, local_hex_format_custom,
	local_hex_string, local_hex_string_custom):  Move to language.h.
	* language.c (local_hex_format_custom, local_hex_string,
	local_hex_string_custom, local_octal_format_custom):  Use new
	format handling.
	* language.c (unknown_language_defn, auto_language_defn,
	local_language_defn):  Update for new format handling.
	* printcmd.c (print_scalar_formatted):  Use new macros
	to access decimal and binary format info for printing.
	**** start-sanitize-chill ****
	* c-exp.y (chill_language_defn):  Update for new format handling.
	* ch-exp.y (CHARACTER_LITERAL):  Add support to yylex.
	* ch-exp.y (match_integer_literal):  Add function.
	* ch-exp.y (builtin_type_chill_char):  Add definition.
	* gdbtypes.h (builtin_type_chill_char):  Add declaration.
	**** end-sanitize-chill ****
1992-11-18 22:49:38 +00:00
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
Steve Chamberlain 2e6edad13c * c-exp.y: separated host/target idea of integer type size,
removed redundant parse rules. (YYSTYPE): added typed_val, removed
	UINT and CHAR rules. (parse_number): work out the targetwise type
	of a number based upon it's size and qualifiers. (yylex): chars
	are now treated the same way as ints.

	* source.c (indentify_source_line): don't core dump if wanted
	line is larger than number of lines in source. (can happen when
	coff gets confused about #included source).
1992-11-06 18:37:20 +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
Per Bothner 10a297b791 * c-exp.y: Moved handling of 'const' and 'volatile' from
<type> to <typebase>.  This removes 2 conflicts.
1992-10-19 19:46:05 +00:00
John Gilmore 2640f7e138 Removed a large number of changes inserted by Per Bothner
for C++ support.  These will go back in when they've been
examined.
1992-09-10 00:07:06 +00:00
Per Bothner 35fcebce93 A ton of changes to improve C++ debugging. See ChangeLog. 1992-09-04 07:37:18 +00:00
Per Bothner a252e71520 * gdbtypes.c, gdbtypes.h: New function lookup_signed_typename.
* c-exp.y:  Call lookup_signed_typename() after seeing
	"signed".  This handles "signed char" correctly.
	* c-exp.y:  Recognize (but ignore) 'const' and 'volatile'
	keywords before a type specifier.
1992-07-10 23:30:40 +00:00
Michael Tiemann 368c8614bc Minor changes to make these work with bison again. 1992-07-09 11:47:50 +00:00
Fred Fish 866ecded64 Only treat "class" as a token if the current language is C++. 1992-07-09 07:15:11 +00:00
Fred Fish 8050a57b2c * dwarfread.c (alloc_utype, decode_subscr_data): Call alloc_type
to create new blank types, instead of handcrafting them.
	* defs.h (printfi_filtered):  Add prototype.
	* utils.c (printfi_filtered):  New function.
	* gdbtypes.c (recursive_dump_type):  Use printfi_filtered to
	to simplify the code.  Other cleanups.
	* gdbtypes.c (check_stub_method):  Demangle using DMGL_ANSI.
	* gdbtypes.h (struct cplus_struct_type):  Add comments describing
	use of various fields.
	* gdbtypes.c (print_bit_vector, print_cplus_stuff):  New functions.
	* c-exp.y (%token):  Add CLASS as a token for C++, add grammar
	production that currently treats it exactly the same as STRUCT.
	* c-exp.y (yylex):  Recognize "class" as token CLASS.
	* symtab.c (gdb_mangle_name):  Rewrite to match current g++ stabs.
	* symtab.c (decode_line_1):  Fix to pass quoted args on down to
	general symbol handling code.  Call cplus_mangle_opname with
	DMGL_ANSI.
	* symtab.c (decode_line_2):  Print demangled function names in
	breakpoint menus, instead of just file and line number.
	* symtab.c (name_match):  Call cplus_demangle with DMGL_ANSI.
	* valprint.c (type_print_base):  Print "class" for C++ classes,
	rather than "struct".  Print section labels for public, protected
	and private members of C++ classes.
	* values.c:  Include demangle.h.
	* values.c (value_headof):  Call cplus_demangle with DMGL_ANSI.
1992-07-09 04:40:39 +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
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 d630b6150e * c-exp.y (yylex): Recognize single-quoted strings that specify
tokens with embedded whitespace, such as C++ demangled names.
	* defs.h (demangle_and_match, strcmp_iw, skip_quoted):  Prototypes.
	* main.c (gdb_completer_quote_characters):  Add global variable.
	* main.c (symbol_completion_function):  Total rewrite for C++
	demangled name handling.
	* main.c (skip_quoted):  New function.
	* main.c (main):  Set rl_completer_quote_characters.
	* symmisc.c (dump_symtab):  Print source language for symtab.
	* symtab.c (expensive_mangler):  Add prototype and function.
	* symtab.c (completion_list_add_symbol):  Total rewrite for new
	C++ demangled name handling.
	* symtab.c (lookup_symbol): Check for demangled C++ symbol first,
	other changes for demangled C++ symbol handling.
	* symtab.c (lookup_demangled_block_symbol):  Use demangle_and_match.
	* symtab.c (lookup_demangled_partial_symbol):  Use demangle_and_match.
	* symtab.c (decode_line_1):  Recognize C++ demangled names on input.
	* symtab.c (completion_list_add_symbol):  Total rewrite for new
	C++ demangled name handling.
	* symtab.c (expensive_mangler):  New function.
	* utils.c (strcmp_iw, demangle_and_match):  New functions.
	* xcoffread.c (aixcoff_symfile_read):  Fix prototype.
1992-06-09 06:09:33 +00:00
Fred Fish 6c316cfd66 * inflow.c (new_tty): Temporarily ignore SIGTTOU when
disconnecting from controlling terminal, to avoid gdb hanging
	on SVR4.  Fixes bug reported by Oliver Okrongli.
	* procfs.c (PROC_NAME_FMT):  Change format to match default used
	by system, as suggested by Oliver Okrongli.
	* tm-68k.h (FRAME_FIND_SAVED_REGS):  Apply missing parentheses
	bug fix from Brent Townshend (bst%tt@cam.ORG).
	* c-exp.y (nonempty_typelist):  Fix memory overrun bug reported
	by turlais@rechser.total.fr.
	* dwarfread.c (decode_subscr_data):  Fix bug in calculation of
	length of non-zero lowerbound arrays.  Bug fix from Peggy Fieland.
	* objfiles.h (unlink_objfile):  Add prototype.
	* objfiles.c (unlink_objfile):  Add function.
	* objfiles.c (free_objfile):  Call unlink_objfile.
	* objfiles.c (allocate_objfile):  Call unlink_objfile on newly
	remapped objfiles.  Bug reported by hahn@sunshine.labs.tek.com.
	Also, discard old possibly bogus sf struct.
	* symfile.c (symbol_file_add):  Call init_entry_point_info() and
	find_sym_fns() for remapped symbol files, in case of any changes
	since the last mapping.
1992-05-17 23:54:32 +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
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
Per Bothner d26b50b794 c-exp.y: Add missing return type to yyparse() prototype. 1992-03-30 22:19:14 +00:00
John Gilmore be772100b5 Lint 1992-03-29 23:26:47 +00:00
Per Bothner 04f27ddc6d * c-exp.y, gdbtypes.h: Add builtin_type_signed_char.
* cplus-dem.c:  Support "Sc" meaning "signed char".
1992-03-26 08:33:43 +00:00
Per Bothner 01be69139e More C++ improvements (pointers to members, qualified names). See ChangeLog. 1992-03-20 21:57:17 +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 5a4e721505 * buildsym.c (read_struct_type): Circumvent sun3 sunos "--" compiler bug.
* c-exp.y (yylex):  `this' and `template' are only tokens in C++.
* target.c (target_xfer_memory):  Return errno in preference to EIO.
1992-01-27 22:10:05 +00:00
John Gilmore 2a5ec41d88 Fix things pointed up by Fred Fish's test suite; see ChangeLog. 1991-12-05 11:56:20 +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
Sean Eric Fagan d671e293c3 Fixed a syntax error. 1991-11-16 07:24:23 +00:00
David Henkel-Wallace 4c53d9ca84 ansi name abuse changes 1991-11-15 23:16:29 +00:00
Per Bothner 0e2a896cf5 Fixes related to handling of C++ methods (handle destructors
and parameters that are functions).
1991-11-12 22:20:02 +00:00
Per Bothner 545af6ce07 Add C++ as a separate language.
Also, fix a C++ problem when looking for methods in super-classes.
(There was confusion between base and derived types.)
1991-11-06 01:08:21 +00:00
John Gilmore b90c4f33cd * c-exp.y (yyerror): Pass error message if given.
* configure.in:  Add rs6000 host and target.
* inflow.c (new_tty):  O_NOCTTY kludge for RS/6000.
* symfile.h (entry_point):  Add.
1991-10-27 22:27:15 +00:00
Fred Fish e2aab0314f Add three new builtin types (builtin_type_long_double, builtin_type_complex,
and builtin_type_double_complex).  Also add and use various TARGET_<TYPE>_BIT
macros to indicate the sizes of various types on the target machine.
1991-10-24 10:58:41 +00:00
John Gilmore 5b0a744f98 * c-exp.y: sym->class to SYMBOL_CLASS (sym).
* dbxread.c (dbx_lookup_type):  Keep doubling size of typevector
until it is large enough.
1991-10-04 03:17:46 +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