Commit Graph

178 Commits

Author SHA1 Message Date
Dawn Perchik 00d93b6d5e * stabsread.c: Changes and bug fixes for cfront support.
Fix bug for class data members.
	Fix parsing bug when no base classes exist.
	Fix memory bug - allocate space for cplusplus specific info.
	Add support for static data.
	Add prototypes for static functions.
	Enhance comments to show what each function expects to parse.
	Cleanup code.
	* stabsread.c(resolve_cont),dbxread.c(resolve_cont): Rename
	function to resolve_cfront_continuation.
1996-04-27 09:47:53 +00:00
Dawn Perchik 94f5a25f2e Add new support for parsing cfront stabs. 1996-04-24 19:34:45 +00:00
Per Bothner 15b03b5783 * stabsread.c (read_type): Move handling of '@' from type
number handling to handling of types proper (as emitted by gcc!).
	For typedefs, allocate the typedef type before reading its
	definition, to properly handling recursive types.
This fixes PR 9434.
1996-04-15 23:45:51 +00:00
Fred Fish b52cac6b76 * core-aout.c (fetch_core_registers): Cast core_reg_size to int
before testing against reg_ptr.
	* eval.c (evaluate_subexp_standard): Cast type of
	TYPE_FN_FIELD_VOFFSET to int.
	* findvar.c (extract_signed_integer, extract_unsigned_integer,
	extract_long_unsigned_integer): Cast type of sizeof to int.
	* values.c (unpack_field_as_long, modify_field): Ditto.
	* valops.c (value_assign, call_function_by_hand): Ditto.
	* infcmd.c (do_registers_info): Ditto.
	* ser-tcp.c (tcp_open): Ditto
	* remote.c (putpkt): Ditto.
	* dcache.c (dcache_peek): Ditto.
	* dcache.c (dcache_poke): Ditto.
	* m2-exp.y (yylex): Ditto.
	* gnu-regex.c (re_match_2): Ditto.
	* f-lang.c (ADD_BF_SYMNUM, saved_bf_list_end, tmp_bf_ptr): Ifdef
	out unused macro definition and variables.
	* inftarg.c (proc_wait): Move from main.c to here, and make static.
	* valprint.c (val_print_string): Change bufsize from int to unsigned.
	* main.c (wait.h): Include
	* top.c (command_line_input): Remove unused variable "c".
	* f-typeprint.c (f_type_print_varspec_prefix): Add missing enum
	value TYPE_CODE_TYPEDEF to switch statement.
	(f_type_print_varspec_suffix): Add missing enum value
	TYPE_CODE_TYPEDEF to switch statement.
	* ch-exp.c (parse_primval): Add remaining enumeration values to
	switch statement, with no specific action.
	(ch_lex): Add LOC_UNRESOLVED in switch statement.
	(pushback_token): Ifdef out, since code using it is ifdef'd out.
	* stabsread.c (cleanup_undefined_types): Remove unused label
	"badtype".
	* objfiles.h (print_symbol_bcache_statistics): Add prototype.
	* maint.c (objfiles.h): Include.
	(maintenance_print_statistics): Remove unused variable "temp".
	* minsyms.c (lookup_minimal_symbol_solib_trampoline): Remove
	unused variable "found_file_symbol".
	* m2-exp.y (yylex): Add LOC_UNRESOLVED case to switch.
	* language.c (lang_bool_type): Use existing function local type
	variable rather than create block local variables.
	* solib.c (disable_break): Enclose in ifndef SVR4_SHARED_LIBS.
	* infptrace.c (wait.h, command.h): Include.
	* ser-tcp.c (gdb_string.h): Include
	* i386-tdep.c (codestream_seek): Change "place" to CORE_ADDR.
	(i386_get_frame_setup): Change "pc" from int to CORE_ADDR.
	* command.c (complete_on_enum): Make assignment used as truth value
	explictly check against NULL.
	(wait.h): Include.
	* infrun.c (wait_for_inferior): Ifdef out prologue_pc since code
	that uses it is ifdef'd out.
	* parser-defs.h: Add prototype for write_dollar_variable.
	* infrun.c: Add prototype for write_pc_pid.
	* breakpoint.h: Add prototype for re_enable_breakpoints_in_shlibs.
	* symmisc.c (bcache.h): Include.
	* bcache.h: Add prototype for print_bcache_statistics.
	* symfile.c: Include <time.h>.
	* printcmd.c (print_scalar_formatted): Change len to unsigned int.
	* valarith.c (value_equal): Cast result of TYPE_LENGTH to int.
	* valarith.c (value_binop): Change result_len, promoted_len1,
 	and promoted_len2 to unsigned int.
	* valarith.c (value_subscripted_rvalue): Change elt_offs and
 	elt_size to unsigned int.
	* valops.c (value_array): Change typelength to unsigned int.
	(destructor_name_p): Change len to unsigned int.
	* scm-lang.h (scm_parse): Add prototype for scm_unpack.
	* symfile.c (decrement_reading_symtab): Change return type to void.
	* valarith.c (value_subscript): Remove unused variable "word".
	(value_subscript): Remove unused variable "tint".
	* valops.c (auto_abandon): Ifdef out, since code using it is also
	ifdef'd out.
	* eval.c (init_array_element): Remove unused variable "val".
	* Makefile.in (values.o): Depends on scm-lang.h.
	(command.o): Depends upon wait_h.
	(ser-tcp.o): Depends upon gdb_string.h.
	(infptrace.o): Depends upon wait_h and command_h.
	(maint.o): Depends on objfiles.h and symfile.h.
	* values.c (allocate_repeat_value): Remove unused variable
	"element_type".
	(scm-lang.h): Include.
	* breakpoint.c (create_longjmp_breakpoint): Enclose in
	GET_LONGJMP_TARGET define, unused otherwise.
	* config/i386/nm-linux.h: Add prototypes for i386_insert_watchpoint,
	i386_remove_watchpoint and i386_stopped_by_watchpoint.
1996-03-30 05:45:10 +00:00
Peter Schauer a97a483ca8 * partial-stab.h (case N_FUN): Function symbols generated
by SPARCworks cc have a meaningless zero value, do not update
	pst->textlow if the function symbol value is zero.

	* stabsread.c (define_symbol):  Initialize SYMBOL_TYPE field
	for function prototype declaration symbols.
1996-02-24 20:32:48 +00:00
Fred Fish 81afee37d0 * demangle.c (is_cplus_marker): New function, checks if a
character is one of the commonly used C++ marker characters.
	* defs.h (is_cplus_marker):  Add prototype.
	* c-typeprint.c (c_type_print_base), ch-lang.c (chill_demangle),
	cp-valprint.c (cp_print_class_method), mdebugread.c (parse_symbol),
	stabsread.c (define_symbol, read_member_functions, read_struct_fields),
	symtab.h (OPNAME_PREFIX_P, VTBL_PREFIX_P, DESTRUCTOR_PREFIX_P),
	values.c (vb_match):  Use is_cplus_marker instead of comparison
	with CPLUS_MARKER.
