Commit Graph

164 Commits

Author SHA1 Message Date
Fred Fish 4090fe1c2b * dwarfread.c (dbsize): New variable to hold size of dwarf info.
* dwarfread.c (dwarf_build_psymtabs):  Rename dbsize parameter to
	dbfsize and use it to initialize new local file scope dbsize.
	* dwarfread.c (read_ofile_symtab):  Initialize dbsize and use it.
	* dwarfread.c (basicdieinfo):  Use dbsize to check for oversize
	DIEs as well as the current check for undersize DIEs.  This helps
	to gracefully detect and reject corrupted DIE information.
1992-10-01 17:33:21 +00:00
Fred Fish 95ff889ecd * dwarfread.c (cu_language): New local variable to record
language for current compilation unit being processed.
	* dwarfread.c (set_cu_language):  New local function to decode
	and record language for current compilation unit being processed.
	* dwarfread.c (synthesize_typedef):  Add local function to
	synthesize a typedef for C++ classes, structs, unions, and
	enumerations.
	* dwarfread.c (read_structure_scope):  Synthesize typedefs
	for C++ classes, structs and unions.
	* dwarfread.c (read_enumeration):  Synthesize typedefs for
	C++ enumerations.
	* dwarfread.c (read_file_scope):   Call set_cu_language to
	record language for current compilation unit.  After symtab
	is built, save this recorded language.
	* dwarfread.c (process_dies, add_partial_symbol, struct_type,
	scan_partial_symbols, new_symbol):  Recognize TAG_class_type.
	* dwarfread.c (add_partial_symbol):  Synthesize partial symbol
	typedefs for C++ classes, structs, unions, and enumerations.
	* dwarfread.c (scan_compilation_units):  Call set_cu_language
	to record language for current compilation unit.
	* dwarfread.c (scan_partial_symbols):  Call add_enum_psymbol here
	for TAG_enumeration_types, rather than in add_partial_symbol.
	* dwarfread.c (add_partial_symbol):  Combine TAG_enumeration_type
	case with class, struct, and union type cases, now that they are
	the same.  Remove tests for non-NULL name attributes, now done
	by callers.
	* gdbtypes.h (TYPE_CODE_CLASS):  Add type for C++ classes, but
	treat as alias for TYPE_CODE_STRUCT for now.
1992-08-31 20:50:45 +00:00
Fred Fish dac9734e58 * coffread.c (decode_type): Call alloc_type to alloc new
types.
	* stabsread.c (read_array_type, read_range_type, define_symbol):
	Call alloc_type to alloc new types.
	* stabsread.c (define_symbol):  Move dbl_valu symbol field data
	from type_obstack to symbol_obstack.
	* stabsread.c (define_symbol):  Move typedef_sym from type_obstack
	to symbol_obstack.
	* gdbtypes.h (TYPE_ALLOC):  New macro to allocate space for data
	associated with a type, using the same mechanism as was used to
	allocate space for the type structure itself.
	* coffread.c (patch_type, coff_read_struct_type,
	coff_read_enum_type):  Use TYPE_ALLOC.
	* dwarfread.c (struct_type):  Use TYPE_ALLOC.
	* gdbtypes.c (create_array_type, check_stub_method,
	allocate_cplus_struct_type):  Use TYPE_ALLOC.
	* mipsread.c (parse_symbol, parse_type):  Use TYPE_ALLOC.
	* stabsread.c (read_struct_type, read_array_type, read_enum_type,
	read_range_type):  Use TYPE_ALLOC.
