Commit Graph

241 Commits

Author SHA1 Message Date
Stu Grossman cd10c7e388 * breakpoint.c (breakpoint_re_set): #ifdef GET_LONGJMP_TARGET
around calls to create_longjmp_breakpoint.  Why install the
	breakpoints if we can't find the longjmp target?
	* infrun.c (wait_for_inferior):  Cleanup comments near call test.
	* remote-mips.c:  Fixed a bunch of prototypes to avoid char/int
	complaint from picky compilers.  Add comment to mips_expect.
	Replace all instances of sr_get_debug with remote_debug.
	* (mips_readchar):  Don't jam init string to monitor.
	mips_initialize() handles that.
	* (mips_receive_header):  Print better message when we get too
	much garbage.
	* (mips_request):  Allow caller to pass in buff to allow them to
	analyze the returned message.
	* (mips_initialize):  Re-do initialization to try sending a BREAK,
	a ^C, and then a download escape sequence.  Cleanup protocol
	startup.  Eliminate sleeps.  Clear breakpoints (if using monitor
	breakpoints).  Re-init frame.
	* (mips_detach):  Close down target.
start-sanitize-gm
	* (mips_resume):  Pass signal down to target.
	* (mips_create_inferior):  Start target with TARGET_SIGNAL_PWR.
end-sanitize-gm
	* (mips_wait):  Handle return status with registers, or breakpoint stuff.
	* (mips_kill):  Add ^C handling.
	* (mips_insert_breakpoint mips_remove_breakpoint):  Call new
	breakpoint stuff if enabled.
	* (calculate_mask remote_mips_set_watchpoint
	remote_mips_remove_watchpoint remote_mips_stopped_by_watchpoint):
	Hardware watchpoint/breakpoint stuff.
	* (common_breakpoint):  Common code for new monitor breakpoint commands.
	* (mips_load):  Don't use `prompt'.  It's a global variable.
	* top.c (dont_repeat_command):  New command for use in
	user-defined commands to suppress auto-repeat (by hittin return key).
start-sanitize-gm
	* utils.c (request_quit):  Call target_kill here.  Good idea.
	Needs a better implementation.
end-sanitize-gm
	* valops.c:  Add start of auto function-call abandonment capability.

start-sanitize-gm
	* c-exp.y:  Add code (currently disabled) to handle GM dynamic
	structures (it conflicts with @!).
	* eval.c (evaluate_subexp_standard):  ditto.
	* expprint.c (print_subexp dump_expression):  ditto.
	* expression.h (enum exp_opcode):  ditto.
	* parse.c (length_of_subexp):  ditto.
	* configure, configure.in:  Add mip*-*-magic* target.
	* magic.c magic.h:  Special routines to handle GM stuff (like
	stepping through dispatcher).
end-sanitize-gm
1995-10-27 17:48:36 +00:00
Per Bothner c700638ca7 * parse.c (write_dollar_variable): New function.
* c-exp.y (yylex):  Replace code for recognizing '$' pseudo-variables
	with a call to write_dollar_variable.
	Simplify grammar correspondingly.
	* f-exp.y:  Likewise.
	* m2-exp.y:  Likewise.
	* ch-exp.y:  Likewise.  (Remove function match_dollar_tokens.)
	* scm-exp.c (scm_lreadr):  Call write_dollar_variable to handle '$'.
1995-10-05 22:15:49 +00:00
Per Bothner 3c02944a98 * expression.h (enum exp_code): Added OP_NAME.
* expprint.c (print_subexp):  Add OP_NAME support.
	* parse.c (length_of_subexp, prefixify_subexp):  Likewise.
	* scm-lang.c (scm_unpack, in_eval_c, scm_lookup_name):  new function.
	* scm-lang.h:  Declare builtin_type_scm;  other minor tweaks.
	* values.c (unpack_long):  If type is SCM, call scm_unpack.
	* scm-valprint.c (scm_val_print):  Use extract_signed_integer,
	instead unpack_long
	* scm-lang.c: More Scheme expression parsing from here ...
	* scm-exp.c:  ... to here.  New file.
	Also, provide for gdb to evaluate simple constants and names..
	* Makefile.in:  Note new scm-exp.{c,o}.