1996-02-16 06:14:15 +00:00
Fred Fish 6405302d01 * f-lang.c (allocate_saved_bf_node, allocate_saved_function_node,
allocate_saved_f77_common_node, allocate_common_entry_node,
	add_common_block): Use xmalloc rather than malloc, some of which
	were unchecked.
	* gnu-regex.c: At same point as other gdb specific changes
	#undef malloc and then #define it to xmalloc.
	* ch-exp.c (growbuf_by_size): Use xmalloc/xrealloc rather than
	bare unchecked calls to malloc/realloc.
	* stabsread.c (dbx_lookup_type): Use xmalloc rather than bare
 	unchecked call to malloc.
1996-02-12 21:03:12 +00:00
Per Bothner ec49fc987c * stabsread.c (read_range_type): If !self-subrange and language
is Chill, assume a true range.  If a true_range is a sub_subrange,
	use builtin_type_int for index_type.
This is for PR chill/8894.
1996-02-07 05:43:04 +00:00
Per Bothner c6038971d6 * stabsread.c (rs6000_builtin_type): Make bool type unsigned.
(read_one_struct_field):  Support boolean bitfields.
	* c-valprint.c (c_val_print): Print booleans properly.
1996-01-24 07:02:57 +00:00
Per Bothner 34cfa2dab5 * stabsread.c (read_struct_type): Trivial simplification.
* valops.c (call_function_by_hand):  Use invisible references
	for TYPE_CODE_SET and TYPE_CODE_BITSTRING too.
1996-01-12 07:12:42 +00:00
Per Bothner 1c486a2ba5 * stabsread.c (define-symbol): Use invisible references
for TYPE_CODE_SET and TYPE_CODE_BITSTRING too.
	* eval.c (evaluate_subexp_standard):  When known, use the formal
	parameter type as the expected type when evaluating arg expressions.
	* ch-lang.c (evaluate_subexp_chill):  Likewise (for MULTI_SUBSCRIPT).
This (with a fix to gcc/config/sparc/sparc.h) fixes PR chill/8742.
1996-01-12 01:31:37 +00:00
Fred Fish 0d14c7df68 From Wilfried Moser <wilfried.moser@aut.alcatel.at>:
* gdbserver/low-linux.c: New file.
	* remote.c (remote_read_bytes): Fix aborts on larger packets.

	* config/i386/linux.mh (GDBSERVER_DEPFILES, GDBSERVER_LIBS):
	Define.
	* stabsread.c (define_symbol): If register value is too large,
	tell what it is and what max is.
1996-01-10 18:40:24 +00:00
Fred Fish 2dd30c722b * defs.h: Delete extraneous whitespace at end of file.
* symfile.h: Move #include of demangle.h outside conditional.
	* objfiles.h (struct objstats, OBJSTAT, OBJSTATS): New struct
	and macros to hold per-objfile statistics for internal instrumentation.
	(struct objfile): Add OBJSTATS member, which is optional.
	* buildsym.h (next_symbol_text_func): Now takes objfile argument.
	Also update copyright to 1995.
	* dbxread.c (dbx_next_symbol_text): Now takes objfile argument.
	(dbx_symfile_init, coffstab_build_psymtabs, elfstab_build_psymtabs,
	stabsect_build_psymtabs): Accumulate string table size.
	(dbx_next_symbol_text, read_dbx_symtab, read_ofile_symtab):
	Accumulate number of stabs symbols read.
	* dwarfread.c (new_symbol, symthesize_typedef):
	Accumulate number of full symbols created.
	* gdbtypes.c (alloc_type): Accumulate number of types.
	* maint.c (maintenance_print_statistics): New function.
	* mdebugread.c (mdebug_next_symbol_text): Now takes objfile argument.
	* minsyms.c (prim_record_minimal_symbol_and_info): Accumulate
	number of minimal symbols read.
	* os9kread.c (read_os9k_psymtab): next_symbol_text takes objfile arg.
	* partial-stab.h: next_symbol_text takes objfile arg.
	* stabsread.c (error_type, STABS_CONTINUE): Now takes objfile arg and
 	uses it to call next_symbol_text.
	* symfile.c (add_psymbol_to_list, add_psymbol_addr_to_list):
	Accumulate number of partial symbols created.
	* symfile.h (ADD_PSYMBOL_VT_TO_LIST): Accumulate number of partial
	symbols created.
	* symmisc.c (print_objfile_statistics): Print the per-objfile
	internal instrumentation statistics gathered.
	* xcoffread.c (xcoff_next_symbol_text): Now takes objfile argument.
1995-12-21 04:08:27 +00:00
Per Bothner 5e54886116 * ch-exp.y: Replaced by ...
* ch-exp.c:  New file.  Use recursive-descent.
	Recognize labelled array tuples and powerset ranges.
	* Makefile.in:  Update for no longer using yacc for ch-exp.

	* c-lang.c:  Make various functions non-static.
	* c-lang.h:  Add bunches of prototypes.
	* cp-valprint.c (cp_print_value_fields):  Also take address.
	(cp_print_value):  Likewise.  Use baselcass_offset.
	* stabsread.c (current_symbol):  New static variable.
	(type_synonym_name):  Remove.
	(read_type):  If copying, make copy be a TYPE_CODE_TYPEDEF.
	(read_array_type):  Don't need to handle undefined element type here.
	(cleanup_undefined_types):  Ditto.
	(read_range_type):  Look for Chill ranges.
	* valops.c (value_assign):  Fix case lval_internalvar - don't try
	to assign into old value (which might be too small!).
	(value_coerce_array):  No longer need special VALUE_REPEATED handling.
	(value_arg_coerce):  Cleaner array->pointer decay mechanism.
	(search_struct_field):  Use baseclass_offset rather than
	baseclass_addr.
	(value_slice):  Use get_discrete_bounds.
	* value.h (COERCE_VARYING_ARRAY):  Take type argumnt as well.
	* values.c (baseclass_offset):  Change parameter interface.
	(baseclass_addr):  Removed.
	* c-typeprint.c, c-valprint.c, ch-valprint.c, values.c, valops.c:
	Add check_typedef/CHECK_TYPEDEF as needed.
1995-11-30 03:26:34 +00:00
Peter Schauer b1027aa458 * symtab.h (enum address_class): Add LOC_UNRESOLVED for
a location whose address has to be resolved via the minimal
	symbol table.
	* buildsym.c (finish_block), findvar.c (symbol_read_needs_frame,
	read_var_value), printcmd.c (address_info),
	symmisc.c (print_symbol, print_partial_symbol):  Handle
	LOC_UNRESOLVED.
	* stabsread.c (scan_file_globals):  Change unresolved LOC_STATIC
	symbols to LOC_UNRESOLVED. Remove rt_common_objfile lookup
	kludge, global common symbols are now handled by LOC_UNRESOLVED.
	(scan_file_globals_1):  Move code back to scan_file_globals,
	delete.
