aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarfread.c
AgeCommit message (Collapse)AuthorFilesLines
1996-10-15 * buildsym.c (finish_block): Treat LOC_BASEREG_ARG andStu Grossman1-1/+3
LOC_LOCAL_ARG as arguments so that GDB will know about function args declared this way. Mostly affects dwarf. * dwarfread.c (decode_die_type): Change default type from int to void. This allows GDB to recognize void functions. * (new_symbol): If AT_PROTOTYPED is present, set a flag in the type structure. * findvar.c (extract_floating store_floating): Clean up comments to reflect reality. * gdbtypes.h: Add TYPE_FLAG_PROTOTYPED so that we can tell if a function has a prototype. Currently, only dwarf supports this. * utils.c (floatformat_from_doublest): Fix logic error with converting from double to float. (It wasn't shifting mant_long if it had a hidden bit.) * v850-tdep.c: Add support for function calling. Fix some problems with debugging code w/o debug symbols. * config/v850/tm-v850.h: Ditto.
1996-08-08 * dwarf2read.c dwarfread.c exec.c infcmd.c infrun.c main.cStu Grossman1-4/+0
mdebugread.c os9kread.c source.c top.c utils.c: Don't include param.h or sys/file.h (or unistd.h in some cases). * defs.h exec.c inflow.c remote-array.c remote-e7000.c sparcl-tdep.c terminal.h utils.c: Replace all occurances of __WIN32__, WINGDB, WIN32, etc... with _WIN32. * main.c: Remove #ifndef WINGDB around option processing. Fix bug with passing argc==0 and argv==NULL to getopt. * (main) Remove calls to access() before source_command. Let soure_command handle access errors. * maint.c (maintenance_dump_me): #ifdef out for _WIN32. * symtab.c (operator_chars): Make this global for wingdb. * top.c (disconnect): #ifdef out for _WIN32. * (source_command): If got an error and from_tty, then call print error, else just return quietly. * utils.c (fatal_dump_core): Can't kill ourselves under windows. Just exit. * (pollquit notice_quit): #ifdef out stuff that doesn't exist under windows.
1996-07-26See gdb ChangeLog entry with header:Fred Fish1-0/+3
Thu Jul 25 19:41:31 1996 Fred Fish <fnf@cygnus.com> for a rather huge set of changes. I was going to put them here, but it made cvs dump core. :-(
1996-04-06 * symfile.c (INLINE_ADD_PSYMBOL): Remove ifdef.Fred Fish1-23/+23
(add_psymbol_to_list): Add an arg for passing CORE_ADDR values and use it, rather than calling add_psymbol_addr_to_list. (add_psymbol_addr_to_list): Delete. (add_psymbol_to_list): Make psymbol static to avoid random data in gaps due to alignment of structure members. * symfile.h (INLINE_ADD_PSYMBOL, ADD_PSYMBOL_TO_LIST, ADD_PSYMBOL_ADDR_TO_LIST): Remove. Real world tests show no performance improvements by inlining via complicated macros and they just make gdb larger and harder to maintain. * dwarfread.c (add_enum_psymbol): Replace ADD_PSYMBOL_TO_LIST and/or ADD_PSYMBOL_ADDR_TO_LIST macro(s) with call to add_psymbol_to_list with appropriate long or CORE_ADDR args. (add_partial_symbol): Ditto. * partial-stab.h: Ditto. * os9kread.c (read_os9k_psymtab): Ditto * mdebugread.c (parse_partial_symbols): Ditto. (handle_psymbol_enumerators): Ditto. (demangle.h): Include. * hpread.c (hpread_build_psymtabs): Ditto. (hpread_build_psymtabs): Ditto. (demangle.h): Include
1996-02-19 * dwarfread.c (add_partial_symbol): Use ADD_PSYMBOL_ADDR_TO_LISTFred Fish1-10/+10
for CORE_ADDR values. (new_symbol): Use SYMBOL_VALUE_ADDRESS for CORE_ADDR values. * symfile.h (add_psymbol_{,addr}to_list): Add prototypes.
1996-02-16 * dwarfread.c (free_utypes): New function.Fred Fish1-3/+28
(read_file_scope): Call free_utypes as cleanup, rather than just freeing the utypes pointer.
1996-02-03 * dwarfread.c (read_func_scope): Avoid GDB core dumps ifPeter Schauer1-0/+15
AT_name tag is missing. * procfs.c (procfs_stopped_by_watchpoint): Fix logic when FLTWATCH and FLTKWATCH are defined. * remote.c (remote_read_bytes): Advance memaddr for transfers, return number of bytes transferred for partial reads. * top.c (init_signals): Reset SIGTRAP to SIG_DFL.
1996-01-08 * buildsym.c (end_symtab): Remove sort_pending and sort_linevecJeff Law1-2/+3
arguments. Sorting is now dependent on OBJF_REORDERED. All callers/references changed. * dbxread.c (read_ofile_symtab): Correctly determine value for last_source_start_addr for reordered executables. (process_one_symbol): Handle N_FUN with no name as an end of function marker. * partial-stab.h (case N_FN, N_TEXT): Don't assume CUR_SYMBOL_VALUE is the high text address for a psymtab. (case N_SO): Likewise. (case N_FUN): Handle N_FUN with no name as an end of function marker. * minsyms.c (lookup_minimal_symbol_by_pc): Examine all symbols at the same address rather than a random subset of them. * coffread.c (coff_symfile_init): Set OBJF_REORDERED. * elfread.c (elf_symfile_init): Similarly. * somread.c (som_symfile_init): Similarly. * xcoffread.c (xcoff_symfile_init): Similarly. Support for debugging reordered executables. Remaining mentor vm changes.
1995-12-21 * defs.h: Delete extraneous whitespace at end of file.Fred Fish1-0/+2
* 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-10-21 * alpha-tdep.c, mips-tdep.c (init_extra_frame_info):Peter Schauer1-0/+5
Do not set saved registers from heuristics for a sigtramp frame. * dwarfread.c (enum_type): Determine signedness of enum type from enumerators. * mips-tdep.c: Include gdb_string.h, gcc -Wall lint. * rs6000-nat.c (xcoff_relocate_core): Fix typo. * valops.c (value_repeat): Fix length of memory transfer to match recent allocate_repeat_value change.
1995-10-19 * Makefile.in (CC-LD): Rename to CC_LD, so MPW xform works.Stan Shebs1-9/+4
(MMALLOC_SRC): Define. (MMALLOC_CFLAGS): Use. (ser-mac.o): Add rule. * dwarfread.c, somread.c, ultra3-nat.c, xcoffread.c: Replace L_SET with SEEK_SET in all calls to bfd_seek. * scm-tags.h (scm_tags): Remove excess comma.
1995-08-02Update FSF address.Fred Fish1-1/+1
1995-08-01* configure.in: Check for working mmap, ansi headers, string.h,J.T. Conklin1-1/+1
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-07-20 * config/m68k/tm-m68kv4.h (DWARF_REG_TO_REGNUM): Define toPeter Schauer1-2/+12
correctly map floating point registers numbers. * dwarfread.c (locval, new_symbol): Handle variables that are optimized out. * mdebugread.c: Replace all uses of builtin_type_* with mdebug_type_*. Define and initialize mdebug_type_*. * serial.h (serial_close): Add additional argument `really_close'. (SERIAL_CLOSE): Update serial_close call accordingly. (SERIAL_UN_FDOPEN): Use serial_close to handle refcnt properly. * serial.c (serial_close): Handle `really_close'. * serial.h (scb_base): Moved to serial.c, made static. * valops.c (value_addr): Don't coerce arrays. (typecmp): Coerce arrays instead of calling value_addr if necessary.
1995-05-13 * dwarfread.c (struct dwfinfo), dbxread.c (struct symloc),Jim Kingdon1-3/+2
mdebugread.c (struct symloc), hpread.c (struct symloc): Fix error in 20 Apr 1995 cleanup of comments.
1995-05-13 * rs6000-tdep.c (find_toc_address): Revise comment.Jim Kingdon1-51/+0
* symfile.c, symfile.h (init_psymbol_list): New function; consolidate duplicated copies from os9kread.c, dbxread.c and dwarfread.c. * defs.h: Declare info_verbose. * xcoffread.c: Extensive changes to support psymtabs.
1995-04-21 * dwarfread.c (struct dwfinfo), dbxread.c (struct symloc),Jim Kingdon1-28/+21
mdebugread.c (struct symloc), hpread.c (struct symloc): Clean up comments.
1995-03-03 * dwarfread.c (struct dieinfo): Use CORE_ADDR for at_{low,high}_pc.David Edelsohn1-5/+7
(target_to_host): Change result type to CORE_ADDR.
1995-02-12 * buildsym.c (finish_block): If finishing a function without knownPer Bothner1-1/+0
parameter type info, set that from parameter symbols. * c-typeprint.c (c_type_print_varspec_suffix): For TYPE_CODE_FUNC, print parameter types, if available. * ch-typeprint.c (chill_type_print_base): Likewise. * gdbtypes.h (struct type): Remove function type field. (TYPE_FUNCTION_TYPE): Remove macro. We can't as simply re-use function types now that we're also storing parameter types. And the payoff is much less. * gdbtypes.c (make_function_type): Don't use/set TYPE_FUNCTION_TYPE. (recursive_dump_type): Don't print TYPE_FUNCTION_TYPE. * dwarfread.c (read_subroutine_type): Don't set TYPE_FUNCTION_TYPE.
1994-12-17 * c-typeprint.c (c_type_print_base): Use `show' of -1 to printPeter Schauer1-2/+9
the return type of methods to avoid infinite loops with anonymous types. * valops.c (search_struct_field): Handle anonymous unions. * sparc-tdep.c (sunos4_skip_trampoline_code): New function to correctly handle steps into -g compiled PIC objects in the main executable. * config/sparc/tm-sun4os4.h (SKIP_TRAMPOLINE_CODE): Redefine to use sunos4_skip_trampoline_code. * dwarfread.c (DWARF_REG_TO_REGNUM): Provide a default mapping from DWARF to GDB register numbering. * dwarfread.c (locval): Use DWARF_REG_TO_REGNUM to map the register value. * config/mips/tm-mipsv4.h (DWARF_REG_TO_REGNUM): Define.
1994-10-06 * defs.h: If TARGET_BYTE_ORDER_SELECTABLE is defined by tm.h,Ian Lance Taylor1-31/+37
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-08-05 * dwarfread.c (bfd.h): Don't include.Stan Shebs1-1/+0
1994-07-14 * dbxread.c: Don't include libbfd.h.Stan Shebs1-3/+0
* dwarfread.c, elfread.c somread.c: Don't include libbfd.h, <time.h>, or <sys/types.h>. * elfread.c (elf_symfile_read): Use only standard BFD functions to collect information about the stab and stab string sections.
1994-02-24 * dwarfread.c: Remove second inclusion of <sys/types.h>, whichPeter Schauer1-1/+0
causes problems if <sys/types.h> has no multiple inclusion protection.
1994-02-04 * dwarfread.c (process_dies): Skip nested TAG_compile_unit DIEs.Peter Schauer1-2/+11
* dwarfread.c (add_partial_symbol): Do not enter opaque aggregate definitions into the psymtab.
1994-01-28 * config/pa/tm-hppa.h: Define macro SMASH_TEXT_ADDRESS.Jim Kingdon1-0/+5
* elfread.c (record_minimal_symbol_and_info), dwarfread.c (process_dies), paread.c (pa_symtab_read): Use it.
1993-11-01Change the stream argument to _filtered to GDB_FILE *.Thomas Lord1-6/+6
Change all references to stdout/stderr to gdb_stdout/gdb_stderr. Replace all calls to stdio output functions with calls to corresponding _unfiltered functions (`fprintf_unfiltered') Replaced calls to fopen for output to gdb_fopen. Added sufficient goo to utils.c and defs.h to make the above work. The net effect is that stdio output functions are only directly used in utils.c. Elsewhere, the _unfiltered and _filtered functions and GDB_FILE type are used. In the near future, GDB_FILE will stop being equivalant to FILE. The semantics of some commands has changed in a very subtle way: called in the right context, they may cause new occurences of prompt_for_continue() behavior. The testsuite doesn't notice anything like this, though. Please respect this change by not reintroducing stdio output dependencies in the main body of gdb code. All output from commands should go to a GDB_FILE. Target-specific code can still use stdio directly to communicate with targets.
1993-09-15 * paread.c, coffread.c, elfread.c, dwarfread.c:Jim Kingdon1-0/+1
Include <time.h> and <sys/types.h> before libbfd.h.
1993-09-14 * paread.c, coffread.c, elfread.c, dwarfread.c:Jim Kingdon1-0/+1
Include <time.h> before libbfd.h.
1993-09-02 * symtab.c, symfile.c, c-exp.y, ch-exp.y, m2-exp.y, buildsym.c,Jim Kingdon1-1/+0
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-08-24 * frame.h, symtab.h, findvar.c (read_var_value): Change baseregJim Kingdon1-22/+17
support to use LOC_BASEREG rather than SYMBOL_BASEREG_VALID. * dwarfread.c: Use LOC_BASEREG where appropriate. * Various: Support LOC_BASEREG and LOC_BASEREG_ARG.
1993-08-08 * dwarfread.c (record_minimal_symbol): Remove prototype andFred Fish1-59/+0
function. * dwarfread.c (add_partial_symbol): Remove code to add minimal symbols and remove comment about limitations. Experiments show that now that gdb handles the ELF symtab better for creating minimal symbols, that no additional information is added by examining the DWARF information, and in fact, given the limitations, the DWARF code was actually making things worse.
1993-08-07 * elfread.c (elf_symtab_read): Properly sort out the bss symbolsFred Fish1-2/+20
from the data symbols and give them the correct minimal_symbol_type. Add file static symbols to the minimal symbol table, not just global symbols. Ignore symbols that are section names and file names. * dwarfread.c (add_partial_symbol): Add comment about limitations of DWARF symbols for distinquishing data from bss when adding minimal symbols. Add file local symbols to minimal symbols.
1993-07-02 * gdbtypes.h (struct type): Add field tag_name.Jim Kingdon1-9/+4
* gdbtypes.c (type_name_no_tag), c-typeprint.c (c_type_print_base): Use it. * {coff,dwarf,mips,stabs}read.c: Set it.
1993-06-09Doc fix re dependenciesJim Kingdon1-1/+2
1993-05-31 * {dbxread.c, dwarfread.c} (read_ofile_symtab): Rewrite to takeFred Fish1-9/+8
single parameter, the pointer to the partial symtab, rather than a bunch of args that are derived from the partial symtab. Change prototypes and callers to match.
1993-04-16Remove chill sanitizations, which are no longer necessary.Fred Fish1-6/+0
1993-03-26 * Clean up xcoff relocation.Jim Kingdon1-2/+4
objfiles.h (struct objfiles): Add section_offsets, num_sections. symfile.c (syms_from_objfile), xcoffread.c (xcoff_symfile_offsets): Set them. symtab.h (struct general_symbol_info): Add section field. minsyms.c (prim_record_minimal_symbol{,_and_info}): Set it. xcoffread.c: Set section for symbols and msymbols. (struct symtab): Add block_line_section field. buildsym.c (end_symtab): Set it. (end_symtab and callers): Add section parameter. objfiles.c (objfile_relocate): New funciton. xcoffexec.c (vmap_symtab): Use it. xcoffsolib.h (struct vmap): Remove unused fields. config/rs6000/tm-rs6000.h, stack.c, xcoffexec.c: Remove CORE_NEEDS_RELOCATION, symtab_relocated. config/rs6000/tm-rs6000.h: Remove use of loadinfotext. rs6000-tdep.c: Make loadinfotext static. breakpoint.c (fixup_breakpoints): Doc fix. symtab.h (struct symtab), config/rs6000/tm-rs6000.h, buildsym.c (end_symtab): primary field replaces nonreloc.
1993-03-03 * c-exp.y (parse_number): Change high_bit to unsigned.Fred Fish1-10/+0
* demangle.c: Change all references to cfront to ARM, since the actual algorithm is the one specified in the Annotated Reference Manual. This was confusing users into thinking that full cfront support was implemented. * dwarfread.c (CFRONT_PRODUCER): Remove, was never really used. * eval.c (evaluate_subexp): For STRUCTOP_PTR pass the arg type directly to lookup_struct_elt_type, which will do the dereferencing itself. * gdbtypes.c (lookup_struct_elt_type): Expand comments. Fix NULL dereferencing bug for unnamed structs, comment out questionable code.
1993-02-23 * ch-lang.c (chill_create_fundamental_type): Track compilerFred Fish1-17/+26
change that now emits debugging info with the type long for Chill longs. * dwarfread.c (read_tag_string_type): Rewrite to allow forward references of TAG_string_type DIEs in user defined types.
1993-01-19 * c-exp.y (exp): Add production to support direct creationFred Fish1-0/+60
of array constants using the obvious syntax. * c-valprint.c (c_val_print): Set printed string length. * dwarfread.c (read_tag_string_type): New prototype and function that handles TAG_string_type DIEs. * dwarfread.c (process_dies): Add case for TAG_string_type that calls new read_tag_string_type function. * expprint.c (print_subexp): Add support for OP_ARRAY. * gdbtypes.c (create_range_type, create_array_type): Inherit objfile from the index type. **** start-sanitize-chill **** * ch-typeprint.c (chill_print_type): Add case for TYPE_CODE_STRING. * ch-valprint.c (chill_val_print): Fix case for TYPE_CODE_STRING. **** end-sanitize-chill ****
1993-01-01 * tm-sun4sol2.h (CPLUS_MARKER): Remove, now set in tm-sysv4.h.Fred Fish1-17/+3
* tm-sysv4.h (CPLUS_MARKER): By default, g++ uses '.' as the CPLUS_MARKER for all SVR4 systems, so follow suit. * defs.h (strdup_demangled): Remove prototype. * dwarfread.c (enum_type, synthesize_typedef): Use new macro SYMBOL_INIT_LANGUAGE_SPECIFIC. * dwarfread.c (new_symbol): Use SYMBOL_INIT_DEMANGLED_NAME. * minsyms.c (install_minimal_symbols, prim_record_minimal_symbol, prim_record_minimal_symbol_and_info): Use new macro SYMBOL_INIT_LANGUAGE_SPECIFIC. * minsyms.c (install_minimal_symbols): Use new macro SYMBOL_INIT_DEMANGLED_NAME. * stabsread.c (define_symbol): Use new macro SYMBOL_INIT_DEMANGLED_NAME. * symfile.c (add_psymbol_to_list, add_psymbol_addr_to_list): Use new macro SYMBOL_INIT_DEMANGLED_NAME. * symfile.h (ADD_PSYMBOL_VT_TO_LIST): Use new macro SYMBOL_INIT_DEMANGLED_NAME. * symmisc.c (dump_msymbols, dump_symtab, print_partial_symbol): SYMBOL_DEMANGLED_NAME now tests language itself. * symtab.c (COMPLETION_LIST_ADD_SYMBOL): SYMBOL_DEMANGLED_NAME now tests language itself. * symtab.h (SYMBOL_CPLUS_DEMANGLED_NAME): New macro that does what SYMBOL_DEMANGLED_NAME used to do, directly access the C++ mangled name member in the language dependent portion of a symbol. * symtab.h (SYMBOL_DEMANGLED_NAME): New macro that returns the mangled name member appropriate for a symbol's language. * symtab.h (SYMBOL_SOURCE_NAME, SYMBOL_LINKAGE_NAME, SYMBOL_MATCHES_NAME, SYMBOL_MATCHES_REGEXP): SYMBOL_DEMANGLED_NAME now tests language itself. * symtab.h (SYMBOL_INIT_LANGUAGE_SPECIFIC): New macro that initializes language dependent portion of symbol. * symtab.h (SYMBOL_INIT_DEMANGLED_NAME): New macro that demangles and caches the demangled form of symbol names. * utils.c (fputs_demangled, fprint_symbol): Use current language to select an appropriate demangling algorithm. * utils.c (strdup_demangled): Remove, no longer used. **** start-sanitize-chill **** * symtab.h (SYMBOL_CHILL_DEMANGLED_NAME): New macro that directly access the Chill mangled name member in the language dependent portion of a symbol. * ch-lang.c (chill_demangle): New function, simple demangler. * defs.h (chill_demangle): Add prototype. * symtab.h (language_dependent_info): Add struct for Chill. **** end-sanitize-chill ****
1992-12-23 * defs.h (STRCMP, STREQ, STREQN): New macros.Fred Fish1-12/+38
* defs.h (demangle_and_match): Remove prototype. * dwarfread.c (STREQ, STREQN): Remove macros, replaced with STREQ and STREQN defined in defs.h. * dwarfread.c (set_cu_language): For completely unknown languages, try to deduce the language from the filename. Retain behavior that for known languages we don't know how to handle, we use language_unknown. * dwarfread.c (enum_type, symthesize_typedef): Initialize language and demangled name fields in symbol. * dwarfread.c, mipsread.c, partial-stab.h: For all usages of ADD_PSYMBOL_TO_LIST, add language and objfile parameters. * dwarfread.c (new_symbol): Attempt to demangle C++ symbol names and cache the results in SYMBOL_DEMANGLED_NAME for the symbol. * elfread.c (STREQ): Remove macro, use STREQ defined in defs.h. Replace usages throughout. * elfread.c (demangle.h): Include. * elfread.c (record_minimal_symbol): Remove prototype and function. * gdbtypes.h, symtab.h (B_SET, B_CLR, B_TST, B_TYPE, B_BYTES, B_CLRALL): Moved from symtab.h to gdbtypes.h. * infcmd.c (jump_command): Remove code to demangle name and add it to a cleanup list. Now just use SYMBOL_DEMANGLED_NAME. * minsyms.c (demangle.h): Include. * minsyms.c (lookup_minimal_symbol): Indent comment to match code. * minsyms.c (install_minimal_symbols): Attempt to demangle symbol names as C++ names, and cache them in SYMBOL_DEMANGLED_NAME. * mipsread.c (psymtab_language): Add static variable. * stabsread.c (demangle.h): Include. * stabsread.c (define_symbol): Attempt to demangle C++ symbol names and cache them in the SYMBOL_DEMANGLED_NAME field. * stack.c (return_command): Remove explicit demangling of name and use of cleanups. Just use SYMBOL_DEMANGLED_NAME. * symfile.c (demangle.h): Include. * symfile.c (add_psymbol_to_list, add_psymbol_addr_to_list): Fix to match macros in symfile.h and allow them to be compiled if INLINE_ADD_PSYMBOL is not true. * symfile.h (INLINE_ADD_PSYMBOL): Default to true if not set. * symfile.h (ADD_PSYMBOL_*): Add language and objfile parameters. Add code to demangle and cache C++ symbol names. Use macro form if INLINE_ADD_PSYMBOL is true, otherwise use C function form. * symmisc.c (add_psymbol_to_list, add_psymbol_addr_to_list): Remove, also defined in symfile.c, which we already fixed. * symtab.c (expensive_mangler): Remove prototype and function. * symtab.c (find_methods): Remove physnames parameter and fix prototype to match. * symtab.c (completion_list_add_symbol): Name changed to completion_list_add_name. * symtab.c (COMPLETION_LIST_ADD_SYMBOL): New macro, adds both the normal symbol name and the cached C++ demangled name. * symtab.c (lookup_demangled_partial_symbol, lookup_demangled_block_symbol): Remove prototypes and functions. * symtab.c (lookup_symbol): Remove use of expensive_mangler, use lookup_block_symbol instead of lookup_demangled_block_symbol. Remove code to try demangling names and matching them. * symtab.c (lookup_partial_symbol, lookup_block_symbol): Fix to try matching the cached demangled name if no match is found using the regular symbol name. * symtab.c (find_methods): Remove unused physnames array. * symtab.c (name_match, NAME_MATCH): Remove function and macro, replaced with SYMBOL_MATCHES_REGEXP from symtab.h. * symtab.c (completion_list_add_symbol): Rewrite to use cached C++ demangled symbol names. * symtab.h: Much reformatting of structures and such to add whitespace to make them more readable, and make them more consistent with other gdb structure definitions. * symtab.h (general_symbol_info): New struct containing fields common to all symbols. * symtab.h (SYMBOL_LANGUAGE, SYMBOL_DEMANGLED_NAME, SYMBOL_SOURCE_NAME, SYMBOL_LINKAGE_NAME, SYMBOL_MATCHES_NAME, SYMBOL_MATCHES_REGEXP, MSYMBOL_INFO, MSYMBOL_TYPE): New macros. * symtab. (struct minimal_symbol, struct partial_symbol, struct symbol): Use general_symbol_info struct. * utils.c (demangle_and_match): Remove, no longer used. * valops.c (demangle.h): Include. * xcoffexec.c (eq): Remove macro, replace usages with STREQ. * blockframe.c, breakpoint.c, c-exp.y, c-valprint.c, dbxread.c, infcmd.c, m2-exp.y, minsyms.c, objfiles.h, solib.c, stack.c, symmisc.c, symtab.c, valops.c: Replace references to minimal symbol fields with appropriate macros. * breakpoint.c, buildsym.c, c-exp.y, c-typeprint.c, c-valprint.c, coffread.c, command.c, convex-tdep.c, cp-valprint.c, dbxread.c, demangle.c, elfread.c, energize.c, environ.c, exec.c, gdbtypes.c, i960-tdep.c, infrun.c, infrun-hacked.c, language.c, main.c, minsyms.c, mipsread.c, partial-stab.h, remote-es1800.c, remote-nindy.c, remote-udi.c, rs6000-tdep.c, solib.c, source.c, sparc-pinsn.c, stabsread.c, standalone.c, state.c, stuff.c, symfile.c, symmisc.c, symtab.c, symtab.h, tm-sysv4.h, tm-ultra3.h, values.c, xcoffexec.c, xcoffread.c: Replace strcmp and strncmp usages with STREQ, STREQN, or STRCMP as appropriate. * breakpoint.c, buildsym.c, c-typeprint.c, expprint.c, findvar.c, mipsread.c, printcmd.c, source.c, stabsread.c, stack.c, symmisc.c, tm-29k.h, valops.c, values.c: Replace SYMBOL_NAME references with SYMBOL_SOURCE_NAME or SYMBOL_LINKAGE_NAME as appropriate. * buildsym.c (start_subfile, patch_subfile_names): Default the source language to what can be deduced from the filename. * buildsym.c (end_symtab): Update the source language in the allocated symtab to match what we have been using. * buildsym.h (struct subfile): Add a language field. * c-typeprint.c (c_print_type): Remove code to do explicit demangling. * dbxread.c (psymtab_language): Add static variable. * dbxread.c (start_psymtab): Initialize psymtab_language using deduce_language_from_filename.
1992-12-18 * Makefile.in (VERSION): Bump to 4.7.4.Fred Fish1-6/+12
* Makefile.in (SFILES_MAINDIR): Add typeprint.c, c-typeprint.c, m2-typeprint.c, c-valprint.c cp-valprint.c m2-valprint.c. * Makefile.in (HFILES): Add valprint.h. * Makefile.in (OBS): Add typeprint.o, c-typeprint.o, m2-typeprint.o, c-valprint.o, cp-valprint.o m2-valprint.o. * typeprint.c, typeprint.h: New files for language independent type printing functions. * c-typeprint.c, m2-typeprint.c: New files for language dependent type printing functions and definitions. * valprint.h: New include file for language independent value printing definitions. * c-valprint.c, cp-valprint.c, m2-valprint.c: New files for language dependent value printing functions. * c-exp.y (production ptype): Add range_type variable and use new create_range_type function. * c-exp.y (tokentab2, tokentab3), c-lang.c (c_op_print_tab), infcmd.c (path_var_name), language.c (unk_op_print_tab), m2-lang.c (m2_op_print_tab): Change from ANSI-obsolescent "const static" to ANSI-conformant "static const". * c-exp.y (c_create_fundamental_type): Remove unused nbytes. * c-exp.y (c_language_defn, cplus_language_defn): Add c_print_type, and c_val_print. * c-lang.h (c_print_type, c_val_print): Add prototypes. * coffread.c (decode_type): Add range_type variable and call to new create_range_type function. * complaints.c (complain): Remove unused val variable. * complaints.c (_initialize_complaints): Make it void. * convex-tdep.c (value_of_trapped_internalvar): Add range_type variable and call new create_range_type function. * defs.h (enum val_prettyprint): Move enum from value.h to here so we can avoid having to include value.h just for prototypes that need the enum (thanks ANSI). * dwarfread.c (struct_type): Local anonymous_size variable is only used if !BITS_BIG_ENDIAN. * dwarfread.c (decode_subscript_data_item): Add rangetype variable and call new create_range_type function. * elfread.c (elf_symfile_read): Remove unused dbx and text_sect variables. * eval.c (evaluate_subexp): Remove unused local variable name and the statement with no side effects that initializes it. * expprint.c (print_subexp): Change local_printstr to LA_PRINT_STRING. * gdbtypes.c (create_range_type): New function that creates a range type using code fragments from object file readers as an example of what has to be initialized. * gdbtypes.c (create_array_type): Removed index_type, low_bound, and high_bound parameters, replaced with a single range_type parameter. Change function body to use passed in range_type rather than handcrafting one. * gdbtypes.h (create_range_type): Add prototype. * gdbtypes.h (create_array_type): Change prototype parameters. * infrun.c (normal_stop): Remove unused local variables tem and c. * infrun.c (hook_stop_stub): Return 0 rather than random value. * language.c (unk_lang_print_type, unk_lang_val_print): Add stub functions that call error if called. * language.c (unknown_language_defn, auto_language_defn, local_language_defn): Add initializers unk_lang_print_type and unk_lang_val_print. * language.h (struct language_defn): Reformat for larger comments, add la_print_type and la_val_print members. Add LA_PRINT_TYPE and LA_VAL_PRINT macros. Change local_printchar to LA_PRINT_CHAR and local_printstr to LA_PRINT_STRING. * m2-lang.c (m2_create_fundamental_type): Remove unused local variable nbytes. * m2-lang.c (m2_language_defn): Add initializers m2_print_type and m2_val_print. * m2-lang.h (m2_print_type, m2_val_print): Add prototypes. * main.c (execute_command): Remove unused local variable cmdlines. * main.c (echo_command), stabsread.c (read_type), printcmd.c (clear_displays), symmisc.c (block_depth), values.c (clear_value_history): Make testing of truth value of assignment result explicit. * mipsread.c (upgrade_type): Update FIXME to include future use of create_range_type. * printcmd.c (ptype_command, ptype_eval, whatis_command, whatis_exp, maintenance_print_type): Move prototypes and functions to new typeprint.c. * printcmd.c (_initialize_printcmd): Move add_com calls for ptype_command and whatis_command to new typeprint.c. * ser-bsd.c (serial_open): Remove unused variable sgttyb. * source.c (find_source_lines): Local variable c only used when LSEEK_NOT_LINEAR is defined. * stabsread.c (read_array_type): Use new create_range_type function. * stabsread.c (read_range_type): Add new index_type variable and call new create_range_type function rather than handcrafting range types. * symmisc.c (type_print_1): Change usages to LA_PRINT_TYPE. * symtab.c (typedef_print usages): Use c_typedef_print, renamed. * symtab.c (type_print_base usages): Use c_type_print_base. * symtab.c (type_print_varspec_prefix usages): Use c_type_print_varspec_prefix. * symtab.c (type_print_method_args usages): Use cp_type_print_method_args. * valprint.c: Completely ripped apart and the fragments used to create c-valprint.c, cp-valprint.c, m2-valprint.c, and valprint.h. Remaining stuff is language independent. * value.h (struct fn_field): Forward declare for prototypes. * value.h (type_print_1): Remove prototype. * value.h (enum val_prettyprint): Moved to defs.h. * value.h (typedef_print): Prototype renamed to c_typedef_print. * value.h (baseclass_offset): Add prototype. **** start-sanitize-chill **** * Makefile.in (SFILES_MAINDIR): Add ch-typeprint.c, ch-valprint.c. * Makefile.in (OBS): Add ch-typeprint.o, ch-valprint.o. * ch-typeprint.c: New file for language dependent type printing. * ch-valprint.c: New file for language dependent value printing. * ch-exp.y (parse_number): Remove prototype and stub function. * ch-exp.y (decode_integer_literal): Removed unused digits and temp variables. * ch-exp.y (convert_float): Completely ifdef out for now. * ch-exp.y (tokentab2, tokentab3, tokentab4, tokentab5), ch-lang.c (chill_op_print_tab): Change from ANSI-obsolescent "const static" to ANSI-conformant "static const". * ch-exp.y (yylex): Add unhandled storage class enumeration literals to switch statement for completeness. * ch-lang.c (chill_create_fundamental_types): Remove unused nbytes variable. Change dummy type to 2 bytes to match int. Handle FT_VOID types gratuituously added to chill DWARF by compiler. Change FT_CHAR case to generate an TYPE_CODE_CHAR type rather than a one byte TYPE_CODE_INT type. * ch-lang.c (chill_language_defn): Add chill_print_type and chill_val_print. * ch-lang.h (chill_print_type, chill_val_print): Add prototypes. **** end-sanitize-chill ****
1992-12-15 * complaints.c: New file, code moved from utils.c.Fred Fish1-86/+141
* complaints.c (complain): Made into a varargs function. * complaints.h: New file, code moved from symfile.h. * Makefile.in (SFILES_MAINDIR): Add complaints.c. * Makefile.in (HFILES): Add complaints.h. * Makefile.in (OBS): Add complaints.o. * symfile.c (complaint_root, stop_whining, complaint_series, complain, clear_complaints, add_show_from_set for stop_whining): Moved to complaints.c. * symfile.h (struct complaint, complaint_root decl, complain prototype, clear_complaints prototype): Moved to complaints.h. * buildsym.c, coffread.c, dbxread.c, dwarfread.c, elfread.c, gdbtypes.c, mipsread.c, stbsread.c, symfile.c: Include complaints.h. Remove casts from arguments to complain(), which is now a varargs function, and remove unnecessary placeholder zero args. * defs.h (begin_line): Add prototype. * defs.h (vprintf_filtered): Add prototype. * dwarfread.c (varargs.h): Remove, no longer needed. * dwarfread.c (dwarfwarn): Remove prototype and function. * dwarfread.c (complaints): Define a bunch of complaints. * dwarfread.c (SQUAWK): Remove macro defs, convert all usages to standard complain() calls. * utils.c (begin_line): New function that ensures that whatever gets filter-printed next starts on its own line. * utils.c (vprintf_filtered): New func, like vfprintf_filtered, but to stdout (calls vfprintf_filtered internally).
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