1995-10-05 05:24:41 +00:00
Per Bothner 0e4ca328e1 * defs.h (enum language): Add language_scm.
* expression.h (enum exp_code):  Added OP_EXPRSTRING.
	* scm-lang.c:  Preliminary support for Guile /SCM dialect of Scheme.
	* expprint.c (print_subexp):  Add OP_EXPRSTRING support.
	* parse.c (length_of_subexp, prefixify_subexp):  Likewise.
	* valops.c (find_function_in_inferior):  New function.
	(value_allocate_space_in_inferior):  New function.
	(allocate_space_in_inferior):  Redefine using previous function.
	* Makefile.in (SFILES):  Add scm-lang.c.
	(COMMON_OBS):  Add scm-lang.o
1995-09-29 01:43:54 +00:00
Fred Fish 6c9638b444 Update FSF address. 1995-08-02 03:41:12 +00:00
J.T. Conklin 2b57629364 * configure.in: Check for working mmap, ansi headers, string.h,
strings.h, and memory.h.
* configure: Regenerated.

* gdb_stat.h: New file, "portable" <sys/stat.h>.
* gdb_string.h: New file, "portable" <string.h>.

* altos-xdep.c, arm-tdep.c, arm-xdep.c, convex-tdep.c,
convex-xdep.c, coredep.c, cxux-nat.c, dbxread.c, exec.c,
gould-xdep.c, hppa-tdep.c, i386aix-nat.c, i386b-nat.c,
i386mach-nat.c, i386v-nat.c, infptrace.c, m88k-nat.c, main.c,
mdebugread.c, objfiles.c, os9kread.c, procfs.c, pyr-xdep.c,
rs6000-nat.c, source.c, standalone.c, stuff.c, sun386-nat.c,
symfile.c, symm-nat.c, symm-tdep.c, symtab.c, top.c, ultra3-nat.c,
ultra3-xdep.c, umax-xdep.c, xcoffread.c: Include "gdb_stat.h"
instead of <sys/stat.h>.

* alpha-tdep.c, breakpoint.c, buildsym.c, c-typeprint.c,
ch-typeprint.c, coffread.c, command.c, core-sol2.c, core-svr4.c,
core.c, corelow.c, cp-valprint.c, dbxread.c, dcache.c, demangle.c,
dpx2-nat.c, dstread.c, dwarfread.c, elfread.c, environ.c, eval.c,
exec.c, f-lang.c, f-typeprint.c, f-valprint.c, findvar.c,
fork-child.c, gdbtypes.c, hpread.c, i386-tdep.c, infcmd.c,
inflow.c, infptrace.c, infrun.c, irix5-nat.c, language.c,
m2-typeprint.c, main.c, mdebugread.c, minsyms.c, mipsread.c,
monitor.c, nlmread.c, objfiles.c, os9kread.c, osfsolib.c, parse.c,
printcmd.c, procfs.c, regex.c, remote-adapt.c, remote-arc.c,
remote-array.c, remote-bug.c, remote-e7000.c, remote-eb.c,
remote-es.c, remote-hms.c, remote-mm.c, remote-os9k.c,
remote-pa.c, remote-sim.c, remote-st.c, remote-udi.c,
remote-utils.c, remote-vx.c, remote-vx29k.c, remote-vx68.c,
remote-vx960.c, remote-vxmips.c, remote-vxsparc.c, remote.c,
solib.c, somread.c, source.c, stabsread.c, stack.c, symfile.c,
symmisc.c, symtab.c, target.c, top.c, typeprint.c, utils.c,
valarith.c, valops.c, valprint.c, values.c, xcoffread.c: Include
"gdb_string.h" instead of <string.h>.
* gdbtk.c: Likewise.

* config/xm-sysv4.h, i386/xm-ptx.h, m68k/xm-sun3os4.h,
sparc/xm-sun4os4.h (HAVE_MMAP): Removed.