1995-10-28 11:57:02 +00:00
Kung Hsu 771e0a5cb0 * stbsread.c (read_one_struct_field): Use subfile language instead of
global language. Improve efficiency.
1995-09-13 22:31:04 +00:00
Kung Hsu fe82872cca * stabsread.c: To include language.h and expression.h for the reason
above.
1995-09-12 23:31:00 +00:00
Kung Hsu aeca85c13a * stabsread.c (read_one_struct_field): Add a patch to handle cfront
generated stabs that each field is in full mangled name.
1995-09-12 23:05:22 +00:00
Peter Schauer b6a40d0cf1 * stabsread.c (read_enum_type): Exit loop for putting pending
enum symbols into the enum type correctly if we had no pending
	symbols on entry to read_enum_type.
1995-09-09 15:24:18 +00:00
Peter Schauer 080868b466 * mdebugread.c (parse_symbol): Handle sh.value of zero for enums.
Determine signedness of enum type from enumerators.
	(parse_type):  Handle btIndirect types, handle fBitfield for
	some non-member types.
	(upgrade_type):  Use TYPE_FLAG_TARGET_STUB for arrays with
	unknown length.
	(cross_ref):  Handle stIndirect forward reference to btTypedef.

	* stabsread.c (read_enum_type):  Determine signedness of enum
	type from enumerators.

	* top.c (execute_command):  Remove trailing whitespace from
	command arguments, except for `set' and `complete' commands.
	(validate_comname):  Allow underscores in user defined command
	names.

	* values.c (modify_field):  Change `Value does not fit in %d bits'
	error to a warning. Exclude sign extension bits of negative field
	values from fit check.
1995-08-26 07:35:13 +00:00
Jeff Law 65eaea2742 * configure.in: Recognize aix4 specially as some aspects
of aix4 need different handling than aix3.
        * configure: Updated.
        * config/powerpc/{aix4.mh,aix4.mt,tm-ppc-aix4.h}: New files
        specific to aix4 support on the power pc.
        * config/powerpc/tm-ppc-aix.h (DONT_RELOCATE_SYMFILE_OBJFILE): Do
        not defined.  The aix4 specific target files will do that.
        * config/rs6000/{aix4,mh,aix4,mt,tm-rs6000-aix4.h}: New files
        specific to aix4 support on the rs6000.

        * config/rs6000/tm-rs6000.h (CONVERT_FROM_FUNC_PTR_ADDR): Don't
        do the conversion if the pointer is not a magic aix function
        pointer.
        * rs6000-tdep.c: Include objfiles.h and symtab.h.
        (is_magic_function_pointer): New function.

        * rs6000-tdep.c (skip_prologue): Refine check for frameless
        functions.  Handle b .+4 emitted by aix4 compilers.  Only
        allow one load of a minimal toc pointer.  Handle aix4 compiler's
        code for alloca.

        * rs6000-tdep.c (find_toc_address): Report an error if no toc was
        found rather than possibly core dumping.

        * partial-stab.h: Handle extra field generated by the aix4 compiler
        for enumerations.
        * stabsread.c (read_enum_type): Likewise.
1995-08-12 22:50:04 +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 23a1346e20 * stabsread.c (read_range_type): Remove FIXME comment about
type-id (I presume this meant a number followed by = followed by a
	type) versus type number; Per fixed it.
1995-03-31 03:52:28 +00:00
Per Bothner e55a579687 * gdbtypes.c (create_range_type): If indextype has TYPE_FLAG_STUB
set, set TYPE_FLAG_TARGET_STUB.
	(check_stub_type):  Recalculate TYPE_LENGTH for range type.
	* stabsread.c (read_range_type):  If index type number is followed
	by '=', back up, call read_type. and assume we have a true range.
	* gdbtypes.h (TYPE_FLAG_TARGET_STUB):  Update comment.
This fixes PR 6632.
1995-03-29 01:11:45 +00:00
Peter Schauer b9e585030c * buildsym.c (patch_subfile_name): Update last_source_file
with the real source file name.
	* dbxread.c (end_psymtab):  Handle static functions in the
	SOFUN_ADDRESS_MAYBE_MISSING case by passing pst->filename
	to lookup_minimal_symbol.
	(process_one_symbol):  Ignore extra outermost context from
	SunPRO cc and acc.
	* stabsread.c (define_symbol):  Do not complain for SunPRO
	static variable encoding if STATIC_TRANSFORM_NAME is defined.
	* sparc-tdep.c, config/sparc/tm-sun4sol2.h
	(sunpro_static_transform_name):  Renamed from
	solaris_static_transform_name.
	* config/sparc/tm-sun4os4.h (STATIC_TRANSFORM_NAME):
	Define to sunpro_static_transform_name for acc 3.0 compiled
	executables.
	* procfs.c, config/alpha/nm-osf2.h (PROCFS_DONT_TRACE_FAULTS):
	Renamed from PROCFS_DONT_TRACE_IFAULT, don't trace any faults
	if defined.
	* procfs.c (info_proc_siginfo):  Cast sip->si_addr to
	`unsigned long' and use `lx' format for printing it.
1995-03-25 09:23:10 +00:00
Jim Kingdon 8367c66b2d * stabsread.c (rs6000_builtin_type): Recognize types -31 to -34. 1995-03-16 20:37:09 +00:00
Per Bothner 7c606261da * symtab.c (add_param_to_type): Remove (commented-out) function,
since that functionality has been re-written.
	* coffread.c:  Remove commented-out add_param_to_type support.
	* mdebugread.c (parse_symbol):  Likewise.
	* stabsread.c (define_symbol):  Likewise.
1995-02-12 18:54:50 +00:00
Jim Kingdon 137a07e69d * config/sparc/tm-sun4sol2.h: Define STATIC_TRANSFORM_NAME.
* partial-stab.h: Call it.
	* stabsread.c (define_symbol) [STATIC_TRANSFORM_NAME]: Call
	STATIC_TRANSFORM_NAME to get the name and use minimal symbols to
	get the address.
	* sparc-tdep.c (solaris_static_transform_name): New function.
1995-02-09 20:21:46 +00:00
Per Bothner 0f8631fbae * stabsread.c (read_enum_type): When pending enum symbols are
put into the enum type, they must be inserted in "backwards
	order, in case we've overflowed a struct pending buffer.
