aboutsummaryrefslogtreecommitdiff
path: root/gdb/partial-stab.h
AgeCommit message (Collapse)AuthorFilesLines
1993-09-28Tue Sep 28 09:45:38 1993 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)Jim Kingdon1-1/+1
* symmisc.c (print_symbol): Use %02x not %2x for LOC_CONST_BYTES. Clean up problems with targets and hosts that have 64 bit longs and pointers and 32 bit ints. * breakpoint.c, buildsym.c, c-lang.c, c-valprint.c, ch-lang.c, ch-valprint.c, core.c, cp-valprint.c, dbxread.c, exec.c, expprint.c, gdbtypes.c, infcmd.c, language.c, language.h, m2-lang.c, maint.c, mips-tdep.c, mipsread.c, partial-stab.h, printcmd.c, remote-vx.c, solib.c, source.c, stack.c, symfile.c, symmisc.c, symtab.c, valops.c, valprint.c, xcoffexec.c: Change all printf formats from %x to %lx if outputting an address. Change la_*_format to use long format. local_hex_string, local_hex_string_custom now take an unsigned long argument, change all callers. * coffread.c (read_coff_symtab): Remove superfluous cast for complaint output. * dbxread.c (end_psymtab): Cast MSYMBOL_INFO to long, not int. * findvar.c, value.h (write_register): Change register value to long. * gdbtypes.h (struct type): Change `bitsize' to long as TYPE_FIELD_STATIC_PHYSNAME uses this field as a pointer. * inferior.h (struct inferior_status): Change type of stop_pc to CORE_ADDR. * language.h (local_octal_string, local_octal_string_custom): Remove prototype, the functions are neither defined nor used. * mipsread.c (parse_symbol): Use temporary variable for bitsize as f->bitsize is a long now. * objfiles.c (add_to_objfile_sections, build_objfile_section_table): Use unsigned long casts instead of int for abusing sections_end pointer as integer. * stack.c (parse_frame_specification): Change type of `args' to CORE_ADDR for SETUP_ARBITRARY_FRAME. * printcmd.c (make_vasize): Allow redefinition via MAKEVA_SIZE. * mipsread.c (parse_type): Alpha cc now supports the t->continued bit, update algorithm to match the way the compiler uses it.
1993-09-02 * symtab.c, symfile.c, c-exp.y, ch-exp.y, m2-exp.y, buildsym.c,Jim Kingdon1-0/+2
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-07-20 * symtab.h (enum minimal_symbol_type): Add mst_file_*.Jim Kingdon1-20/+4
* partial-stab.h [DBXREAD_ONLY]: Record statics in miminal symbols. * dbxread.c (record_minimal_symbol): Deal with statics. * minsyms.c (lookup_minimal_symbol): Prefer externals to statics.
1993-07-18 * partial-stab.h (N_SO): Add the text offset to valu before, not after,Jim Kingdon1-4/+4
passing it to END_PSYMTAB.
1993-06-24 * partial-stab.h: Consolidate case statements for N_LSYM and N_FUN.Jim Kingdon1-72/+42
* dbxread.c: Change comment regarding acc.
1993-04-15* dbxread.c (unknown_symchar_complaint): Add new complaint.John Gilmore1-5/+4
* stabsread.c: Declare it. * partial-stab.h: Use it. * utils.c (malloc_botch): Don't forward-declare if NO_MMALLOC.
1992-12-31 * partial-stab.h (near N_BINCL): Remove redundant code in N_BINCLStu Grossman1-12/+5
case. Use code in N_SOL.
1992-12-23 * defs.h (STRCMP, STREQ, STREQN): New macros.Fred Fish1-17/+33
* 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-17Eliminate uses of NAMES_HAVE_UNDERSCORE, usingJohn Gilmore1-7/+13
bfd_get_symbol_leading_char instead. * coffread.c (EXTERNAL_NAME): New macro for removing possible leading character from names. (read_coff_symtab): Use BFD's FILE *, don't open a second one. (read_coff_symtab): Complain() about .bb/.eb mismatch, don't error(). (process_coff_symbol, coff_read_struct_type, coff_read_enum_type): Replace NAMES_HAVE_UNDERSCORE with EXTERNAL_NAME. * kdb-start.c (main): Remove NAMES_HAVE_UNDERSCORE. * minsyms.c (install_minimal_symbols): Replace NAMES_HAVE_UNDERSCORE. Remove SOME_NAMES_HAVE_DOT support (apparently unused). * partial-stab.h: Replace NAMES_HAVE_UNDERSCORE. * solib.c: Replace NAMES_HAVE_UNDERSCORE. * stabsread.h: Remove NAMES_HAVE_UNDERSCORE and HASH_OFFSET. * symfile.c (syms_from_objfile): Insert debugging check to test NAMES_HAVE_UNDERSCORE setting against the BFD support. FIXME, remove this (and all tm-*.h NAMES_HAVE_UNDERSCORE) soon. * doc/gdbint.texinfo (Host Conditionals): Remove NAMES_HAVE_UNDERSCORE, SOME_NAMES_HAVE_DOT, document MEM_FNS_DECLARED. (Target Conditionals): Remove all of the above.
1992-12-15 * complaints.c: New file, code moved from utils.c.Fred Fish1-1/+2
* 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-10-22* partial-stab.h ('f', 'F'): Don't reference pst->textlow if pstJohn Gilmore1-2/+2
is null. * tm-sun4sol2.h (PROLOGUE_FIRSTLINE_OVERLAP): Remove -- it causes problems in setting breakpoint in the right place in functions with `float' args which are passed as doubles. * xm-vaxbsd.h (MEM_FNS_DECLARED): Avoid erroneous redecl's. * config/rs6000.mh (NATDEPFILES): Add corelow.o.
1992-09-26* findvar.c (supply_register): Add CLEAN_UP_REGISTER_VALUE hook.John Gilmore1-2/+2
* tm-hppa.h (CLEAN_UP_REGISTER_VALUE): Use it. * hppa-coredep.c: Remove, now that we use the hook. * config/hppab.mh, config/hppah.mh: Use standard coredep.o. * hppab-xdep.c, hppah-xdep.c: Remove custom code, use hook. * dbxread.c, partial-stab.h: Replace all #ifdef hp9000s800's with GDB_TARGET_IS_HPPA's. This is a SERIOUS KLUDGE. The code needs to all be ripped out and reimplemented right (see elfread.c). * tm-hppa.h (GDB_TARGET_IS_HPPA): Define.
1992-07-16* Makefile.in (OTHERS): Add gcc.patch.Stu Grossman1-35/+31
* partial-stab.h (N_SO): Fix handling of redundant SOs (again...)
1992-07-04Relocate symbols using an array of section_offsets, rather than aJohn Gilmore1-17/+23
single `addr' or `offset'. This makes Solaris-2 support work, and permits better VxWorks (and maybe xcoff) support later. See ChangeLog.
1992-07-03* dbxread.c (process_one_symbol): Ignore N_MAIN, N_ENDM for Solaris.John Gilmore1-1/+2
* partial-stab.h: Ignore N_ENDM. * elfread.c (elf_symtab_read): Ignore symbols that don't have a CODE or DATA section attachment. This eliminates a lot of random values from shared libraries, which screw up the ordinary symbols in the address ranges they happen to overlap. * buildsym.c (define_symbol): Eliminate special tests for function types; move into "function" cases in switch statement. (define_symbol: 'f', 'F', 'P'): Process all parameter types in case they define new type numbers. But ignore them (FIXME). ('k', 'B'): Ignore const and volatile if we see them (FIXME). (read_sun_builtin_type): Add commentary.
1992-06-26Default dir_so_symnum to -10 to avoid even the slightest possibility ofStu Grossman1-2/+2
screwage. This is a continuation of the redundant SO record fixup for the Lucid C++ compiler.
1992-06-25* partial-stab.h (N_SO): Rearrange code a little so that all SOStu Grossman1-10/+10
stabs cause end_psymtab to be called.
1992-06-24* partial-stab.h (case N_TEXT): Fix fencepost error whenStu Grossman1-1/+1
detecting start of new symbol info after reading symtab for a module with a zero length TEXT segment. (Note that this fixes the BNR problem with printing vxWorksVersion. That ought to make Ken happy).
1992-06-19* configure.in, dbxread.c, hppa-coredep.c, hppa-pinsn.c,Stu Grossman1-1/+8
hppabsd-core.c, hppabsd-tdep.c, hppabsd-xdep.c, hppahpux-tdep.c, hppahpux-xdep.c, munch, partial-stab.h, tm-hppabsd.h, tm-hppahpux.h, xm-hppabsd.h, xm-hppahpux.h: HPPA merge.
1992-06-17 * partial-stab.h: Convert single rindex use to strrchr.Fred Fish1-1/+1
* mipsread.c, dbxread.c: Remove troublesome inclusion of non- standard <strings.h> file, now that the only single use of rindex in the gdb source files is gone.
1992-06-16* dbxread.c (process_one_symbol), partial-stab.h: IgnoreStu Grossman1-25/+33
extraneous SO stabs from busted C++ compilers.
1992-06-14* dbxread.c (end_psymtab): Only reset texthigh if it's not alreadyJohn Gilmore1-12/+21
set. Don't reset our own texthigh, or dependency-only pst's, in scanning all the rest of the psymtabs. (process_one_symbol): Fix comments around N_OBJ, N_OPT, N_UNDF. * buildsym.h (N_UNDF): Improve comments. (N_LSYM, etc): Skip types without names (":T(0,3)=sfoob...").
1992-06-13* dbxread.c: Add symbol_size to struct dbx_symfile_info.John Gilmore1-1/+42
Add symbol_size and file offsets to struct symloc. Add static symbol_table_offset, string_table_offset, file_string_table_offset, next_file_string_table_offset, last_function_name. (add_old_header_file): Convert error() to complain()t. (dbx_symfile_read): Get symbol size via the objfile. Also get symbol_table_offset. (dbx_symfile_init): Record symbol size and count via the objfile. (dbx_next_symbol_text): Always add file_string_table_offset when accessing string table. (read_dbx_symtab): Initialize file_string_table_offset to 0. (SET_NAMESTRING): Use the offset. (end_psymtab): Large kludge to determine addresses where source files start and end (for the psymtab header). (psymtab_to_symtab_1): Set file_string_table_offset before reading. Get this, symbol size, and symbol offset, from psymtab. (read_ofile_symtab): Don't back up one symbol for Solaris2. Patch up last_source_start_addr if zero in N_SO. (process_one_symbol): Add variable function_start_offset. ( "", N_FUN, N_LBRAC, N_RBRAC, N_SLINE): Add ifdef for BLOCK_ADDRESS_FUNCTION_RELATIVE. ( "", N_OBJ, N_OPT): Ignore. (elfstab_build_psymtabs): New function to read stabs out of an ELF file. * Makefile.in: Accept $(BISON) even though we really want $(YACC). (gdb): use GLOBAL_CFLAGS when linking, too. * partial-stab.h (N_UNDF): Deal with Sol2 relative stringtab offsets. (N_OBJ, N_OPT): Ignore. ('f', 'F'): Save last function name. * symfile.h: Prototype elfstab_build_psymtabs. * symfile.c: Add almost-OK debug versions of add_psymbol_*to_list. * xm-sysv4.h: Add <limits.h> to avoid conflicting defns in defs.h.
1992-03-29LintJohn Gilmore1-5/+5
1992-03-27Misc cleanups from code review.John Gilmore1-1/+2
1992-03-21Many changes, most related to creating entry point information on a per-objfileFred Fish1-5/+5
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-02-22* Check in Fred Fish's changes in these modules. FredJohn Gilmore1-21/+22
will make ChangeLog entries for all of them.
1991-12-27More changes, mostly cleanups from the last set.Per Bothner1-14/+31
Made some more progress in removing duplicate assembly opcode files. More improvements to how mipsread and to a lesser extent dbxread work. See the ChangeLog for details.
1991-12-27Various changes to clean up ADD_PSYMBOL_TO_LIST and ADD_PSYMBOL_ADDR_TO_LISTFred Fish1-16/+0
usages.
1991-12-23Oodles of changes. The most important is adding support for stabsPer Bothner1-0/+576
encapsulated in mips ecoff. See ChangeLog for the gory details.