* config/xm-lynx.h, config/i386/xm-ptx.h,
config/m68k/nm-apollo68b.h, config/m68k/xm-hp300hpux.h,
config/mips/xm-irix3.h, config/mips/xm-mips.h,
config/mips/xm-news-mips.h, config/mips/xm-riscos.h,
config/pa/hppah.h, config/rs6000/xm-rs6000.h,
config/sparc/xm-sun4os4.h, config/sparc/xm-sun4sol2.h,
config/vax/xm-vaxbsd.h, config/vax/xm-vaxult.h,
config/vax/xm-vaxult2.h (MEM_FNS_DECLARED): Removed.
* config/mips/xm-irix3.h, config/mips/xm-mips.h,
config/pa/xm-hppah.h (memcpy, memset): Removed declarations.
1995-08-01 20:14:27 +00:00
Jim Kingdon 36633dcc4a * valops.c (value_cast, value_slice), parse.c (follow_types): Add
FIXME-type-allocation comments.
1995-03-14 14:59:24 +00:00
Per Bothner fda36387eb * parse.c (follow_types): Given (TYPE[]) (i.e. with no length),
create a 0-length array type, and set BOUND_CANNOT_BE_DETERMINED.
	* valops.c (value_cast):  If a cast like (TYPE[])VALUE (i.e. array
	of unknown length) use sizeof(VALUE)/sizeof(TYPE) as the length.
	* c-typeprint.c (c_type_print_varspec_suffix):  If array length
	is 0, print it, but not if upper_bound is BOUND_CANNOT_BE_DETERMINED.
1995-02-17 23:20:29 +00:00
Per Bothner 8a32900233 * f-typeprint.c (f_type_print_varspec_suffix): Print array index
ranges in reverse order.
	* f-valprint.c (f77_create_arrayprint_offset_tbl):  Fix calculation.

	* eval.c (evaluate_subscript):  Don't call value_subscript, since
	it adjusts for lower bound and enforces ranges.

	* expression.h (exp_code):  Remove MULTI_F77_SUBSCRIPT, OP_F77_SUBSTR.
	* eval.c, parse.c:  Removed uses of removed opcodes.
1995-02-02 05:23:51 +00:00
Per Bothner ead95f8ac2 * eval.c (evaluate_subexp): Clean up handling of
OP_UNDETERMINED_ARGLIST (no backtracking, more general).

	* f-valprint.c (f_val_print):  Print TYPE_CODE_STRING using
	LA_PRINT_STRING, and not val_print_string (which reads from inferior).

	* ch-lang.c (chill_is_varying_struct), ch-lang.h:  Remve function
	duplicate function made redundant by chill_varying_type.

	Re-write of f77 string and complex number support:

	* language.h (struct language_defn):  New fields string_lower_bound
	and string_char_type.
	* c-lang.c (c_language_defn, cplus_language_defn, asm_language_defn),
	language.c (unknown_language_defn, auto_language_defn,
	local_language_defn), m2-lang.c (m2_language_defn), f-lang.c
	(f_language_defn), ch-lang.c (chill_language_defn):  Set new fields.
	* gdbtypes.c (create_string_type):  Use new string_char_type field.
	* valops.c (value_string):  Use new string_lower_bound field.

	* defs.h (TARGET_COMPLEX_BIT, TARGET_DOUBLE_COMPLEX_BIT):  Removed.
	* f-lang.c (f_create_fundamental_type, _initialize_f_language),
	m2-lang.c (m2_create_fundamental_type),
	gdbtypes.c (_initialize_gdbtypes):  Set TYPE_TARGET_TYPE of complex
	types.  Set their TYPE_CODEs to TYPE_CODE_COMPLEX.
	* mdebugread.c (mdebug_type_complex, mdebug_type_double_complex):
	Removed.  Use builtin_type_complex and builtin_type_double_complex.

	* gdbtypes.h (enum type_code):  Removed TYPE_CODE_LITERAL_STRING
	and TYPE_CODE_LITERAL_COMPLEX.
	* c-typeprint.c, f-typeprint.c, f-valprint.c, eval.c:  Removed uses of
	TYPE_CODE_LITERAL_STRING and TYPE_CODE_LITERAL_COMPLEX.
	* gdbtypes.c, gdbtypes.h (f77_create_literal_complex_type,
	f77_create_literal_string_type):  Removed.
	* value.h (VALUE_LITERAL_DATA, VALUE_SUBSTRING_MEMADDR,
	VALUE_SUBSTRING_MYADDR):  Removed.

	* expression.h (enum exp_opcode):  Rename OP_F77_LITERAL_COMPLEX to
	OP_COMPLEX.
	* parse.c:  Update accordingly.

	* f-valprint.c (f77_print_cmplx):  Removed.
	(f_val_print case TYPE_CODE_COMPLEX):  Re-write to use print_floating.

	* f-exp.y (STRING_LITERAL):  Use OP_STRING instead of OP_ARRAY.
	* eval.c (evaluate_subexp):  For case OP_ARRAY, don't call
	f77_value_literal_string.
	* valops.c, value.h (f77_value_literal_string, f77_value_substring,
	f77_assign_from_literal_string, f77_assign_from_literal_complex):
	Removed.
	(value_assign):  No longer need to handle literal types.
	* valops.c (f77_value_literal_complex), value.h:  Re-written and
	renamed to value_literal_complex.  Last arg is now a (complex) type.
	* valops.c (f77_cast_into_complex):  Re-written and renamed to
	cast_into_complex.
	* eval.c (evaluate_subexp):  Update accordingly.