1995-01-13 06:24:23 +00:00
Peter Schauer 02b40a193e * dbxread.c (process_one_symbol): Handle N_FUN symbols
for Sun acc 3.0 under SunOS4.

	Changes to improve handling of runtime common symbols
	under SunOS4.
	* minsyms.c (get_symbol_leading_char):  New routine to determine
	the leading symbol character for an objfile.
	(prim_record_minimal_symbol_and_info, install_minimal_symbols):
	Use it.
	* objfiles.h (rt_common_objfile):  New global, points to objfile
	containing the runtime common minimal symbols.
	* objfiles.c (free_objfile):  Mark rt_common_objfile as
	unallocated before freeing it.
	* solib.c (allocate_rt_common_objfile):  New routine to allocate
	an objfile for the runtime common minimal symbols.
	(solib_add_common_symbols):  Allocate an objfile for the runtime
	common symbols if necessary and put common symbols into it.
	Clean up code and comments.
	(solib_add, special_symbol_handling):  Cleanup comments regarding
	runtime common symbols.
	* stabsread.c (scan_file_globals_1):  New routine, contains
	old scan_file_globals code. Checks if there are any unresolved
	global symbols before starting the expensive minimal symbol table
	search.
	(scan_file_globals):  Now calls scan_file_globals_1 for the passed
	objfile and eventually for the runtime common objfile. Complains
	about any unresolved global symbols and removes them from the
	global symbol chain to avoid dangling pointers into the symbol
	table if the symbol table is reread.
1995-01-07 15:30:58 +00:00
Jeff Law 117a817d90 * stabsread.c (define_symbol): Handle `a' symbol type used for
reference parameter passed in a register.
1995-01-05 08:18:13 +00:00
Peter Schauer 9ed8604f38 * top.c (line_completion_function): Renamed from
symbol_completion_function, takes the line buffer and the
	point in the line buffer as additional arguments.
	(readline_line_completion_function):  New function, interface
	between readline and line_completion_function.
	(init_main):  Use it.
	(complete_command):  Use line_completion_function instead of
	abusing rl_line_buffer. Free completion strings after printing
	them.
	* symtab.c (completion_list_add_name):  Recheck for duplicates
	if we intend to add a modified symbol.

	* gdbtypes.h (cplus_struct_type):  nfn_fields_total no longer
	includes the number of methods from the baseclasses.
	* stabsread.c (attach_fn_fields_to_type):  No longer add the
	number of methods from the baseclasses to TYPE_NFN_FIELDS_TOTAL,
	the baseclass type might not have been completely filled in yet.
	* symtab.c (total_number_of_methods):  New function to compute
	the total number of methods for a type, including the methods
	from baseclasses.
	(decode_line_1):  Use it instead of TYPE_NFN_FIELDS_TOTAL to
	allocate the symbol array for find_methods.

	* stabsread.c (scan_file_globals):  Add default case to minimal
	symbol type switch, to avoid gcc -Wall warnings.

	* config/rs6000/tm-rs6000.h (INIT_EXTRA_FRAME_INFO):
	Don't test for zero backchain pointer to recognize a signal
	handler frame, if read() gets interrupted by a signal, the
	backchain will be non zero.
	(SIG_FRAME_FP_OFFSET):  Move to here from rs6000-tdep.c,
	improve comment.
	(SIG_FRAME_PC_OFFSET):  New definition.
	(FRAME_SAVED_PC):  Return saved pc from sigcontext if this
	is a signal handler frame.
	* rs6000-tdep.c (function_frame_info):  Do not error out
	if we can't access the instructions.

	* config/rs6000/tm-rs6000.h (CONVERT_FROM_FUNC_PTR_ADDR):
	New definition to get the function address from a function pointer.
	* valops.c (find_function_addr):  Use it when calling a user
	function through a function pointer.
1994-10-29 09:51:32 +00:00
Ian Lance Taylor b8176214a5 * defs.h: If TARGET_BYTE_ORDER_SELECTABLE is defined by tm.h,
define TARGET_BYTE_ORDER as target_byte_order, and declare
	target_byte_order as an extern int, and define BITS_BIG_ENDIAN as
	a test of TARGET_BYTE_ORDER.
	* top.c: Several additions if TARGET_BYTE_ORDER_SELECTABLE is
	defined:
	(endianlist, target_byte_order): New variables.
	(set_endian, set_endian_big, set_endian_little): New functions.
	(show_endian): New function.
	(init_cmd_lists): Initialize endianlist.
	(init_main): Add commands ``set endian big'', ``set endian
	little'', and ``show endian''.
	* a29k-pinsn.c: Rewrite uses of TARGET_BYTE_ORDER and
	BITS_BIG_ENDIAN to switch at run time rather than at compile time.
	* coffread.c, dwarfread.c, findvar.c, mips-tdep.c: Likewise.
	* remote-os9k.c, stabsread.c, valarith.c, valprint.c: Likewise.
	* values.c: Likewise.
	* mips-tdep.c: Rewrite uses of GDB_TARGET_IS_MIPS64 to switch at
	run time rather than at compile time.
1994-10-06 16:47:32 +00:00
Per Bothner 6f52d064e4 * gdbtypes.h (TYPE_INDEX_TYPE): New macro.
* ch-typeprint.c, ch-valprint.c:  Use TYPE_INDEX_TYPE.
	* ch-valprint.c (chill_val_print):  Pass index type directly
	(instead of its TYPE_TARGET_TYPE) to print_type_scalar.
	* stabsread.c (read_type):  Don't set TYPE_FLAG_TARGET_STUB
	if the index type is a stub.
1994-09-17 00:38:23 +00:00
Per Bothner 576f97700b * stabsread.c (read_type): Handle stub types for bitstrings.
* stabsread.c (read_array_type):  Check for stub domain type
	using TYPE_FLAG_STUB, not its length.
	* gdbtypes.c (create_set_type):  Handle a stub domain type.
1994-09-16 07:29:44 +00:00
Peter Schauer f3806e3b6c * c-typeprint.c (c_print_type): Assume demangled arguments
if a '(' is found in varstring, Looking for ')' at the end of
	varstring did fail with demangled const member functions, which
	have a trailing `const'.
	* remote.c (get_offsets, putpkt):  Change to `char' buffers,
	to avoid errors when compiling with DEC c89.
	(remote_wait):  Cast to `char *' before passing buffer to
	fputs_filtered, to avoid errors when compiling with DEC c89.
	(remote_wait):  Do not return inferior_pid by default, this
	statement is never reached, which causes warnings from some
	compilers.
	* stabsread.c (scan_file_globals):  Ignore static minimal symbols.
	* symfile.c (load_command):  If called with no argument, try
	to get the filename from the executable file.
	(generic_load):  Remove check for NULL filename, it is done
	in load_command now.
1994-08-19 20:44:18 +00:00
Kung Hsu 5a04f7d16c Modified Files:
stabsread.c ChangeLog

        * stabsread.c (read_type): Fix a bug in enum size calculation.
1994-08-01 20:41:11 +00:00
Kung Hsu 8dbe58d843 Modified Files:
stabsread.c ChangeLog

        * stabsread.c (read_huge_number): handle large unsigned number
        for stabs generated by os9k C compiler.