1992-08-24 00:13:11 +00:00
Fred Fish 3dc755fb81 * cplus-dem.c (cplus_markers): Add table for gnu style and
use throughout, in place of compile time constant CPLUS_MARKER.
	* cplus-dem.c (ARM_VTABLE_STRING, ARM_VTABLE_STRLEN):  Add.
	* cplus-dem.c (cfront_special):  New function, as suggested
	by pfieland@stratus.com.
	* cplus-dem.c (forget_types):  New function.
	* cplus-dem.c (cplus_demangle):  Call gnu_special, moved from
	demangle_prefix().
	* cplus-dem.c (mop_up):  Call forget_types().
	* cplus-dem.c (AUTO_DEMANGLING, GNU_DEMANGLING, LUCID_DEMANGLING):
	Use throughout, instead of checking current_demangling_style.
	* cplus-dem.c (demangle_signature):  When finding an explicit
	start of function args, forget all remembered types for
	lucid/cfront style demangling.
	* cplus-dem.c (demangle_prefix):  In a sequence of two or more
	underbar characters, use last pair as the delimiter.  Hoist
	gnu_special() call up to cplus_demangle().  Call cfront_special()
	when appropriate.
	* cplus-dem.c (cplus_special):  Fix virtual table name demangling
	for inherited classes.
	* cplus-dem.c (demangle_args):  Document quirks of numbered
	references to previously seen types.
	* dbxread.c (read_ofile_symtab, process_one_symbol):
	Use AUTO_DEMANGLING rather than explicitly checking
	current_demangling_style.
	* demangle.h:  Add some comments.
	* demangle.h (AUTO_DEMANGLING, GNU_DEMANGLING, LUCID_DEMANGLING,
	CFRONT_DEMANGLING):  New macros.
	* dwarfread.c (LCC_PRODUCER):  Remove trailing space, which is
	not found in the actual producer string produced by lcc.
	* dwarfread.c (handle_producer):  Use AUTO_DEMANGLING rather
	than explicitly checking current_demangling_style.
1992-08-14 19:14:15 +00:00
Fred Fish 7b5d965008 * buildsym.c (end_symtab): Document that end_symtab can return
NULL under non-error conditions.
 	* dwarfread.c (read_file_scope):  Guard against dereferencing NULL
 	returned from end_symtab for empty compilation units.
1992-08-12 18:17:48 +00:00
Fred Fish a679650f37 * Makefile.in (VERSION): Bump to 4.6.3.
* dwarfread.c (scan_partial_symbols):  Skip over DIE's within
	function scopes when building partial symbol tables.
	* objfiles.c (open_existing_mapped_file):  Make it clear in
	warning message that out of date mapped files are ignored.
	* symtab.c (lookup_symtab_1, lookup_symbol):  Print compilation
	unit source file name in error message.
1992-08-11 05:29:41 +00:00
Fred Fish 50055e94a1 * dwarfread.c (struct dieinfo): Add has_at_byte_size.
* dwarfread.c (struct_type):  In absence of AT_byte_size for
	bitfield, use size of object of member's type for the size of
	the anonymous object containing the bit field.
	* dwarfread.c (completedieinfo):  Set has_at_byte_size when
	an AT_byte_size attribute is seen.
	* mipsread.c (psymtab_to_symtab_1):  Fix misspelled cast to
	union aux_ext (was aux_ent).
	* i386-pinsn.c (print_insn):  Cast 2'nd arg to read_memory from
	unsigned char* to char*, for Lucid compiler.
	* i386-tdep.c (codestream_fill):  Fix cast of 2'nd arg to read_memory
	to be correct type (from unsigned char* to char*).
	* valprint.c (type_print_derivation_info):  Minor tweak to placement
	of commas in derived class printing.
	* xcoffread.c (builtin_type):  Fix misspelling in fatal message.