1995-02-02 03:37:26 +00:00
Per Bothner f91a9e05e0 * ch-exp.y (value_string_element, string_primitive_value,
start_element, left_element, right_element, slice_size,
	lower_element, upper_element, first_element):  Removed.
	(value_string_slice, value_array_slice):  Replaced by ...
	(slice):  New non-terminal, with working slice support.
	(primitive_value_lparen, rparen):  New non-terminals.
	(maybe_tuple_elements):  New non-terminal, to allow empty tuples.
	(idtokentab):  Added "up".

	* value.h (COERCE_VARYING_ARRAY):  New macro.
	* valarith.c (value_subscript):  Use it.
	* valops.c (value_cast):  Likewise.  Also, do nothing if already
	correct type, and allow converting from/to range to/from scalar.

	* valops.c, value.h (varying_to_slice, value_slice):  New functions.
	* eval.c (OP_ARRAY):  Add cast for array element.
	* expression.h (TERNOP_SLICE, TERNOP_SLICE_COUNT):  New exp_opcodes.
	* valops.c (chill_varying_type):  Moved function frp, here ...
	* gdbtypes.c (chill_varying_type), gdbtypes.h: ... to here.
	* parse.c (length_of_subexp, prefixify_subexp):  Add support
	for TERNOP_SLICE, TERNOP_SLICE_COUNT.
	* expprint.c (print_subexp, dump_expression):  Likewise.
	* eval.c (evaluate_subexp):  Likewise.

	* eval.c (evaluate_subexp case MULTI_SUBSCRIPT):  Don't call
	value_x_binop on a Chill varying string.
1995-02-01 21:02:51 +00:00
Per Bothner dcda44a07a * expression.h (OP_LABELED): New operator, for Chill
labeled structre tuples.
	* ch-exp.y (tuple_element, named_record_element, tuple_elements):
	New non-terminals, to handle labeled structure tuples.
	(tuple):  Re-define using tuple_elements.
	* eval.c (evaluate_labeled_field_init):  New function, to handle
	initialization of structure fields, possibly using OP_LABELED.
	(evaluate_subexp):  Use it.
	* expprint.c (print_subexp case):  For OP_ARRAY, use Chill syntax
	for Chill.  Handled OP_LABELED.
	* parse.c (length_of_subexp, prefixify_subexp):  Handle OP_LABELED.

	* eval.c (evaluate_subexp):  Handle Chill Powerset tuples.
	* valarith.c (value_bit_index):  Just treat bitstring as represented
	by an array of bytes.  Alignment is handled by compiler.
1995-01-20 23:45:21 +00:00
Jim Kingdon eedb3363e8 * parse.c (_initialize_parse): Improve wording of names of
msym_*_symbol_type.
1995-01-17 21:47:38 +00:00
Jim Kingdon 3fb93d868b * parse.c (write_exp_msymbol): Use new variables
msym_*_symbol_type as type of msymbol expression.
	(_initialize_parse): Initialize them.