1994-07-14 20:20:49 +00:00
Kung Hsu 539dccd38e Modified Files:
remote-os9k.c stabsread.c

        * remote-os9k.c (rombuf_command): fix a bug accepting rombug
        output.
        * stabsread.c (read_struct_fields): os9k nested structure does not
        have terminating ';', instead it just get to ',' and bit position
        and length.
1994-06-09 22:03:41 +00:00
Per Bothner 36a2283dad Add partial support for g++ code compiled with -fvtable-thunks.
* c-valprint.c (c_val_print):  Add vtblprint support
	when using thunks.
	* cp-valprint.c (cp_is_vtbl_member):  A vtable can be an array of
	pointers (if using thunks) as well as array of structs (otherwise).
	* cp-valprint.c (vtbl_ptr_name_old, vtbl_ptr_name):  Move to global
	level, and make the latter non-static (so define_symbol can use it).
	* stabsread.c (define_symbol):  If the type being defined is a
	pointer type named "__vtbl_ptr_type", set the TYPE_NAME to that name.
	* symtab.h (VTBL_PREFIX_P):  Allow "_VT" as well as "_vt".
	* values.c (value_virtual_fn_field):  Handle thunks.
	* values.c (value_headof):  Minor efficiency hack.
	* values.c (value_headof):   Incomplete thunk support.  FIXME.
1994-05-05 00:19:33 +00:00
Stu Grossman a66e8382de * dbxread.c (record_minimal_symbol): Record the section
associated with the symbol to make dynmaic relocation work.
	* (dbx_symfile_read, process_one_symbol):  Fixes to work around
	Solaris brain-damage which don't apply to relocatable object
	files.
	* (stabsect_build_psymtabs):  New routine to read stabs out of an
	arbitrarily named section.
	* nlmread.c (nlm_symtab_read):  Read ALL syms from the NLM, not just
	globals.
	* (nlm_symfile_read):  Call stabsect_build_psymtabs to read the
	stabs out of the nlm.
	* partial-stabs.h (cases 'f' & 'F'):  Fixes to work around Solaris
	brain-damage which don't apply to relocatable object files.
	* remote.c (putpkt):  Improve error reporting and error handling.
	* stabsread.c (define_symbol, scan_file_globals):  Record section
	info in sym.
1994-04-26 17:14:52 +00:00
Jim Kingdon 0a2e98a99e * stabsread.c (read_type): Call read_type, not nonexistent
os9k_read_type.
1994-04-22 23:49:51 +00:00
Kung Hsu d5336fc5a4 Modified Files:
ChangeLog remote-os9k.c os9kread.c stabsread.c

        * remote-os9k.c (rombug_fetch_registers): set trace mode
        correctly.
        * remote-os9k.c (rombug_read_inferior_memory): cache data in
        buffer.
        * os9kread,c (read_os9k_psymtab): process file symbol to truncate
        extra info.
        * os9kread.c (os9k_read_ofile_symtab): proper casting of args
        passed to process_one_symbol.
        * stabsread.c (read_type): process os9k functio prototype.
1994-04-22 21:36:59 +00:00
Jim Kingdon 649694ea87 * config/sparc/tm-sparc.h: Define USE_REGISTER_NOT_ARG.
* stabsread (define_symbol): If USE_REGISTER_NOT_ARG, go back to
	combining all 'p' and 'r' pairs into a LOC_REGPARM.
1994-03-26 16:00:02 +00:00
Jim Kingdon 2f3b7d8eb5 * valops.c (value_at, value_at_lazy): Give error if we dereference
a pointer to void.
	* gdbtypes.h: Fix comments regarding TYPE_CODE_VOID.
	* stabsread.c: Use 1, not 0, for TYPE_LENGTH of void types.
1994-03-24 18:32:31 +00:00
Jim Kingdon 553e18620a * stabsread.c (patch_block_stabs): Add comment about what happens
if the definition is in another compilation unit from the stab.
1994-03-24 17:03:23 +00:00
Jim Kingdon acdec9542b * stabsread.c (patch_block_stabs): Don't create LOC_OPTIMIZED_OUT
symbols.  Reverts change of 2 Apr 1993.
1994-03-24 15:32:42 +00:00
Jeff Law 84ad95c118 * stabsread.c (REG_STRUCT_HAS_ADDR): Accept additional argument
for the structure's type.  All callers changed.

        * valops.c (call_function_by_hand): Check REG_STRUCT_HAS_ADDR
        for each structure argument rather than assuming it's either
        true or false for all structure arguments.

        * config/pa/tm-hppa.h (REG_STRUCT_HAS_ADDR): Depend only
        on the length structure passed, not the compiler used.

        * config/sparc/tm-sparc.h (REG_STRUCT_HAS_ADDR): Accept additional
        argument for the structure's type.
1994-03-23 04:14:34 +00:00
Jim Kingdon f261371068 * stabsread.c (define_symbol): If REG_STRUCT_HAS_ADDR, also
convert a LOC_ARG to a LOC_REF_ARG.  Update code which combines
	'p' and 'r' symbol descriptors into a single symbol to look for a
	LOC_REF_ARG.
	* README, config/sparc/tm-sparc.h: Update comments.
1994-03-10 18:21:02 +00:00
Jim Kingdon fddb9bda70 * stabsread.c (common_block_end, fix_common_block): Stash the
struct pending * in the SYMBOL_TYPE, not the SYMBOL_NAMESPACE, so
	as to not assume that a pointer fits in an enum.
1994-03-10 03:57:57 +00:00
Kung Hsu d9389f37d5 Modified Files:
ChangeLog os9kread.c stabsread.c remote-os9k.c symfile.c
	target.c

        * os9kread.c (fill_sym): check compiler verion number for pre-
        UltraC compiler.
        * os9kread.c (os9k_process_one_symbol): address of symbol is
        relative to section not module.
        * stabsread.c (define_symbol): add symbol type 's' as local
        symbol for os9k.
        * remote-os9k.c: add command 'set monitor_log' to turn on or off
        monitor logging.
        * remote-os9k.c: fix bug in delete breakpoint, single step trace.
        * remote-os9k.c: fix bug in 'set remotebaud' function.
        * remote-os9k.c (rombug_link): minimize checking so to improve
        speed.
        * symfile.c (symfile_command): check if failed to link, also make
        the command be able to accept more than one filenames.
        * target.c (target_link): check if failed to link with rombug.