1992-08-09 06:14:59 +00:00
Fred Fish cd46ffad4e * dwarfread.c (struct dieinfo): Remove obsolete at_visibility,
at_import, at_frame_base.
	* dwarfread.c (completedieinfo):  Remove cases for obsolete
	AT_visibility, AT_import, and AT_frame_base attributes.
	* breakpoint.h (BREAKPOINT_MAX):  Increase from 10 to 16 for
	i860, which can keep up to 4 shadow breakpoints.
	* tm-stratus.h (USG):  Define.
	* tm-stratus.h (TARGET_BYTE_ORDER):  Define to BIG_ENDIAN.
	* xm-stratus.h (HOST_BYTE_ORDER):  Define to BIG_ENDIAN.
	* xm-stratus.h (xm-sysv4.h):  Include, name changed from xm-svr4.h.
	* xm-stratus.h (NO_JOB_CONTROL):  Remove define.
	* config/stratus.mt (TDEPFILES):  Include files available from
	stratus that are not yet in release pending receipt of paperwork
	at FSF.
	* buildsym.c (finish_block):  Minor code format change.
	* gdbtypes.h (struct field):  Add to comments.
	* gdbtypes.h (virtual_field_bits):  Add to comments.
	* objfiles.c (allocate_objfile):  Change obstack interface to
	match FSF merging efforts.
1992-08-01 20:40:59 +00:00
Fred Fish d07734e31f * Makefile.in (VERSION): Bump to 4.6.2.
* Makefile.in (SFILES_MAINDIR):  Add stabsread.c
	* Makefile.in (OBS):  Add stabsread.o
	* Makefile.in (stabsread.o):  Add build rule.
	* stabsread.c, stabsread.h:  New files.
	* buildsym.c:  Split out stabs specific support to stabsread.c.
	* buildsym.h:  Split out stabs specific support to stabsread.h.
	* dbxread.c (stabsread.h):  Include
	* dbxread.c (dbx_new_init):  Call stabsread_new_init.
	* dbxread.c (dbx_psymtab_to_symtab_1):  Call stabsread_init.
	* dbxread.c (read_ofile_symtab):  Call end_stabs.
	* dbxread.c (process_one_symbol):  Call end_stabs and start_stabs.
	* dbxread.c (elfstab_build_psymtabs):  Call stabsread_new_init.
	* dwarfread.c (psymtab_to_symtab_1):  Call buildsym_init, add
	really_free_pendings to cleanups.
	* elfread.c (elf_new_init):  Call stabsread_new_init.
	* gdbtypes.c:  Small changes to maintenance commands.
	* mipsread.c (stabsread.h):  Include.
	* mipsread.c (psymtab_to_symtab_1):  Call end_stabs.
	* xcoffread.c (stabsread.h):  Include.
	* xcoffread.c (global_stabs):  Remove redundant def.
	* xcoffread.c (read_xcoff_symtab):  Call start_stabs and end_stabs.
1992-07-28 04:22:18 +00:00
Fred Fish d4902ab0a7 * dwarfread.c (read_file_scope): Pass contents of AT_comp_dir
to start_symtab as the directory name.
	* dwarfread.c (completedieinfo):  Strip off any leading hostname
	portion of the AT_comp_dir attribute string.  Gdb doesn't know
	what to do with them (FIXME).
1992-07-17 17:16:26 +00:00
Fred Fish 345e9ab8dc Change LCC_PRODUCER string to match current NCR lcc AT_producer. Update
energize-patches to work when configured with -srcdir=.
1992-07-16 19:12:49 +00:00
Fred Fish d23639b2ec * dbxread.c, dwarfread.c: Re-enable experimental code to
automatically select demangling style.
	* demangle.c (DEFAULT_DEMANGLING_STYLE):  Rename from simply
	DEMANGLING_STYLE, to make more descriptive.  Revert back to
	"auto" as default.  Comment use.
	* Makefile.in (DEMANGLING_STYLE, DEMANGLE_OPTS):  Remove.
	* Makefile.in (${DEMANGLER}.o) Remove target and special
	compilation rule.