1995-01-17 16:16:20 +00:00
Peter Schauer 4461196e69 * parse.c (msymbol_addr_type): Replaced by
lookup_pointer_type (builtin_type_void).

	* printcmd.c (_initialize_printcmd):  Give examine_*_type
	a name for `ptype $_'.

	* printcmd.c (print_formatted): Call val_print_string directly,
	rather than via value_print.
1994-12-02 20:55:16 +00:00
Stan Shebs a91a61923d Initial Fortran language support, adapted from work by Farooq Butt
(fmbutt@engage.sps.mot.com).
	* Makefile.in: Add Fortran-related files and dependencies.
	* defs.h (language_fortran): New language enum.
	* language.h (_LANG_fortran): Define.
	(MAX_FORTRAN_DIMS): Define.
	* expression.h: Reformat to standard.
	(MULTI_F77_SUBSCRIPT, OP_F77_UNDETERMINED_ARGLIST,
	OP_F77_LITERAL_COMPLEX, OP_F77_SUBSTR): New expression opcodes.
	* gdbtypes.h (TYPE_CODE_COMPLEX, TYPE_CODE_LITERAL_COMPLEX,
	TYPE_CODE_LITERAL_STRING): New type codes.
	(type): New fields upper_bound_type and lower_bound_type.
	(TYPE_ARRAY_UPPER_BOUND_TYPE, TYPE_ARRAY_LOWER_BOUND_TYPE,
	TYPE_ARRAY_UPPER_BOUND_VALUE, TYPE_ARRAY_LOWER_BOUND_VALUE): New
	macros.
	(builtin_type_f_character, etc): Declare.
	* value.h (VALUE_LITERAL_DATA, VALUE_SUBSTRING_START): Define.
	* f-exp.y: New file, Fortran expression grammar.
	* f-lang.c: New file, Fortran language support functions.
	* f-lang.h: New file, Fortran language support declarations.
	* f-typeprint.c: New file, Fortran type printing.
	* f-valprint.c: New file, Fortran value printing.
	* eval.c (evaluate_subexp): Add code for new expression opcodes,
	fix wording of error message.
	* gdbtypes.c (f77_create_literal_complex_type,
	f77_create_literal_string_type): New functions.
	* language.c (set_language_command): Add Fortran info.
	(calc_f77_array_dims): New function.
	* parse.c (length_of_subexp, prefixify_subexp): Add cases for new
	expression opcodes.
	* symfile.c (deduce_language_from_filename): Recognize .f and .F
	as Fortran source files.
	* valops.c (f77_value_literal_string, f77_value_substring,
	f77_value_literal_complex): New functions.
1994-08-19 21:59:05 +00:00
Jim Kingdon 703e4251af * parse.c: Don't define block_found; it is defined in symtab.c.
* parser-defs.h: Add comment regarding block_found.
1994-04-20 15:48:08 +00:00
Peter Schauer ae6d035d28 For Sunos 4.x targets, enable gdb to set breakpoints in shared
library functions before the executable is run. Retrieve dynamic
	symbols from stripped executables.
	* symtab.h (minimal_symbol_type):  Add mst_solib_trampoline type.
	* parse.c (write_exp_msymbol), symmisc.c (dump_msymbols),
	symtab.c (list_symbols):  Handle mst_solib_trampoline.
	* minsyms.c (lookup_minimal_symbol):  Handle mst_solib_trampoline
	for all targets, remove IBM6000_TARGET dependencies.
	* dbxread.c (read_dbx_dynamic_symtab):  New function.
	* dbxread.c (dbx_symfile_read):  Use it.
	* dbxread.c (SET_NAMESTRING):  Set namestring to
	"<bad string table index>" instead of "foo" if the string index is
	corrupt.
	* xcoffread.c (read_xcoff_symtab):  Use mst_solib_trampoline instead
	of mst_unknown.
	* symtab.c (list_symbols):  Take from_tty as parameter and pass it
	to break_command. Handle mst_file_* minimal symbol types.
1994-03-15 21:46:32 +00:00
Jim Kingdon 7944822188 * parser-defs.h: Add "extern" to start of variable declarations so
we don't end up with commons.
	* parse.c: Define these variables.
1994-03-08 15:25:00 +00:00
Peter Schauer ba47c66add * README: Remove note about gcc warnings on alpha, these should be
gone now.
	* c-exp.y, ch-exp.y, core.c, corelow.c, eval.c, fork-child.c,
	m2-exp.y, minsyms.c, nlmread.c, parse.c, putenv.c, regex.c
	remote-utils.c, stabsread.c:  Include <string.h>.
	* regex.c:  Include "defs.h", change re_comp argument to const char *.
	* infptrace.c (fetch_register, store_inferior_registers):  Change
	regaddr to type CORE_ADDR.
	* config/alpha/alpha-nw.mt, config/alpha/alpha-osf1.mt (MT_CFLAGS):
	Remove, no longer necessary now that we use bfd_vma for a CORE_ADDR.
1994-02-08 09:01:03 +00:00
Jim Kingdon d92f3f0853 * parse.c (write_exp_msymbol): Use new type msymbol_addr_type instead
of builtin_type_long.  It is necessary to get a type which is
	TARGET_PTR_BIT bits in size; builtin_type_long might not be big enough.
1994-01-27 01:23:50 +00:00
Thomas Lord 199b2450f6 Change the stream argument to _filtered to GDB_FILE *.
Change all references to stdout/stderr to gdb_stdout/gdb_stderr.

Replace all calls to stdio output functions with calls to
corresponding _unfiltered functions (`fprintf_unfiltered')