1994-03-10 03:13:52 +00:00
Jim Kingdon 25200748a2 * os9kread.c (os9k_process_one_symbol): Rename
VARIABLES_INSIDE_BLOCK to OS9K_VARIABLES_INSIDE_BLOCK.
	* symfile.c (symbol_file_command): Check for (CORE_ADDR)-1, not
	(CORE_ADDR)0, from target_link, since that is what it uses.
	Process name at end, not during parsing (like we did before Kung's
	change), so that -readnow and -mapped can appear anywhere.
	Make text_relocation a local variable.
	* config/i386/i386os9k.mt: Fix comment.
	* Makefile.in (ALLDEPFILES): Add remote-os9k.c.
	* os9kread.c: Put "comments" after #endif inside /* */.
	* stabsread.h: Add os9k_stabs variable.
	* stabsread.c (start_stabs), os9kread.c (os9k_process_one_symbol):
	Set it.
	* stabsread.c (define_symbol): If os9k_stabs, put a 'V' symbol
	descriptor in global_symbols not local_symbols.
	(read_type): If os9k_stabs, accept 'c', 'i', and 'b' type
	descriptors.
	(read_type): If os9k_stabs, accept function parameters after 'f'
	type descriptor.
	(read_array_type): If os9k_stabs, don't expect index type and
	expect lower and upper to be separated by ',' not ';'.
	(read_enum_type): If os9k_stabs, read a number before the first
	enumeration constant.
	(os9k_init_type_vector): New function.
	(dbx_lookup_type): Call it when starting new type vector.
	* config/i386/tm-i386os9k.h: Define BELIEVE_PCC_PROMOTION.
	* (os9k_process_one_symbol): Call define_symbol not os9k_define_symbol.
	* os9kstab.c: Removed.
	* Makefile.in: Update accordingly.
	* objfiles.c (objfile_relocate_data): Removed.
	* remote-os9k.c (rombug_wait): Call objfile_relocate
	not objfile_relocate_data.
	* objfiles.h, objfiles.c: Remove find_pc_objfile.
	* remote-os9k.c (rombug_wait): Call find_pc_section not
	find_pc_objfile.
	* main.c (quit_command): Check inferior_pid; revert Kung change.
	* remote-os9k.c (rombug_create_inferior): Set inferior_pid.
1994-03-02 03:01:34 +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 159ada029b * stabsread.c (read_sun_builtin_type): Skip the semicolon at the end
of the type if present.
1994-02-03 19:28:30 +00:00
Jim Kingdon 61932a8ee9 * gdbtypes.h, ch-typeprint.c, ch-valprint.c:
Change comments regarding TYPE_CODE_BOOL.
	* language.c (boolean_type): Always return 1 for TYPE_CODE_BOOL,
	regardless of the language.
	(value_true): Just call value_logical_not regardless of language.
	* coffread.c (coff_read_enum_type), stabsread.c (read_enum_type):
	Remove #if 0'd code which makes some enums TYPE_CODE_BOOL.
	* language.h: Improve comment for la_builtin_type_vector.
	* m2-lang.c (_initialize_m2_language): Don't add any fields to
	builtin_type_m2_bool.
1994-02-02 17:20:45 +00:00
Jim Kingdon 91a0575c8a * stabsread.c (STABS_CONTINUE, error_type), partial-stab.h:
AIX can use ? instead of \ for continuation.  Deal with it.
1994-01-25 17:28:05 +00:00
Jim Kingdon 4b404661b6 * stabsread.c (read_type): Allow defining several type numbers
at once (e.g. "(1,2)=(3,4)="...).
1994-01-03 22:36:52 +00:00
Jim Kingdon eaba7fae01 * stabsread.c (read_enum_type): Use TARGET_INT_BIT not sizeof (int). 1994-01-03 21:49:43 +00:00
Jim Kingdon 4bfe9e81cd * stabsread.c (define_symbol): If we choose not to combine
two symbols, don't just ignore the second (LOC_REGISTER) one.
	* printcmd.c (print_frame_args): If we have a LOC_ARG and a
	LOC_REGISTER, use the LOC_ARG not the LOC_REGISTER.
1993-12-29 18:42:52 +00:00
Kung Hsu 279a3cfdfb Modified Files:
ChangeLog stabsread.c

        * stabsread.c (read_type): fix problem when reading static member
        of a class. caused by change to allow :: inside template
        instantiated name.
1993-12-28 02:46:34 +00:00
Jim Kingdon 28f851f93a * stabsread.c (define_symbol): Only combine a p/r pair into a
LOC_REGPARM if REG_STRUCT_HAS_ADDR.
1993-12-25 19:50:45 +00:00
Jim Kingdon 7677d4fda4 * stabsread.c (read_type): Don't fall through 'S' case (the case it
was falling though happened to do the thing thing ("break;") but that
	is hardly a good thing to assume).
1993-12-24 20:43:29 +00:00
Per Bothner cba009211a * ch-exp.y (match_dollar_tokens): Fix off-by-one bug.
* ch-lang.c (chill_is_varying_struct), ch-lang.h:  New function.
	* ch-lang.c (chill_printstr):  Use double quotes, not single quotes.
	* ch-typeprint.c (chill_type_print_base):  Handle TYPE_CODE_BITSTRING.
	Improve printing of TYPE_CODE_STRING, TYPE_CODE_SET, and
	TYPE_CODE_STRUCT (including checking chill_is_varying_struct).
	Print TYPE_DUMMY_RANGE by printing its TYPE_TARGET_TYPE.
	Handle TYPE_CODE_ENUM.
	* ch-valprint.c (chill_val_print):  Handle TYPE_CODE_BITSTRING.
	For TYPE_CODE_STRING, never print address.  Handle VARYING strings.
	* gdbtypes.c (force_to_range_type):  New.
	* gdbtypes.c (create_set_type):  Make work, following Chill layout.
	* gdbtypes.h (TYPE_LOW_BOUND, TYPE_HIGH_BOUND, TYPE_DUMMY_RANGE): New.
	* stabsread.c (read_type):  Distinguish string and bitstring from
	char-array and set.
	* valarith.c (value_subscript), valops.c (value_coerce_array):
	Handle STRINGs as well as ARRAYs.
	* valarith.c (value_bit_index):  Fix think.  Use new macros.
1993-12-21 22:18:51 +00:00
Per Bothner e909f287a8 Implement support for Chill POWERSETs.
* ch-exp.y (operand_2):  Implement 'Element IN PowerSet'.
	* ch-typeprint.c (chill_type_print_base):  Handle POWERSETs.
	* ch-valprint.c (chill_val_print):  Handle TYPE_CODE_SET.
	* eval.c (evaluate_subexp):  Implement BINOP_IN.
	* expression.h (enum exp_opcode):  Added BINOP_IN.
	* gdbtypes.c (create_set_type), gdbtypes.h:  New function.
	* stabsread.c (read_type):  If 'S', create a set type.
	* valarith.c (value_bit_index, value_in), value.h:  New functions,
	for indexing in SETs.
1993-12-14 04:32:51 +00:00
Fred Fish 11b959da9c * stabsread.c (read_array_type): Allow negative array bounds,
without interpreting that to mean "adjustable."
	* ch-valprint.c (chill_val_print):  Handle RANGE types.
	* ch-typeprint.c (chill_type_print_base):  Handle BOOL.
	Handle variant records.  Handle RANGE types.
