aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarfread.c
AgeCommit message (Collapse)AuthorFilesLines
1992-12-15 * gdbtypes.c (create_array_type): Complete rewrite. Now requiresFred Fish1-47/+71
a optional type to decorate as an array type, the type of the index, and the bounds of the array. Records this additional info in the array type for use with languages with nonzero array bounds. * gdbtypes.h (enum type_code): Update comment for TYPE_CODE_ARRAY to note that arrays may have bounds. * gdbtypes.h (create_array_type): Update prototype. * c-exp.y (ptype production): Adjust for new create_array_type calling conventions. * coffread.c (decode_type): Call create_array_type rather than handcrafting array types. * convex-tdep.c (value_type): Remove, now use create_array_type. * convex-tdep.c (value_of_trapped_internalvar): Convert calls to vector_type into calls to create_array_type. * dwarfread.c (decode_subscr_data): Name changed to decode_subscript_data_item throughout. * dwarfread.c (decode_subscript_data_item): Rewrite to use create_array_type. Now records index type and range as well. * dwarfread.c (dwarf_read_array_type): Rewrite as part of change to use create_array_type. * dwarfread.c (read_subroutine_type): Test existing user defined types before decorating them, to ensure they are blank, and complain about it if they are not. * dwarfread.c (decode_fund_type): For unrecognized types, always return some valid type (type integer). If the unrecognized type cannot be an implementation defined type, complain as well. * m88k-tdep.c (pushed_size): Update comment for TYPE_CODE_ARRAY. * m88k-tdep.c (store_param): Update comment for TYPE_CODE_ARRAY. * mipsread.c (upgrade_type): Add FIXME comment that code to handcraft arrays should be replaced with call to create_array_type. * stabsread.c (read_array_type): Replace code to handcraft array types with call to create_array_type. * valprint.c (type_print_varspec_prefix): Minor formatting change, join lines that don't need to be split.
1992-12-08 Changes for Amiga Unix from rhealey@ub.d.umn.edu.Fred Fish1-24/+16
* config/amix.mh (NAT_FILE): Add, set to nm-sysv4.h. * config/amix.mh (NATDEPFILES): Add. * config/amix.mh (XDEPFILES): Move procfs.o and fork-child.o to NATDEPFILES. * dwarfread.c (decode_subscr_data): Remove spurious test that accepted only integer subscript types. We don't do anything with the type at the moment anyway.
1992-12-03 * c-exp.y (c_create_fundamental_type): New function to createFred Fish1-33/+116
language specific fundamental types for C. * m2-exp.y (m2_create_fundamental_type): New function to create language specific fundamental types for Modula 2. * c-exp.y (c_language_defn, cplus_language_defn): Add c_create_fundamental_type to language struct initializers. * m2-exp.y (m2_language_defn): Add m2_create_fundamental_type to language struct initializers. * dwarfread.c (expression.h, language.h): Include. * dwarfread.c (ftypes): New array to hold fundamental types for current compilation unit. * dwarfread.c (cu_language_defn): New pointer to language struct for language of current compilation unit. * dwarfread.c (dwarf_fundamental_type): New function to create/lookup fundamental types. * dwarfread.c (set_cu_language): Initialize cu_language_defn. * dwarfread.c (throughout): Replace lookup_fundamental_type with dwarf_fundamental_type. * dwarfread.c (read_file_scope): Zero out ftypes for each new compilation unit (may be different language or different objfile). * gdbtypes.c (lookup_fundamental_type): Move actual type creations into language specific fundamental type creation functions and call via create_fundamental_type. Add comment about this function being obsolescent. * gdbtypes.h (FT_BYTE, FT_UNSIGNED_BYTE): New types, true byte sized signed and unsigned integers. * gdbtypes.h (FT_NUM_MEMBERS): Increment, new types added. * language.c (language_def): New function to lookup a language struct given it's enumeration. * language.h (struct language_defn): Add la_fund_type, a pointer to a function that creates fundamental types for this language. * language.h (create_fundamental_type): New macro to create fundamental types based on the current language. * language.h (language_def): Add prototype. * language.c (unk_lang_create_fundamental_type): New function for initializing language structs, calls error if called. * language.c (unk_language_defn, auto_language_defn, local_language_defn): Use unk_lang_create_fundamental_type. **** start-sanitize-chill **** ch-exp.y (chill_create_fundamental_type): New function. ch-exp.y (chill_language_defn): Add chill_create_fundamental_type. ch-exp.y (_initialize_chill_exp): BOOL types are only one byte. **** end-sanitize-chill ****
1992-12-02 * dwarfread.c (CHILL_PRODUCER): Add producer string forFred Fish1-0/+9
GNU chill. * dwarfread.c (handle_producer): Test CHILL_PRODUCER as well as GCC_PRODUCER and GPLUS_PRODUCER.
1992-11-16First cut at sanitizing away the chill stuff.Fred Fish1-0/+2
1992-11-15 * Makefile.in (SFILES_MAINDIR): Add ch-exp.y.Fred Fish1-1/+6
* Makefile.in (YYFILES): Add ch-exp.tab.c. * Makefile.in (YYOBJ): Add ch-exp.tab.o. * Makefile.in (saber_gdb): Add unload of ch-exp.y and load of ch-exp.tab.c. * Makefile.in (distclean): Add target ch-exp.tab.c. * Makefile.in (realclean): Add rm of ch-exp.tab.c. * Makefile.in (c-exp.tab.c, m2-exp.tab.c): Add dependency on Makefile since it contains sed patterns used in generation. Add sed pattern to also delete #include of any malloc.h. * Makefile.in (ch-exp.tab.o, ch-exp.tab.c): New targets. * ch-exp.y: New expression parser, for GNU-Chill. * c-exp.y, expr.c, expression.h, language.c, m2-exp.y, parser-defs.h, valarith.c, valops.c, value.h: Remap macros and function names to conform to K&R terminology with respect to logical and bitwise operators: UNOP_ZEROP => UNOP_LOGICAL_NOT UNOP_LOGNOT => UNOP_COMPLEMENT BINOP_LOGAND => BINOP_BITWISE_AND BINOP_LOGXOR => BINOP_BITWISE_XOR BINOP_LOGIOR => BINOP_BITWISE_IOR BINOP_AND => BINOP_LOGICAL_AND BINOP_OR => BINOP_LOGICAL_OR PREC_OR => PREC_LOGICAL_OR PREC_AND => PREC_LOGICAL_AND PREC_LOGIOR => PREC_BITWISE_IOR PREC_LOGXOR => PREC_BITWISE_XOR PREC_LOGAND => PREC_BITWISE_AND value_zerop() => value_logical_not() value_lognot() => value_complement() * c-exp.y (c_op_print_tab): Add explicit empty terminator. * m2-exp.y (m2_op_print_tab): Add explicit empty terminator. * defs.h (enum language): Add language_chill. * dwarfread.c (set_cu_language): Add LANG_CHILL case and make LANG_MODULA2 a recognized language. * eval.c (evaluate_subexp): Add OP_BOOL case. * expprint.c (print_subexp): Add OP_BOOL case. * gdbtypes.h (enum_typecode): Note TYPE_CODE_BOOL used for Chill as well as Modula-2. * gdbtypes.y (builtin_type_chill_bool, builtin_type_chill_long, builtin_type_chill_ulong, builtin_type_chill_real): Add. * i387-tdep.c (sys/dir.h): Remove, appears to be unnecessary and is nonexistant in some SVR4 based systems. * language.c (DEFAULT_ALLOCSIZE): Change from 3 => 4. * language.c (set_language_command): Add chill. * language.c (binop_result_type, integral_type, character_type, boolean_type, structured_type, value_true, binop_type_check): Add language_chill cases. * language.h (_LANG_chill): Define. * m2-exp.y (number_sign, modblock): Make static, #ifdef out unused modblock. * m2-exp.y (ANDAND): Rename to LOGICAL_AND. * source.c (source_info): Fix minor nits, print "1 line" rather than "1 lines", and "language is <lang>". * symfile.c (deduce_language_from_filename): Recognize the filename extensions ".chill", ".c186", and ".c286" for Chill. * valarith.c (value_binop): Handle TYPE_CODE_BOOL as well as TYPE_CODE_INT and TYPE_CODE_FLOAT. * valprint.c (val_print): Print TYPE_CODE_BOOL type values as "TRUE" or "FALSE". * valprint.c (typedef_print): Add case for language_chill. * values.c (value_from_longest): Handle TYPE_CODE_BOOL.
1992-10-22* Makefile.in (HFILES): Add nm-i386sco.h.Stu Grossman1-0/+1
* dwarfread.c: include <sys/types.h> for SCO. * infptrace.c: Don't include ptrace.h under SCO. * config/i386sco.mh: Use -D_POSIX_SOURCE instead of -posix for gcc. * config/i386v.mt: Add exec.o to TDEPFILES.
1992-10-15Lint around file_ptr's (bfd's off_t's) and bfd_seek.John Gilmore1-34/+38
* dbxread.c (read_dbx_symtab): Use L_SET as bfd_seek arg. (elfstab_build_psymtabs): staboffset and stabstroffset args are file_ptr's. * dwarfread.c (struct dwfinfo): Convert dbfoff, lnfoff to file_ptr. (scan_compilation_units): Punt unused filename arg. dbfoff, lnoffset, and curlnoffset are file_ptr's now. (dwarf_build_psymtabs): Drop desc and filename args; use objfile. dbfoff and lnoffset are file_ptr's now. (read_ofile_symtab): foffset is now file_ptr. Use L_SET in bfd_seek. * elfread.c (struct elfinfo): dboffset and lnoffset are file_ptr's. (elf_symfile_read): Skip desc and filename args to dwarf_build_psymtabs. Pass file_ptr's to elfstab_build_psymtabs. * gdb-stabs.h: Use file_ptr rather than off_t. * mipsread.c (fixup_symtab): f_ptr is a file_ptr. Re-enable compile-time debug check that someone turned off as "unused". (read_the_mips_symtab): st_filptr is a file_ptr. Fix bfd_seek call. * symfile.h: Update dwarf_build_psymtabs and elfstab_build_psymtabs prototypes. * xcoffread.c (init_stringtab, init_lineno, xcoff_symfile_read): Use file_ptr offsets. bfd_seeks use L_SET.
1992-10-01 * dwarfread.c (dbsize): New variable to hold size of dwarf info.Fred Fish1-7/+18
* 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-08-31 * dwarfread.c (cu_language): New local variable to recordFred Fish1-25/+149
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-24 * coffread.c (decode_type): Call alloc_type to alloc newFred Fish1-2/+1
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-14 * cplus-dem.c (cplus_markers): Add table for gnu style andFred Fish1-2/+2
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-12 * buildsym.c (end_symtab): Document that end_symtab can returnFred Fish1-12/+15
NULL under non-error conditions. * dwarfread.c (read_file_scope): Guard against dereferencing NULL returned from end_symtab for empty compilation units.
1992-08-11 * Makefile.in (VERSION): Bump to 4.6.3.Fred Fish1-6/+64
* 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-09 * dwarfread.c (struct dieinfo): Add has_at_byte_size.Fred Fish1-5/+24
* 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-01 * dwarfread.c (struct dieinfo): Remove obsolete at_visibility,Fred Fish1-15/+0
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-07-28 * Makefile.in (VERSION): Bump to 4.6.2.Fred Fish1-0/+4
* 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-17 * dwarfread.c (read_file_scope): Pass contents of AT_comp_dirFred Fish1-2/+12
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-16Change LCC_PRODUCER string to match current NCR lcc AT_producer. UpdateFred Fish1-1/+1
energize-patches to work when configured with -srcdir=.
1992-07-15 * dbxread.c, dwarfread.c: Re-enable experimental code toFred Fish1-1/+1
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-14 * Makefile.in (DEMANGLING_STYLE): New define to set defaultFred Fish1-2/+68
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-09 * dwarfread.c (alloc_utype, decode_subscr_data): Call alloc_typeFred Fish1-10/+2
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-04Relocate symbols using an array of section_offsets, rather than aJohn Gilmore1-6/+15
single `addr' or `offset'. This makes Solaris-2 support work, and permits better VxWorks (and maybe xcoff) support later. See ChangeLog.
1992-07-04 * breakpoint.c, buildsym.c, c-exp.y, coffread.c, command.c,Fred Fish1-12/+12
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-06-25 * mipsread.c: Pass NULL name pointer to init_type, not 0.Fred Fish1-2/+5
* 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-23 * command.c (add_abbrev_prefix_cmd): Fix misspelling in comment.Fred Fish1-1/+1
* 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-15* dwarfread.c (decode_modified_type): Change type of first arg.Fred Fish1-6/+8
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-05-17 * inflow.c (new_tty): Temporarily ignore SIGTTOU whenFred Fish1-1/+1
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-03 * Makefile.in (VERSION): Bump to 4.5.2.Fred Fish1-1/+21
* 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-04-17Fix to dwarfread.c to target pointer and target long sizes, fixes forFred Fish1-9/+9
mapped symbol file handling, and a couple of other misc small fixes.
1992-04-14Extensive changes to replace swapin() function with target_to_host()Fred Fish1-347/+534
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-11Add swapin() function, and SWAPIN macro that calls it, to do byte swappingFred Fish1-75/+127
copies using appropriate bfd routines.
1992-03-29Create and use macros for iterating on symtabs, psymtabs, msymbols.John Gilmore1-17/+11
* 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-21Many changes, most related to creating entry point information on a per-objfileFred Fish1-14/+11
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-15Globs of changes. See the ChangeLog for details. Most related toFred Fish1-10/+10
using the new mmalloc package.
1992-03-03Tue Mar 3 15:11:52 1992 Michael Tiemann (tiemann@cygnus.com)Michael Tiemann1-2/+1
* 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-02-22Saberlint.John Gilmore1-3/+0
* symmisc.c, xcoffread.c: Move debug functions to symmisc.c.
1992-02-22* Check in Fred Fish's changes in these modules. FredJohn Gilmore1-479/+432
will make ChangeLog entries for all of them.
1992-02-17Add code to handle TAG_pointer_type DIE's (DWARF Information Entries)Fred Fish1-0/+51
that are produced by the i486/SVR4 MetaWare compiler, but not by the AT&T or GCC compilers.
1992-02-17When creating user defined types for subroutine and array types, checkFred Fish1-8/+42
first to see if a partial type already exists due to a forward reference, and if so, bash it to fit.
1992-01-24The list_in_scope pointer needs to be initialized to point to aFred Fish1-1/+1
valid scope. Use the file scope as the initial scope.
1992-01-15Changes to fix bug with static variables within function scopes.Fred Fish1-14/+13
1992-01-11Many changes to convert over to generic symbol table reading code inFred Fish1-647/+92
buildsym.c (second cvs ci attempt)
1991-12-28Missed some stuff last time.Per Bothner1-1/+1
Also, recognize constructors specially in gdb_mangle_name().
1991-12-27Various changes to clean up ADD_PSYMBOL_TO_LIST and ADD_PSYMBOL_ADDR_TO_LISTFred Fish1-79/+23
usages.
1991-12-23Oodles of changes. The most important is adding support for stabsPer Bothner1-8/+20
encapsulated in mips ecoff. See ChangeLog for the gory details.
1991-12-16Numerous small changes and a complete reorganization of solib.c, to supportFred Fish1-4/+12
SVR4 shared libraries in a manner very close to the original SunOS support. See the ChangeLog for details.
1991-12-06More fixes for opaque and anonymous enumerations, structures, and unions.Fred Fish1-18/+36
Now passes all current gdb test suite tests.
1991-12-06Fixes to improve opaque struct/union handling. Still fails to find theFred Fish1-12/+24
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* symtab.c (decode_line_1): If SKIP_PROLOGUE leaves us inJohn Gilmore1-1/+0
mid-line, be more careful about possibly advancing to the next line.