Replaced calls to fopen for output to gdb_fopen.

Added sufficient goo to utils.c and defs.h to make the above work.

The net effect is that stdio output functions are only directly used
in utils.c.  Elsewhere, the _unfiltered and _filtered functions and
GDB_FILE type are used.

In the near future, GDB_FILE will stop being equivalant to FILE.

The semantics of some commands has changed in a very subtle way:
called in the right context, they may cause new occurences of
prompt_for_continue() behavior.  The testsuite doesn't notice anything
like this, though.

Please respect this change by not reintroducing stdio output
dependencies in the main body of gdb code.  All output from commands
should go to a GDB_FILE.

Target-specific code can still use stdio directly to communicate with
targets.
1993-11-01 22:25:23 +00:00
Jim Kingdon abe28b9214 Sun Oct 24 20:16:38 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
* parse.c, parser-defs.h (write_exp_msymbol):  New function to write
	the appropriate expression for a minimal symbol.
	* c-exp.y, m2-exp.y:  Use it.
1993-10-24 23:42:02 +00:00
Jim Kingdon f843c95fc3 * parse.c, parser-defs.h (follow_types): New function.
* c-exp.y (ptype : typebase abs_decl): Use it.
	* c-exp.y (ptype): Add support for type qualifiers after the
	typebase.  The typebase rule already has support for them before
	the typebase.
	* Makefile.in: Change the expected number of shift/reduce
	conflicts to 6.  This is OK--the 2 new conflicts are basically the
	same as one of the old ones.
1993-10-18 01:10:25 +00:00
Jim Kingdon 479fdd26ee * blockframe.c (block_innermost_frame): Uncomment.
Return NULL if passed NULL.
	* frame.h: Declare it.
	* expression.h (union exp_element): Add field block.
	* parse.c (write_exp_elt_block): New function.
	* expression.h (OP_VAR_VALUE): Now takes additional struct block *.
	* *-exp.y: Write block for OP_VAR_VALUE.
	* eval.c, expprint.c, parse.c: Deal with block for OP_VAR_VALUE.
	* valops.c, value.h (value_of_variable), callers:
	Add second argument, for block.
1993-08-18 19:33:39 +00:00
Fred Fish 9da75ad32e * c-exp.y (lcurly, rcurly): New nonterminals.
* c-exp.y (exp):  Use lcurly and rcurly for arrays and UNOP_MEMVAL
	constructs.
	* parse.c (free_funcalls):  Moved prototype from parser-defs.h,
	made function static.
	* parse.c (struct funcall):  Moved struct def from parser-defs.h.
	* parse.c (funcall_chain):  Moved from parser-defs.h, made static.
	* parse.c (start_arglist):
	* parser-defs.h (free_funcalls):  Moved prototype to parse.c.
	* parser-defs.h (struct funcall):  Moved struct def to parse.c.
	* parser-defs.h (funcall_chain):  Moved to parse.c.
	* printcmd.c (print_frame_nameless_args): Fix prototype.
	* tm-mips.h (setup_arbitrary_frame):  Fix prototype.
	* tm-sparc.h (setup_arbitrary_frame):  Fix prototype.
	* valops.c (typecmp):  Moved prototype from values.h.
	* value.h (typecmp):  Moved prototype to valops.c, made static.
	**** start-sanitize-chill ****
	* ch-exp.y (yylex):  Change way control sequences are disabled.
	**** end-sanitize-chill ****