1993-12-11 01:27:23 +00:00
Kung Hsu e9935d43b7 Modified Files:
ChangeLog stabsread.c

        * stabsread.c(read_struct_field): Fix the check when getting to
        member functions. (fix pr4000).
1993-11-29 23:40:31 +00:00
Jim Kingdon dda398c369 * gdbtypes.h: Add TYPE_FLAG_TARGET_STUB.
* gdbtypes.c (check_stub_type): On TYPE_FLAG_TARGET_STUB, do
	what cleanup_undefined_types does for arrays, except we clear
	TYPE_FLAG_TARGET_STUB if we fix up the type.
	* stabsread.c (cleanup_undefined_types): Add comments about how
	doing arrays here is no longer the clean way to do it.
	(read_array_type): Set TYPE_FLAG_TARGET_STUB as well as calling
	add_undefined_type.
	* c-typeprint.c, ch-typeprint.c: Move call to check_stub_type
	outside switch so it happens for all type codes.
	* cp-valprint.c (cp_print_value_fields): Recurse to val_print,
	instead of c_val_print, so that check_stub_type gets called.

	* gdbtypes.h, gdbtypes.c, m2-lang.c, ch-lang.c, c-lang.c: Remove
	TYPE_FLAG_SIGNED.  It was inconsistently set, never checked
	(except in recursive_dump_type), and is pointless.
1993-11-15 20:13:30 +00:00
Jim Kingdon f6d7df5638 * stabsread.c: Remove #if 0'd dbx_class_complaint. We now handle
this (more or less) gracefully, and complain() was never a good
	way of dealing with this.
1993-11-15 05:36:36 +00:00
Jim Kingdon 79cf7e1f33 * stabsread.c (read_type): Skip the colon when reading a
cross-reference.  Only complain, not error_type, on unrecognized
	cross-reference types.  error_type, not dump core, if the colon is
	missing.
1993-11-14 06:40:47 +00:00
Kung Hsu 2fb58b984c Modified Files:
ChangeLog stabsread.c

        * stabsread.c (patch_block_stabs, define_symbol, read_type): in
        g++ template instantiation, nested class can be part of the
        params, and '::' can gets into symbol or type names. This is
        to fix the problem. (fix pr3837)
1993-11-12 19:34:24 +00:00
Jeff Law 91f8701603 * printcmd.c (address_info): Use fprintf_symbol_filtered
to print the symbol name.

	* stabsread.c (define_symbol): Handle cfront lossage for
	struct/union/enums and typedefs.

	* partial-stab.h (case N_BINCL): Update psymtab_language
	as appropriate when changing subfiles.
	(case N_SOL): Update psymtab_language as appropriate when
	changing subfiles.  Add typedef for structs, unions, and enums
	when processing C++ files.
1993-11-11 23:27:21 +00:00
Jim Kingdon 1dfaef6225 * stabsread.c (read_one_struct_field): Don't give up on unknown
visibility character, just shove it in fip->list->visibility.
	(read_baseclasses): Don't give up on unknown virtual or visibility
	characters, just assume a reasonable default, complain, and keep
	going.
	(attach_fields_to_type): Complain on unrecognized visibility.
	One result of all this is that '9' (VISIBILITY_IGNORE) can be used
	in a stab as well as being something which GDB uses internally.
