mst_solib_trampoline.
* f-valprint.c (f_val_print): Change cast of valaddr from
CORE_ADDR * to char **, since that is how it is used.
* dbxread.c (read_dbx_dynamic_symtab): Save copy of symbol names
using obsavestring, and pass that to prim_record_minimal_symbol.
Having the objfile point to bfd_asymbol_name directly doesn't work
if we save and restore a mapped symbol file.
core_ops to current_target after adding the shared libraries.
* partial-stab.h (N_EXCL), dbxread.c (add_old_header_file,
find_corresponding_bincl_psymtab): Change `repeated header not seen'
error to a complaint, simplify complaint.
* procfs.c (signalname, errnoname): Make `name' const.
* symfile.c (reread_symbols): Use filename from old BFD to
reopen the objfile.
* values.c (record_latest_value): Don't record value in the
history chain until we are sure there won't be an error.
names mean end of .o file.
* infrun.c (wait_for_inferior): Clean up multi-thread logic near
top of routine. Handle new thread notification cleanly.
* lynx-nat.c (child_wait): General cleanups, handle new LynxOS
thread notification scheme.
* (child_resume): General cleanups, handle resumption of all
threads properly.
comments to reflect that this file deals with SOM (an object file
format), rather than the PA (a cpu).
(Makefile.in): Chaned appropriately.
(config/pa/hppabsd.mh, config/pa/hppahpux.mh): Likewise.
* dbxread.c (somstab_build_psymtabs): Renamed from
pastab_build_psymtabs.
associated with the symbol to make dynmaic relocation work.
* (dbx_symfile_read, process_one_symbol): Fixes to work around
Solaris brain-damage which don't apply to relocatable object
files.
* (stabsect_build_psymtabs): New routine to read stabs out of an
arbitrarily named section.
* nlmread.c (nlm_symtab_read): Read ALL syms from the NLM, not just
globals.
* (nlm_symfile_read): Call stabsect_build_psymtabs to read the
stabs out of the nlm.
* partial-stabs.h (cases 'f' & 'F'): Fixes to work around Solaris
brain-damage which don't apply to relocatable object files.
* remote.c (putpkt): Improve error reporting and error handling.
* stabsread.c (define_symbol, scan_file_globals): Record section
info in sym.
are in the .plt section.
* minsyms.c (lookup_solib_trampoline_symbol_by_pc,
find_solib_trampoline_target): New functions for handling
stepping into -g compiled shared libraries.
* symtab.h (lookup_solib_trampoline_symbol_by_pc,
find_solib_trampoline_target): Add prototypes.
* config/tm-sunos.h (IN_SOLIB_TRAMPOLINE, SKIP_TRAMPOLINE_CODE):
Define to handle stepping into -g compiled shared libraries.
* config/tm-sysv4.h (SKIP_TRAMPOLINE_CODE): Define to handle
stepping into -g compiled shared libraries.
* configure.in: Add mips-*-sysv4* support.
* config/mips/mipsv4.mh, config/mips/mipsv4.mt,
config/mips/tm-mipsv4.h, config/mips/xm-mipsv4.h, mipsv4-nat.c:
New files for MIPS SVR4 support.
* Makefile.in: Update for new mipsv4 files.
* alpha-tdep.c (heuristic_proc_desc, find_proc_desc): Use
read_next_frame_reg to obtain the frame relative stack pointer.
* mips-tdep.c (heuristic_proc_desc): Use read_next_frame_reg to
obtain the frame relative stack pointer.
* mdebugread.c (parse_partial_symbols, psymtab_to_symtab1):
Handle stStatic and stStaticProc symbols in stabs-in-ecoff output
by entering them into the minimal symbol table.
* printcmd.c (print_scalar_formatted): Do not try to unpack to
a long for float formats.
* solib.c: Include "elf/mips.h" only if DT_MIPS_RLD_MAP does not
get defined in <link.h>.
* solib.c (solib_add): Add shared library sections to the section
table of the target before adding the symbols.
* partial-stab.h: Relocate static and global functions.
* dbxread.c (read_dbx_symtab): Remove unused variable
end_of_text_address. Relocate text_addr when passing it
to end_psymtab.
For Alpha OSF/1 targets, enable gdb to set breakpoints in shared
library functions before the executable is run. Retrieve dynamic
symbols from stripped executables.
* mipsread.c (read_alphacoff_dynamic_symtab): New function.
* mipsread.c (mipscoff_symfile_read): Use it. Issue warning message
if no debugging symbols were found.
* alpha-tdep.c (alpha_skip_prologue): Silently return the unaltered
pc if memory at the pc is not accessible and GDB_TARGET_HAS_SHARED_LIBS
is defined.
* config/alpha/nm-alpha.h (GDB_TARGET_HAS_SHARED_LIBS): Define,
OSF/1 has shared libraries.
match_bitstring_literal): Guard tolower calls with isupper,
tolower on old BSD systems blindly subtracts a constant.
* dbxread.c (read_ofile_symtab): Check for __gnu_compiled_* as
well when determining the producer of the object file.
* mdebugread.c (has_opaque_xref): New function to check for
cross reference to an opaque aggregate.
* mdebugread.c (parse_symbol, parse_partial_symbols): Do not
enter typedefs to opaque aggregates into the symbol tables.
* mdebugread.c (parse_external): Remove skip_procedures argument,
it has always been 1. Remove code that handled stProc symbols,
it was never executed and was wrong, as the index of a
stProc symbol points to the local symbol table and not to the
auxiliary symbol info. Update caller.
* mdebugread.c (parse_partial_symbols): Do not enter external
stProc symbols into the partial symbol table, they are already
entered into the minimal symbol table.
* config/i386/tm-symmetry.h: Clean up, it is now only used for Dynix.
Remove all conditionals and definitions for ptx.
I386_REGNO_TO_SYMMETRY moved to here from symm-tdep.c.
Fix addresses of floating point registers in REGISTER_U_ADDR.
STORE_STRUCT_RETURN now handles cc and gcc conventions.
FRAME_CHAIN, FRAMELESS_FUNCTION_INVOCATION, FRAME_SAVED_PC,
IN_SIGTRAMP, SIGCONTEXT_PC_OFFSET defined to make backtracing through
signal trampoline code work.
* config/i386/xm-symmetry.h: Clean up, it is now only used for Dynix.
Remove all conditionals and definitions for ptx.
Remove KDB definitions.
* symm-nat.c (store_inferior_registers): Fetch registers before
storing them to obtain valid floating point control registers.
Store fpu registers.
* symm-nat.c (print_1167_control_word): Dynix 3.1.1 defines
FPA_PCR_CC_C0 and FPA_PCR_CC_C1, avoid duplicate case value.
* symm-nat.c (fetch_inferior_registers, child_xfer_memory):
Fix typos.
* symm-nat.c (child_resume): Update type of `signal' parameter.
* symm-tdep.c (I386_REGNO_TO_SYMMETRY): Moved to tm-symmetry.h.
(record_minimal_symbol, read_dbx_symtab): Set it.
(read_dbx_symtab): Use lowest_text_address + text_size instead of
end_of_text_address.
* config/gould/tm-pn.h: Add comment regarding END_OF_TEXT_DEFAULT.
from here . . .
* symtab.h: . . . to here.
* dbxread.c (record_minimal_symbol): Move check for gcc{,2}_compiled.
and __gnu_compiled* from here . . .
* minsyms.c (prim_record_minimal_symbol_and_info): . . . to here.
* minsyms.c (prim_record_minimal_symbol): Call
prim_record_minimal_symbol_and_info rather than duplicating code.
stabs-in-elf.
(pastab_build_psymtabs): Likewise.
* hppa-tdep.c: Change all comments to reference %r3 or frame pointer
rather than %r4.
(frame_chain, skip_prologue, dig_rp_from_stack): Handle %r3 as the
frame pointer.
* config/pa/tm-hppa.h (FP_REGNUM): Define as %r3.
(FIND_FRAME_SAVED_REGS): Handle %r3 as frame pointer.
(CALL_DUMMY): Likewise.
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.
right operations ourself, rather than calling symbol_file_command.
If we re-read something, call clear_symtab_users not just
breakpoint_re_set.
* objfiles.h, objfiles.c (build_objfile_section_table): No longer
static.
* symfile.c (clear_symtab_users): Call clear_pc_function_cache.
* coffread.c, dbxread.c, elfread.c, mipsread.c, nlmread.c, paread.c
(*_symfile_offsets): Set objfile->num_sections.
* remote.c (remote_wait), symfile.c (syms_from_objfile):
Don't muck with objfile->num_sections now that all the symbol
readers set it.
* elfread.c: Clean up obsolete comment about handling only DWARF.
* paread.c: Remove comment about how we should use an "ordinary"
file format with an hppa suffix. There is nothing ordinary about SOM.
* 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.
consider there may be a file compiled without -g screwing things up
(e.g. we are looking for the minimal symbol for "main" and we get the
one for "start" instead).
This is the change I mean:
* minsyms.c, symtab.h (lookup_next_minimal_symbol): New function.
* dbxread.c (process_one_symbol): Use it.
was empty and thrown away.
* mipsread.c (parse_partial_symbols): Do not add empty psymtabs to
dependency list, skip self dependencies.
* mipsread.c (parse_fdr): Removed, obsolete.
* mipsread.c (parse_lines): Check for cbLine being zero, not
cbLineOffset.
* mipsread.c (struct symloc): Add pst_language.
* mipsread.c (parse_partial_symbols): Set up proper language for header
files, save it in pst_language for psymtab_to_symtab_1.
* mipsread.c (psymtab_to_symtab_1): Use pst_language.
we have breakpoints or watchpoints as we might have to ignore internal
breakpoints.
Fix gdb core dumps after `file newfile' commands.
* symtab.h, symfile.c (clear_symtab_users): New routine which
unconditionally clears symtab users. clear_symtab_users_once
commented out as it was a noop anyway.
* objfiles.c (free_objfile): Don't call clear_symtab_users_once.
* objfiles.c (free_all_objfiles), symfile.c (new_symfile_objfile),
xcoffexec.c (exec_close): Call clear_symtab_users if necessary.
* symfile.c (syms_from_objfile): Install cleanups for errors during
symbol reading.
* coffread.c, dbxread.c, mipsread.c, xcoffread.c (*_symfile_read):
Lint cleanup code, call do_cleanups explicitly.
* symfile.c (symbol_file_add): Call new_symfile_objfile and
reinit_frame_cache _after_ the new symbols are read in.
command. Now we use unwind info by default if we can find it.
* config/sparc: Move VARIABLES_INSIDE_BLOCK and SUN_FIXED_LBRAC_BUG
to tm-sparc.h so they are shared between Solaris and SunOS4.
* dbxread.c (process_one_symbol): Deal with SunOS4 acc N_STSYM and
N_GSYM functions.
* configure.in: Use them.
* alldeps.mak: List them.
* coffread.c (decode_base_type): Deal with anonymous enum type.
* i387-tdep.c (print_387_status_word): Add comment re "top".
* i386-tdep.c [I386_AIX_TARGET] (i386_extract_return_value): New func.
* dbxread.c: Use SEEK_SET and SEEK_CUR, not L_*. Define them if and
only if not defined by a header file.
* mipsread.c: Don't define L_SET or L_INCR.
defined, don't worry about Sun's silly LBRAC bug.
* dbxread.c (process_one_symbol): If there's a symbol before an
N_SO, don't error().
(case N_BCOMM): complain () not error ().
a non-gcc N_OPT symbol is found. Make SUN_FIXED_LBRAC_BUG a macro
which returns 0 or 1 to say whether to do it.
* config/sparc/sun4{sol2,os4}.h
(SUN_FIXED_LBRAC_BUG,VARIABLES_INSIDE_BLOCK): Use n_opt_found so
the right thing happens for both acc and SunOS4 /bin/cc.
BLOCK_ADDRESS_FUNCTION_RELATIVE a macro, make it a variable which
is true if we are doing stabs-in-elf, false otherwise.
config/sparc/tm-sun4sol2.h: Don't define it.
set demangling style automatically.
* defs.h (CPLUS_MARKER): Clarify comment that this is only for
GNU C++, not C++ in general.
* symtab.h (general_symbol_info): Simplify by eliminating one
structure level for the language dependent info.
size field a define (DBX_STRINGTAB_SIZE_SIZE). Ensure that the
offset to the string table is nonzero and handle the nonexistant
string table case, should it occur. Ensure that the string table
size read from the file is reasonable, with a minimum lower bound
of DBX_STRINGTAB_SIZE_SIZE instead of zero.
reported by mycroft@gnu.ai.mit.edu.
(Ultrix 2.2 support from Michael Rendell <michael@mercury.cs.mun.ca>)
* configure.in (vax-*-ultrix2*): New triplet.
* config/vaxult2.mh: New file.
* xm-vaxult2.h: New file.
Call new bfd_get_size() and verify that string table is no larger
than the file that is supposed to contain it.
* symfile.c (syms_from_objfile): Only complain about configured
NAMES_HAVE_UNDERSCORE differences between gdb and bfd if the
current target is the default BFD target.
* 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.
* 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).