1992-07-15 19:33:21 +00:00
Fred Fish 2dbde378c4 * Makefile.in (DEMANGLING_STYLE): New define to set default
demangling style for C++.  Defaults to "auto".
	* Makefile.in (DEMANGLE_OPTS):  Use DEMANGLING_STYLE.
	* Makefile.in (SFILES_MAINDIR):  Add demangle.c
	* Makefile.in (OBS):  Add demangle.o
	* cplus-dem.c (GNU_DEMANGLING, ARM_DEMANGLING, LUCID_DEMANGLING):
	Remove compile time decisions about demangling style and replace
	with runtime decisions using current_demangling_style.
	* cplus-dem.c (main):  Expand code included during building of
	standalone demangler to recognize demangling style options.
	* dbxread.c (demangle.h):  Include.
	* dbxread.c (read_ofile_symtab, process_one_symbol):  Set GNU C++
	demangling style if processing g++ code and current demangling style
	is auto (Note: this feature currently disabled.)
	* demangle.c:  New file, generic demangling control.
	* demangle.h (demangling_styles):  New enumeration to select one
	of several demangling styles.  Also define string names for each
	style.
	* demangle.h (set_demangling_style):  Add prototype.
	* dwarfread.c (demangle.h):  Include.
	* dwarfread.c (GPLUS_PRODUCER, LCC_PRODUCER, CFRONT_PRODUCER):
	New producer string prefixes to recognize.
	* dwarfread.c (handle_producer):  Consolidate actions for specific
	producers.  Set demangling style based on producer string if
	current style is auto.  (Note: this feature currently disabled.)
	* config/ncr3000.mt (DEMANGLE_OPTS):  Remove.
1992-07-14 02:13:12 +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
John Gilmore 2670f34d21 Relocate symbols using an array of section_offsets, rather than a
single `addr' or `offset'.  This makes Solaris-2 support work, and
permits better VxWorks (and maybe xcoff) support later.  See ChangeLog.
1992-07-04 13:59:03 +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 50e0dc4198 * mipsread.c: Pass NULL name pointer to init_type, not 0.
* gdbtypes.c (init_type):  Use copy of typename on type_obstack.
	* dwarfread.c (enum_type):  Save enum names on type_obstack.
	* dwarfread.c (struct_type):  Save member name on type_obstack.
	* symtab.c (_initialize_symtab):  Fix misspelling.
	* regex.c (store_jump, insert_jump):  Return void.
1992-06-25 19:10:49 +00:00
Fred Fish 0efe20a642 * command.c (add_abbrev_prefix_cmd): Fix misspelling in comment.
* dwarfread.c (enum_type):  Fix misspelling in comment.
	* valprint.c (val_print_fields, cplus_val_print):  Minor
	adjustment to printing of C++ class structures to more closely
	match format for printing C structures, with and without setting
	pretty print.
1992-06-23 03:33:47 +00:00
Fred Fish 1c92ca6f3b * dwarfread.c (decode_modified_type): Change type of first arg.
Change 'modifier' to char from unsigned char.  Cast single use
that needs to be unsigned char.
* symtab.h (SYMBOL_BASEREG_VALID):  Explain disabling.
* utils.c (strdup_demangled):  Add function.
* defs.h (strdup_demangled):  Add prototype.
* stack.c (return_command):  Demangle C++ function names for query.
* infcmd.c (jump_command):  Demangle C++ function names for query.
* cplus-dem.c (consume_count):  New function and prototype.
* cplus-dem.c (demangle_class, gnu_special, demangle_func_type,
do_type):  Replace conversion code with consume_count().
* cplus-dem.c (gnu_special):  Fix demangled of static members.
* source.c (list_command):  Print demangled function names
when appropriate.  Fix supplied by Peter Schauer.
1992-06-15 14:26:57 +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 4db8e515c4 * Makefile.in (VERSION): Bump to 4.5.2.
* Makefile.in (DEMANGLE_OPTS):  Add, default to -Dnounderscore.
	* configure.in:  Simplify ncr3000 gdb_host logic, add gdb_target.
	* dwarfread.c (struct_type):  Apply fix from Peggy Fieland for
	proper handling of bit fields.
	* gdbtypes.h (struct type):  Clarify use of field.bitpos.
	* symtab.h:  Fix couple of misspellings in comments.
	* value.h (struct value):  Clarify use of bitpos.
	* value.h (unpack_field_as_long):  Change prototype, returns
	LONGEST.
	* values.c (unpack_field_as_long):  Change return type to LONGEST,
	sign extend unpacked fields that are signed, other rewriting.
	* config/ncr3000.mt:  New target config file.