1993-11-08 17:27:48 +00:00
Jim Kingdon d4e68deccb * stabsread.c: Remove long_kludge_name code (it was already #if 0).
* stabsread.c (read_one_struct_field): Clean up comments to reflect
	Kung's change of 5 Nov 93.
1993-11-08 17:02:08 +00:00
Kung Hsu 024f65b180 Modified Files:
gdbtypes.h stabsread.c cp-valprint.c ChangeLog

        * gdbtypes.h : add a field 'ignore_field_bits in cplus_specific,
        and macros to handle the bits.
        * stabsread.c (read_one_struct_field): add VISIBILITY_IGNORE, and
        for field of length 0, set this bit on.
        * cp-valprint.c (cp_print_value_fields): for VISIBILITY_IGNORE
        field, print <no value>.
1993-11-06 01:32:11 +00:00
Jim Kingdon f73fb0ce03 * stabsread.c (read_struct_fields): Accept either '$' or '.' as
the character which introduces a cpp_abbrev or anonymous type.
1993-11-05 04:49:06 +00:00
Jim Kingdon 73edb321e3 * values.c (unpack_long, unpack_double, value_from_double),
valarith.c (value_binop), stabsread.c (define_symbol):
	Use extract_floating and store_floating instead of
	SWAP_TARGET_AND_HOST.
1993-10-31 20:45:41 +00:00
Jim Kingdon bf5c0d6448 * defs.h, findvar.c (extract_floating, store_floating): New functions.
* Move SWAP_TARGET_AND_HOST from defs.h to findvar.c because it is
	now used only by extract_floating and store_floating.
	* valprint.c (print_floating): Use unsigned arithmetic.  Use
	extract_unsigned_integer instead of SWAP_TARGET_AND_HOST.
	Change sizeof (float) to 4 and sizeof (double) to 8 (those are always
	the relevant sizes for this code, which is in #ifdef IEEE_FLOAT).
	* values.c (unpack_long, unpack_double, value_from_double),
	valarith.c (value_binop), stabsread.c (define_symbol):
	Use extract_floating and store_floating instead of
	SWAP_TARGET_AND_HOST.
	* config/m68k/tm-m68k.h, config/i960/tm-i960.h (REGISTER_CONVERT_*):
	Use extract_floating and store_floating.
	* config/m88k/tm-m88k.h: Add comments (it should be doing the same).
	* i386-tdep.c (i386_extract_return_value),
	* remote-nindy.c (nindy_store_registers): Use store_floating.
1993-10-29 18:16:33 +00:00
Jim Kingdon dcb389736b * stabsread.c (define_symbol): Skip the whole thing about "pcc
promotion" on little-endian machines.
1993-10-23 01:56:18 +00:00
Jim Kingdon fc81adb803 * stabsread.c (define_symbol): When combining a LOC_ARG and a
LOC_REGISTER, use the type from the LOC_REGISTER, not from the
	LOC_ARG.
1993-10-20 23:45:13 +00:00
Jim Kingdon 4fc9d7c70e * stabsread.c (read_type): Treat a negative type number at the start
of a type as a type reference, not as a definition of a type with
	"50=" omitted.  This makes things work on the RS/6000 again (the
	14 Sep 1993 change broke it).
1993-10-12 23:55:13 +00:00
Jim Kingdon 9438d64262 * stabsread.h, stabsread.c, dbxread.c (common_block*, copy_pending):
Move common block handling from dbxread.c to stabsread.c.
	Use the name from the BCOMM instead of the ECOMM.
	Allocate things on the symbol_obstack.
	* xcoffread.c (process_xcoff_symbol): Process C_BCOMM, C_ECOMM,
	and C_ECOML.  On unrecognized storage classes, go ahead and call
	define_symbol (after the complaint).

	* dbxread.c (process_one_symbol): Don't relocate 'S' symbols by
	the text offset.
1993-10-12 20:02:11 +00:00
Jim Kingdon 78934ba843 * stabsread.c: Fix comment about gcc 2.3.3 stab for long long int. 1993-10-12 14:05:22 +00:00
Jim Kingdon ebccb10ba5 * stabsread.c (read_range_type): Remove comment which recommends
distinguishing float from complex by the name.
1993-10-05 20:39:49 +00:00
Peter Schauer cef4c2e7a5 Changes to support alpha OSF/1 in native mode.
* alpha-nat.c, alpha-tdep.c, config/alpha/alpha-osf1.mt,
	  config/alpha/nm-alpha.h, config/alpha/tm-alpha.h, osfsolib.c:
	New files.
	* Makefile.in:  Add new files and dependencies.
	* configure.in:  Add alpha target.
	* config/alpha/alpha-osf1.mh (NATDEPFILES):  Add osfsolib.o
	* config/alpha/alpha-osf1.mh (MH_CFLAGS):  Remove, we can handle
	shared libraries now.
	* config/alpha/xm-alpha.h:  Cleanup, get MAKEVA_* defines right.

	* defs.h (CORE_ADDR):  Make its type overridable via CORE_ADDR_TYPE,
	provide `unsigned int' default.
	* breakpoint.c (breakpoint_auto_delete):  Delete only if we really
	stopped for the breakpoint.
	* stabsread.c, stabsread.h (define_symbol):  Change valu parameter
	to a CORE_ADDR.
	* stabsread.c (read_range_type):  Handle the case where the lower
	bound overflows and the upper doesn't and the range is legal.
	* infrun.c (resume):  Do not step a breakpoint instruction if
	CANNOT_STEP_BREAKPOINT is defined.

	* inferior.h (CALL_DUMMY_LOCATION):  New variant AT_ENTRY_POINT.
	Now that we have the bp_call_dummy breakpoint the call dummy code
	is no longer needed. PUSH_DUMMY_FRAME, PUSH_ARGUMENTS and
	FIX_CALL_DUMMY can be used to set up everything for the dummy.
	The breakpoint for the dummy is set at the entry point and thats it.
	* blockframe.c (inside_entry_file, inside_entry_func):  Do not stop
	backtraces if pc is in the call dummy at the entry point.
	* infcmd.c (run_stack_dummy):  Handle AT_ENTRY_POINT case. Use
	the expected breakpoint pc when setting up the frame for
	set_momentary_breakpoint.
	* symfile.c (entry_point_address):  New function for AT_ENTRY_POINT
	support.
	* valops.c (call_function_by_hand):  Handle AT_ENTRY_POINT case.
1993-10-05 19:44:57 +00:00
Jim Kingdon 5ed0ccafca * stabsread.c (read_type): Process "s" (size) type attribute.
If type is defined to another type, copy the type.
1993-09-15 00:46:55 +00:00
K. Richard Pixley 46c28185ab some gcc lint 1993-09-08 20:15:34 +00:00
Jim Kingdon 996ccb3043 * symtab.c, symfile.c, c-exp.y, ch-exp.y, m2-exp.y, buildsym.c,
symfile.h, stabsread.c, minsyms.c, solib.c, nlmread.c, dwarfread.c
	partial-stab.h, symmisc.c, gdbtypes.c: Lint.  Remove (or put
	inside #if) unused variables and labels.  Fix unclosed comment.
	Deal with enumeration values unhandled in switch statements.  Make
	sure non-void functions return values.  Include appropriate
	headers.
	* dbxread.c (elfstab_build_psymtabs): Don't check for unsigned
	value < 0.
1993-09-02 01:41:40 +00:00
K. Richard Pixley ade40d3153 bcopy -> memcpy 1993-09-01 20:37:15 +00:00
Stan Shebs 48f075eb2a Moved the function hashname from stabsread.c to buildsym.c, since
it's a general-purpose function.
1993-08-09 23:49:18 +00:00
Jim Kingdon 230a3ab0d4 * stabsread.c (rs6000_builtin_type): Make logical types be
TYPE_CODE_BOOL.
1993-07-26 20:04:02 +00:00
Jim Kingdon 91ab5674f8 * stabsread.c (rs6000_builtin_type): Make `logical' be TYPE_CODE_BOOL. 1993-07-26 18:23:59 +00:00
Jim Kingdon 5af4f5f6f1 Tue Jul 13 14:03:48 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
* stabsread.c (define_symbol): Make the caddr_t hack apply to `function
	returning foo' as well as `pointer to foo'.

	* remote.c [REMOTE_BREAKPOINT]: Use for breakpoint insn if defined.
	* config/m68k/tm-m68k.h: Define it.
	* mem-break.c, breakpoint.c: Improve comments.

Tue Jul 13 13:35:31 1993  Frederic Pierresteguy (F.Pierresteguy@frcl.bull.fr)

	* config/m68k/tm-dpx2.h: Replace "tm-68k.h" with "m68k/tm-m68k.h".
	* config/m68k/xm-dpx2.h: Define HAVE_TERMIOS not HAVE_TERMIO.
1993-07-14 15:12:05 +00:00
Jim Kingdon b2bebdb0f1 * gdbtypes.h (struct type): Add field tag_name.
* gdbtypes.c (type_name_no_tag), c-typeprint.c (c_type_print_base):
	Use it.
	* {coff,dwarf,mips,stabs}read.c: Set it.
1993-07-02 02:57:06 +00:00
Jim Kingdon 7e71985c9e * c-valprint.c (c_val_print): Handle TYPE_CODE_BOOLEAN.
* stabsread.c: Type -16 is 4 bytes.
1993-06-25 19:29:45 +00:00
Jim Kingdon 9ddfb9eb20 * stabsread.c: Include <ctype.h>. 1993-06-22 08:20:18 +00:00
Jim Kingdon 089dc22027 * stabsread.c (read_struct_fields): Don't call read_cpp_abbrev on $_.
(read_cpp_abbrev): Don't complain specially for $_.  Also return 0 if
	we don't recognize the abbrev.
1993-06-20 20:30:31 +00:00
Jim Kingdon 36bcda7958 * stabsread.c (read_type): Skip type attributes if present. 1993-05-31 20:14:59 +00:00
Jim Kingdon 574a2a49b7 * stabsread.c (read_huge_number): Don't accept '0' + radix as part
of number, just through '0' + radix - 1.
1993-05-31 18:08:56 +00:00
Jim Kingdon 59d69506fb * stabsread.c (define_symbol, case 't'): Only set the name if it
is not a pointer type.

	* stabsread.c (define_symbol): Clean up logic; move the read_type
	calls to inside the switch statement (this improves the error
	handling).
1993-05-26 17:17:02 +00:00