1993-02-03 00:28:54 +00:00
Steve Chamberlain a332e59322 * remote-z8k.c, z8k-tdep.c: support for the Z8001 and Z8002.
* parse.c (std_regs): Only declare if NO_STD_REGS is defined.
1993-02-01 22:53:24 +00:00
Michael Tiemann 61c1724bfa Fix whitespace. 1993-01-31 13:15:12 +00:00
Fred Fish c4413e2c9b * c-exp.y (exp:STRING): Convert C strings into array-of-char
constants with an explicit null byte terminator.  OP_STRING is
	now used for real string types.
	* c-lang.c (builtin_type_*):  Move declarations to lang.c since
	they are used by all languages.
	* c-lang.c (_initialize_c_language):  Move initializations of
	builtin_type_* to lang.c.
	* c-typeprint.c (c_type_print_varspec_prefix,
	c_type_print_varspec_suffix):  TYPE_CODE_PASCAL_ARRAY renamed
	to TYPE_CODE_STRING.
	* c-valprint.c (c_val_print):  Change the way character arrays
	are printed as strings to be consistent with the way strings
	are printed when pointer-to-char types are dereferenced.
	Remove test of print_max before calling val_print_string, which
	now does it's own test.
	* eval.c (evaluate_subexp):  Add case for OP_ARRAY.
	* expprint.c (print_subexp, dump_expression):  Add case for OP_ARRAY.
	* expression.h (enum exp_opcode):  Add OP_ARRAY and document.
	* gdbtypes.c (builtin_type_*):  Add declarations moved from
	c-lang.c.
	* gdbtypes.c (create_string_type):  New function to create real
	string types.
	* gdbtypes.c (recursive_dump_type):  TYPE_CODE_PASCAL_ARRAY
	renamed to TYPE_CODE_STRING.
	* gdbtypes.c (_initialize_gdbtypes):  Add initializations of
	builtin_type_* types moved from c-lang.c.
	* gdbtypes.h (enum type_code):  TYPE_CODE_PASCAL_ARRAY renamed
	to TYPE_CODE_STRING.
	* gdbtypes.h (builtin_type_string):  Add extern declaration.
	* gdbtypes.h (create_string_type):  Add prototype.
	* m2-lang.c (m2_create_fundamental_type):  TYPE_CODE_PASCAL_ARRAY
	renamed to TYPE_CODE_STRING.
	* m88k-tdep.c (pushed_size):  TYPE_CODE_PASCAL_ARRAY renamed to
	TYPE_CODE_STRING.
	* mipsread.c (_initialize_mipsread):  TYPE_CODE_PASCAL_ARRAY
	renamed to TYPE_CODE_STRING.
	* parse.c (length_of_subexp, prefixify_subexp):  Add case for
	OP_ARRAY.
	* printcmd.c (print_formatted):  Recognize TYPE_CODE_STRING.
	* typeprint.c (print_type_scalar):  TYPE_CODE_PASCAL_ARRAY renamed
	to TYPE_CODE_STRING.
	* valops.c (allocate_space_in_inferior):  New function and
	prototype, using code ripped out of value_string.
	* valops.c (value_string):  Rewritten to use new function
	allocate_space_in_inferior, but temporarily disabled until some
	other support is in place.
	* valops.c (value_array):  New function to create array constants.
	* valprint.c (val_print_string):  Add comment to document use,
	complete rewrite to fix several small buglets.
	* value.h (value_array):  Add prototype.
	* value.h (val_print_string):  Change prototype to match rewrite.
	**** start-sanitize-chill ****
	* ch-valprint.c (chill_val_print):  Add case for TYPE_CODE_STRING.
	* ch-exp.y (match_character_literal):  Disable recognition of
	control sequence form of character literals and document why.
	**** end-sanitize-chill ****