1992-05-03 23:05:07 +00:00
Fred Fish 2d6d969c61 Fix to dwarfread.c to target pointer and target long sizes, fixes for
mapped symbol file handling, and a couple of other misc small fixes.
1992-04-17 02:59:43 +00:00
Fred Fish 13b5a7ff3e Extensive changes to replace swapin() function with target_to_host()
and fix all usages to be independent of host/target integer size
mismatches.  However, cross debugging will still not work until the
sign extension issue is resolved either by fixing the bfd library
or implementing sign extension in the gdb code.
1992-04-14 04:09:00 +00:00
Fred Fish 95967e7379 Add swapin() function, and SWAPIN macro that calls it, to do byte swapping
copies using appropriate bfd routines.
1992-04-11 06:27:53 +00:00
John Gilmore 84ffdec2cb Create and use macros for iterating on symtabs, psymtabs, msymbols.
* minsyms.c (iterate_over_msymbols):  Remove; clunky and slow.
* symfile.h, symtab.h (iterate_over_msymbols):  Remove prototype
* coffread.c (coff_symfile_read):  iterate_over_symtabs => ALL_SYMTABS.
(patch_opaque_types):  Avoid dummy args and result.
* objfiles.c (have_partial_symbols, have_full_symbols,
have_minimal_symbols):  explicit iteration => ALL_OBJFILES; simplify.
(iterate_over_objfiles, iterate_over_symtabs,
iterate_over_psymtabs):  Remove, clunky and slow.
* objfiles.h:  Replace iterate_over_* prototypes with ALL_SYMTABS,
ALL_PSYMTABS, and ALL_MSYMBOLS macros.
* symmisc.c (dump_symtab, dump_psymtab, dump_msymbols,
dump_objfile):  Remove dummy args and results.  Move filename
comparisons to callers.
(printsyms_command, printpsyms_command, printmsyms_command,
printobjfiles_command):  iterate_over_* => ALL_*.  Compare filenames.
* symtab.c (lookup_symtab_1, lookup_symtab, lookup_partial_symtab,
lookup_symbol, find_main_psymtab, find_pc_symtab, sources_info,
list_symbols, make_symbol_completion_list):  Replace explicit
iteration with ALL_SYMTABS, ALL_PSYMTABS, or ALL_MSYMBOLS.
Eliminate Dijkstra flag crap, break out of loops with gotos.
(lookup_symtab_1):  Protect '/' tests from short filenames.
(cplus_mangled_symbol):  Move inline into lookup_symbol.
* xcoffexec.c (relocate_objfile_msymbols):  Remove poor hack.
(relocate_minimal_symbol):  Move inline to vmap_symtab.
(vmap_symtab):  Replace iteration with ALL_OBJFILES,
iterate_over_msymbols with ALL_MSYMBOLS.

Misc cleanup prior to release.

* dwarfread.c (dwarf_build_psymtabs):  Remove mainline test.
* mipsread.c (compare_symtabs, compare_psymtabs):  Remove, unused.
* mipsread.c:  Add prototypes for all static functions.

* symmisc.c (dump_symtab_lines, dump_symtabs, dump_last_symtab,
dump_blockvector, dump_block, dump_addrchass, dump_namespace,
dump_symbol, dump_type, dump_linetable, dump_strtbl):  Remove, unused.
* xcoffread.c (dump_symtab_lines, dump_symtabs, dump_last_symtab,
dump_blockvector, dump_block, dump_addrchass, dump_namespace,
dump_symbol, dump_type, dump_linetable, dump_strtbl):  Remove 2nd
unused copy!