1993-01-16 05:15:58 +00:00
Fred Fish 81028ab0e7 * defs.h (HOST_CHAR_BIT): New macro, defaults to either CHAR_BIT
from a configuration file (typically including <limits.h>), or to
	TARGET_CHAR_BIT if CHAR_BIT is not defined.
	* eval.c (evaluate_subexp):  Use new BYTES_TO_EXP_ELEM macro.
	* eval.c (evaluate_subexp):  Add case for OP_BITSTRING.
	* expprint.c (print_subexp):  Use new BYTES_TO_EXP_ELEM macro.
	* exppritn.c (print_subexp, dump_expression):  Add case for
	OP_BITSTRING.
	* expression.h (OP_BITSTRING):  New expression element type for
	packed bitstrings.
	* expression.h (EXP_ELEM_TO_BYTES, BYTES_TO_EXP_ELEM):  New
	macros to convert between number of expression elements and bytes
	to store that many elements.
	* i960-tdep.c (leafproc_return):  Use new macros to access
	minimal symbol name and address fields.
	* m88k-pinsn.c (sprint_address):  Use new macros to access
	minimal symbol name and address fields.
	* nindy-tdep.c (nindy_frame_chain_valid):  Use new macro to access
	minimal symbol address field.
	* parse.c (write_exp_elt, write_exp_string, prefixify_expression,
	parse_exp_1):  Use new EXP_ELEM_TO_BYTES macro.
	* parse.c (write_exp_string, length_of_subexp, prefixify_expression):
	Use new BYTES_TO_EXP_ELEM macro.
	* parse.c (write_exp_bitstring):  New function to write packed
	bitstrings into the expression element vector.
	* parse.c (length_of_subexp, prefixify_subexp):  Add case for
	OP_BITSTRING.
	* parser-defs.h (struct stoken):  Document that it is used for
	OP_BITSTRING as well as OP_STRING.
	* parser-defs.h (write_exp_bitstring):  Add prototype.
	**** start-sanitize-chill ****
	* ch-exp.y (BIT_STRING_LITERAL):  Change token type to sval.
	* ch-exp.y (NUM, PRED, SUCC, ABS, CARD, MAX, MIN, SIZE, UPPER,
	LOWER, LENGTH):  New tokens for keywords.
	* ch-exp.y (chill_value_built_in_routine_call, mode_argument,
	upper_lower_argument, length_argument, array_mode_name,
	string_mode_name, variant_structure_mode_name):  New non-terminals
	and productions.
	* ch-exp.y (literal):  Useful production for BIT_STRING_LITERAL.
	* ch-exp.y (match_bitstring_literal):  New lexer support function
	to recognize bitstring literals.
	* ch-exp.y (tokentab6):  New token table for 6 character keywords.
	* ch-exp.y (tokentab5):  Add LOWER, UPPER.
	* ch-exp.y (tokentab4):  Add PRED, SUCC, CARD, SIZE.
	* ch-exp.y (tokentab3):  Add NUM, ABS, MIN, MAX.
	* ch-exp.y (yylex):  Check tokentab6.
	* ch-exp.y (yylex):  Call match_bitstring_literal.
	**** end-sanitize-chill ****
1993-01-06 16:52:10 +00:00
Fred Fish 54bbbfb433 * eval.c (evaluate_subexp): Add case MULTI_SUBSCRIPT.
* expprint.c (print_subexp):  Rename BINOP_MULTI_SUBSCRIPT to
	MULTI_SUBSCRIPT.
	* expprint.c (dump_expression):  New function for dumping
	expression vectors during gdb debugging.
	* expression.h (BINOP_MULTI_SUBSCRIPT):  Name changed to
	MULTI_SUBSCRIPT and moved out of BINOP range.
	* expression.h (DUMP_EXPRESSION):  New macro that calls
	dump_expression if DEBUG_EXPRESSIONS is defined.
	* m2-exp.y (BINOP_MULTI_SUBSCRIPT):  Changed to MULTI_SUBSCRIPT.
	* parse.c (length_of_subexp, prefixify_subexp):  Change
	BINOP_MULTI_SUBSCRIPT to MULTI_SUBSCRIPT.
	* parse.c (parse_exp_1):  Call DUMP_EXPRESSION before and after
	prefixify'ing the expression.
	* printcmd.c (print_command_1):  Add comment.
	**** start-sanitize-chill ****
	* ch-exp.y (expression_list):  Add useful actions.
	* ch-exp.y (value_array_element):  Add useful actions.
	* ch-exp.y (array_primitive_value):  Add production.
	* ch-exp.y (yylex):  Recognize ',' as a token.
	**** end-sanitize-chill ****
1993-01-02 20:32:01 +00:00
Fred Fish d1065385c1 * parse.c (write_exp_string): Complete rewrite to store string
contants as a leading explicit length, followed by the string data,
	followed by a trailing explicit length.
	* eval.c (evaluate_subexp), expprint.c (print_subexp),
	parse.c (length_of_subexp), parse.c (prefixify_subexp):
	Use recorded explicit length of strings in expression elements,
	rather than strlen.  Adjust code to skip over strings stored in
	expression elements, and code to access strings, to account for
	new leading explicit size expression element.
	* parse.c (length_of_subexp):  Test for minimum endpos of 1, not
	0, to avoid negative expression element indices.
	* valops.c (search_struct_method):  Minor whitespace change.
1992-11-25 15:46:57 +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
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
John Gilmore be772100b5 Lint 1992-03-29 23:26:47 +00:00
Michael Tiemann d747e0af3d Tue Mar 3 15:11:52 1992 Michael Tiemann (tiemann@cygnus.com)
* All GDB files that #include defs.h: Removed stdio.h.
	(defs.h): #include stdio.h.

This has been tested by building GDBs for all targets hosted on Sun4.
None of the build problems were related to stdio.h inclusion.  (n.b.
many configurations don't build for other reasons.)
1992-03-03 23:26:26 +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 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
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