* buildsym.c (define_symbol):  Handle global register variables
(from Pierre Willard).  Complain if register numbers are too large.
1992-03-29 23:17:36 +00:00
Fred Fish 5e2e79f859 Many changes, most related to creating entry point information on a per-objfile
basis.  See comments in objfiles.h and details in ChangeLog.  Also remove
redundant definitions of FRAME_CHAIN_VALID from most of the tm-* files and
use a default definition in frame.h.
1992-03-21 01:56:01 +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
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 93fe4e330e Saberlint.
* symmisc.c, xcoffread.c:  Move debug functions to symmisc.c.
1992-02-22 09:16:11 +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
Fred Fish 9e4c1921e5 Add code to handle TAG_pointer_type DIE's (DWARF Information Entries)
that are produced by the i486/SVR4 MetaWare compiler, but not by the
AT&T or GCC compilers.
1992-02-17 23:26:54 +00:00
Fred Fish af21362450 When creating user defined types for subroutine and array types, check
first to see if a partial type already exists due to a forward reference,
and if so, bash it to fit.
1992-02-17 15:23:05 +00:00
Fred Fish 99140c31fe The list_in_scope pointer needs to be initialized to point to a
valid scope.  Use the file scope as the initial scope.
1992-01-24 06:32:43 +00:00
Fred Fish a5bd5ba617 Changes to fix bug with static variables within function scopes. 1992-01-15 06:42:32 +00:00
Fred Fish 4d315a071a Many changes to convert over to generic symbol table reading code in
buildsym.c   (second cvs ci attempt)
1992-01-11 01:41:23 +00:00
Per Bothner a3723a4352 Missed some stuff last time.
Also, recognize constructors specially in gdb_mangle_name().
1991-12-28 19:37:55 +00:00
Fred Fish b440b1e9e4 Various changes to clean up ADD_PSYMBOL_TO_LIST and ADD_PSYMBOL_ADDR_TO_LIST
usages.
1991-12-27 03:55:12 +00:00
Per Bothner 7e258d18e0 Oodles of changes. The most important is adding support for stabs
encapsulated in mips ecoff.  See ChangeLog for the gory details.
1991-12-23 23:16:58 +00:00
Fred Fish f8b76e70b7 Numerous small changes and a complete reorganization of solib.c, to support
SVR4 shared libraries in a manner very close to the original SunOS support.
See the ChangeLog for details.
1991-12-16 20:57:28 +00:00
Fred Fish 84ce6717b0 More fixes for opaque and anonymous enumerations, structures, and unions.
Now passes all current gdb test suite tests.
1991-12-06 19:51:01 +00:00
Fred Fish 5edf98d7a2 Fixes to improve opaque struct/union handling. Still fails to find the
complete definition for files outside the one containing the complete
definition, if that file has not yet been read in.  (Working on it...)
1991-12-06 16:37:20 +00:00
John Gilmore 7b2a87cab2 * symtab.c (decode_line_1): If SKIP_PROLOGUE leaves us in
mid-line, be more careful about possibly advancing to the next line.
1991-12-06 09:22:33 +00:00
Fred Fish 715cafcbde Several changes to fix misc problems with enums, structs, and unions,
including building symbol table entries for enumeration members.
1991-12-06 02:22:10 +00:00
Fred Fish 98618bf78a Arrange for enumeration members to be manipulated in source code order,
since they are stored in the Dwarf info in reverse order.
1991-12-05 05:09:20 +00:00
Fred Fish 8b5b6fae67 Handle structures and unions which contain DIE's other than just member
DIE's.
1991-12-04 23:40:07 +00:00
Steve Chamberlain f5f0679af0 Changes due to include file renaming:
* xcoffread.c:	internalcoff.h	->coff/internal.c,
	  		coff-rs6000.h	->coff/rs6000.h
	* mipsread.c:	coff-mips.h	->coff/mips.h
	* elfread.c:    elf-common.h	->elf/common.h
			elf-external.h	->elf/external.h,
			elf-internal.h	->elf/internal.h
	* dwarfread.c	dwarf.h		->elf/dwarf.h
	* dbxread.c:	aout64.h	->aout/aout64.h
			stab.gnu.h	->aout/stab_gnu.h

	* coffread.c:   internalcoff.h	->coff/internal.h
	* buildsym.c:   stab.gnu.h	->aout/stab_gnu.h
	* depend        Updated to take the above into account.
1991-12-01 06:47:23 +00:00
Fred Fish 8c6e9f05f2 Add tm-i386v4.h and xm-i386v4.h to Sanitize, add i386/SVR4 to configuration
file, recognize names beginning with '.' as compiler generated "fake" tags
for anonymous structures, unions and enums.  Add target dependent functions
for SVR4 /proc register interface (i386-tdep.c).
1991-11-30 04:46:50 +00:00
Fred Fish 4cfd3c4990 Initialize the c++ specific portion of the type structure for union types
as well as struct types, since gdb attempts to reference that portion for
both types.  Was getting core dumps due to NULL pointer dereferencing.
1991-11-22 02:30:34 +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 768be6e12b Recognize obsolete form of AT_element_list attribute still used by AT&T
compilers on one platform, and possibly more.
1991-11-20 13:07:12 +00:00
Fred Fish 0db97eedc1 Ignore names invented by helpful compilers for anonymous structs, unions,
and enums.
1991-11-20 00:20:43 +00:00
Fred Fish 2d6186f4fa Changes to match new DWARF draft 5 version of include/dwarf.h. 1991-11-18 08:07:43 +00:00
Michael Tiemann 572acbbedc Make changes needed to handle code which uses ANSI-mangled names (and
new G++ 1.95 dbxout output).
1991-11-18 00:32:34 +00:00
David Henkel-Wallace 5805020985 ansi name abuse changes 1991-11-15 23:23:11 +00:00
Fred Fish a7446af61b Changes to build misc function vector entries from canonical bfd symbol
table entries.
1991-11-15 03:36:45 +00:00
Fred Fish 58ae87f612 Remove internal gdb definition of fixed arg count concat() function and
convert to use of variable arg count concat() in libiberty.
1991-11-12 17:50:14 +00:00
Fred Fish b662efeddc Remove leftover call to do_cleanups() which resulted from a previous change.
Was being called with a random pointer.
1991-11-09 21:57:55 +00:00
John Gilmore a048c8f537 Add tracking of object files (that contain symbols) to gdb.
This includes a "struct objfile" that owns symtabs and psymtabs
that were read in from that binary file.  See ChangeLog.
1991-11-09 10:50:07 +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 d47d5315c8 * symfile.c (syms_from_bfd): New routine.
(add_symbol_file):  Call it to do the real work.
(syms_from_bfd):  Initialize entry_point before calling symfile_init.
* symtab.h, symfile.c, coffread.c, mipsread.c, dwarfread.c:
Avoid declaring or setting entry_point (symfile.h & symfile.c cope).
1991-10-26 08:02:23 +00:00
Fred Fish c8c0a2bd59 Add casts to remove compiler warnings from native Sun cc. 1991-10-25 06:47:13 +00:00
Fred Fish b662acae40 Remove prototype for dwarfwarn(). Breaks with <varargs.h>. 1991-10-25 06:09:15 +00:00
John Gilmore 313fdead0e Use <varargs.h>, since <stdarg.h> is not portable. 1991-10-24 16:34:56 +00:00
Fred Fish 35f5886ebb New files for DWARF debugging format support, ELF object file support, SVR4
/proc (process file system) support, Amiga UNIX target and host defines, SVR4
target and host defines, and m68k hosts defines.
1991-10-24 11:28:54 +00:00