* blockframe.c (find_pc_partial_function): Likewise.
* buildsym.c (find_symbol_in_list): Likewise.
* c-valprint.c (c_val_print): Likewise.
* coffread.c (patch_opaque_types, process_coff_symbol): Likewise.
(coff_read_enum_type): Likewise. Use SYMBOL_SET_LINKAGE_NAME.
* cp-support.c (cp_remove_params): Renamed from remove_params and
made global.
(overload_list_add_symbol): Update call to remove_params.
* cp-support.h (cp_remove_params): Declare.
* dwarf2read.c (process_enumeration_scope): Use SYMBOL_LINKAGE_NAME.
(dwarf2_const_value): Use SYMBOL_PRINT_NAME.
* expprint.c (dump_subexp_body_standard): Likewise.
* f-valprint.c (info_common_command, there_is_a_visible_common_named):
Use SYMBOL_LINKAGE_NAME to find symbols and SYMBOL_PRINT_NAME
for messages.
* findvar.c (read_var_value): Use SYMBOL_LINKAGE_NAME.
* gnu-v2-abi.c (gnuv2_value_rtti_type): Likewise.
* hppa-hpux-tdep.c (hppa32_hpux_in_solib_call_trampoline)
(hppa_hpux_skip_trampoline_code): Use SYMBOL_LINKAGE_NAME to find
symbols and SYMBOL_PRINT_NAME for messages.
* jv-lang.c (add_class_symbol): Use SYMBOL_SET_LINKAGE_NAME.
* linespec.c (decode_line_2): Use SYMBOL_LINKAGE_NAME.
* mdebugread.c (parse_symbol): Use SYMBOL_LINKAGE_NAME and
SYMBOL_SET_LINKAGE_NAME.
(mylookup_symbol): Use SYMBOL_LINKAGE_NAME.
* minsyms.c (add_minsym_to_demangled_hash_table): Use
SYMBOL_SEARCH_NAME.
(lookup_minimal_symbol): Use SYMBOL_LINKAGE_NAME or
SYMBOL_MATCHES_SEARCH_NAME, depending on the pass.
* objfiles.h (ALL_OBJFILE_MSYMBOLS): Use SYMBOL_LINKAGE_NAME.
* printcmd.c (build_address_symbolic): Use SYMBOL_LINKAGE_NAME.
(address_info): Use SYMBOL_PRINT_NAME for messages and
SYMBOL_LINKAGE_NAME for lookups.
* sol-thread.c (info_cb): Use SYMBOL_PRINT_NAME for messages.
* stabsread.c (patch_block_stabs, define_symbol)
(read_type, read_enum_type, common_block_end)
(cleanup_undefined_types_1, scan_file_globals): Use
SYMBOL_LINKAGE_NAME, SYMBOL_SET_LINKAGE_NAME, ALL_OBJFILE_MSYMBOLS,
and SYMBOL_PRINT_NAME.
* stack.c (print_frame_args): Use SYMBOL_LINKAGE_NAME.
(print_frame, frame_info): Use SYMBOL_PRINT_NAME for output. Use
cp_remove_params instead of cplus_demangle.
(print_block_frame_labels, print_frame_arg_vars): Use
SYMBOL_LINKAGE_NAME.
* symmisc.c (dump_msymbols): Use ALL_OBJFILE_MSYMBOLS and
SYMBOL_LINKAGE_NAME.
(dump_symtab_1, print_symbol, print_partial_symbols)
(maintenance_check_symtabs): Use SYMBOL_LINKAGE_NAME.
* symtab.h (DEPRECATED_SYMBOL_NAME): Delete.
(SYMBOL_SET_LINKAGE_NAME): New.
(SYMBOL_SET_NAMES): Add a comment.
* tracepoint.c (set_traceframe_context, validate_actionline)
(collect_symbol, scope_info): Use SYMBOL_LINKAGE_NAME for
lookups and SYMBOL_PRINT_NAME for output.
* typeprint.c (typedef_print): Use SYMBOL_LINKAGE_NAME.
* xcoffread.c (process_xcoff_symbol): Use SYMBOL_SET_LINKAGE_NAME.
(obj_section_offset, obj_section_addr, obj_section_endaddr): New
macros.
* objfiles.c (add_to_objfile_sections): Don't set addr, endaddr
and offset. Use size_t instead of unsigned long.
(build_objfile_section_table): Use size_t instead of unsigned
long.
(objfile_relocate): Don't relocate s->addr and s->endaddr, they're
gone.
(find_pc_sect_section): Use obj_section_addr and
obj_section_endaddr.
* symfile.c (symfile.c): Remove code that maps sections
offsets in "addr" to the object's sections.
* blockframe.c (find_pc_partial_function): Use obj_section_endaddr.
* gcore.c (gcore_create_callback): Use obj_section_addr and
obj_section_endaddr.
* maint.c (print_objfile_section_info): Likewise.
* printcmd.c (sym_info): Use obj_section_addr and
obj_section_endaddr.
* symtab.c (fixup_section): Likewise.
* Makefile.in: Update dependencies.
* dwarf2read.c: Include "addrmap.h"
(struct dwarf2_cu): New fields RANGES_OFFSET and HAS_RANGES_OFFSET.
(dwarf2_ranges_read): New prototype.
(dwarf2_build_psymtabs_hard): Initialize and prepare PSYMTABS_ADDRMAP.
Add discontiguous range to PSYMTABS_ADDRMAP by DWARF2_RANGES_READ on
HAS_RANGES_OFFSET, otherwise add there the contiguous range.
(dwarf2_ranges_read): New parameter RANGES_PST, update the function
comment for it. Add the found ranges to RANGES_PST. New variable
BASEADDR, initialize it the common way.
(dwarf2_get_pc_bounds): Update the caller for the new parameter.
(read_partial_die): `DW_AT_ranges' now only sets RANGES_OFFSET and
HAS_RANGES_OFFSET for the later processing.
* objfiles.h (struct objfile): New field PSYMTABS_ADDRMAP.
* symtab.c: Include "addrmap.h"
(find_pc_sect_psymtab): Support reading the field PSYMTABS_ADDRMAP.
Move the psymtab locator into ...
(find_pc_sect_psymtab_closer): ... a new function.
gdb/testsuite/
* gdb.dwarf2/dw2-ranges.S: Merge the secondary section with `.fini'.
* gdb.dwarf2/dw2-ranges.exp: Compile also `dw2-ranges2.S' and
`dw2-ranges3.S' and test also their MAIN2, FUNC2 and MAIN3 symbols.
* gdb.dwarf2/dw2-ranges2.S, gdb.dwarf2/dw2-ranges3.S: New files.
of FT_INTEGER fundamental type for array range index type.
(decode_base_type): Use builtin types of current_gdbarch
instead of fundamental types.
* dwarf2read.c (struct dwarf2_cu): Remove ftypes member.
(read_file_scope): Do not initialize ftypes member.
(dwarf_base_type, dwarf2_fundamental_types): Remove functions.
(read_array_type): Use builtin_type_int32 instead of FT_INTEGER
fundamental type for array range index type.
(read_tag_string_type): Likewise for string range index type.
Also, do not overwrite FT_CHAR type with new string type.
(read_base_type): If DW_AT_name is missing, create unnamed type
with given properties instead of looking for a fundamental type.
Create new types as TYPE_TARGET_TYPE for DW_ATE_address and
DW_ATE_complex_float types.
(read_subrange_type): Create new type to represent missing
DW_AT_type instead of looking for a fundamental type.
(die_type): Use builtin type to represent "void" instead of
looking for a fundamental type.
* stabsread.c (define_symbol): Use builtin types to represent
'r' and 'i' floating-point and integer constants.
* gdbtypes.c (lookup_fundamental_type): Remove.
* gdbtypes.h (lookup_fundamental_type): Remove prototype.
(FT_VOID, FT_BOOLEAN, FT_CHAR, FT_SIGNED_CHAR, FT_UNSIGNED_CHAR,
FT_SHORT, FT_SIGNED_SHORT, FT_UNSIGNED_SHORT, FT_INTEGER,
FT_SIGNED_INTEGER, FT_UNSIGNED_INTEGER, FT_LONG, FT_SIGNED_LONG,
FT_UNSIGNED_LONG, FT_LONG_LONG, FT_SIGNED_LONG_LONG,
FT_UNSIGNED_LONG_LONG, FT_FLOAT, FT_DBL_PREC_FLOAT, FT_EXT_PREC_FLOAT,
FT_COMPLEX, FT_DBL_PREC_COMPLEX, FT_EXT_PREC_COMPLEX, FT_STRING,
FT_FIXED_DECIMAL, FT_FLOAT_DECIMAL, FT_BYTE, FT_UNSIGNED_BYTE,
FT_TEMPLATE_ARG, FT_DECFLOAT, FT_DBL_PREC_DECFLOAT,
FT_EXT_PREC_DECFLOAT, FT_NUM_MEMBERS): Remove macros.
* objfiles.c (struct objfile): Remove fundamental_types member.
* symfile.c (reread_symbols): Do not clear fundamental_types.
* language.h (struct language_defn): Remove la_fund_type member.
(create_fundamental_type): Remove.
* language.c (unk_lang_create_fundamental_type): Remove.
(unknown_language_defn, auto_language_defn,
local_language_defn): Adapt initializer.
* ada-lang.c (ada_create_fundamental_type): Remove.
(ada_language_defn): Adapt initializer.
* c-lang.h (c_create_fundamental_type): Remove prototype.
* c-lang.c (c_create_fundamental_type): Remove.
(c_language_defn, cplus_language_defn, asm_language_defn,
minimal_language_defn): Adapt initializer.
* f-lang.c (f_create_fundamental_type): Remove.
(f_language_defn): Adapt initializer.
* jv-lang.c (java_create_fundamental_type): Remove.
(java_language_defn): Adapt initializer.
* m2-lang.c (m2_create_fundamental_type): Remove.
(m2_language_defn): Adapt initializer.
* objc-lang.c (objc_create_fundamental_type): Remove.
(objc_language_defn): Adapt initializer.
* p-lang.h (pascal_create_fundamental_type): Remove prototype.
* p-lang.c (pascal_create_fundamental_type): Remove.
(pascal_language_defn): Adapt initializer.
* scm-lang.c (scm_language_defn): Adapt initializer.
* objfiles.h (struct entry_info): Delete entry_func_lowpc and
entry_func_highpc fields.
* objfiles.c (init_entry_point_info): Do not clear
entry_func_lowpc and entry_func_highpc.
(objfile_relocate): Do not relocate entry_func_lowpc and
entry_func_highpc.
* dwarfread.c (read_func_scope): Do not set entry_func_lowpc and
entry_func_highpc.
* dwarf2read.c (read_func_scope): Do not set entry_func_lowpc and
entry_func_highpc.
* blockframe.c (legacy_frame_chain_valid): Replace tests against
entry_func_lowpc and entry_func_highpc with call to
inside_entry_func.
(register_objfile_data, set_objfile_data, objfile_data): New
prototypes.
* objfiles.c (objfile_alloc_data, objfile_free_data): New
prototypes.
(allocate_objfile): Call objfile_alloc_data.
(free_objfile): Call objfile_free_data.
(struct objfile_data): New.
(struct objfile_data_registration): New.
(struct objfile_data_registry): New.
(objfile_data_registry): New variable.
(register_objfile_data): New function.
(objfile_alloc_data, objfile_free_data): New functions.
(set_objfile_data, objfile_data): New functions.
* dwarf2-frame.c (dwarf2_frame_data): New variable.
(dwarf2_frame_find_fde, add_fde): Use new per-objfile data mechanism.
(_initialize_dwarf2_frame): New function and prototype.
* utils.c (streq): New function.
* dwarf2read.c (new_symbol): Use SYMBOL_SET_NAMES instead of
SYMBOL_NAME and SYMBOL_INIT_DEMANGLED_NAME.
* mdebugread.c (new_symbol): Likewise.
* stabsread.c (define_symbol): Likewise.
* coffread.c (process_coff_symbol): Likewise.
* dwarfread.c (new_symbol): Likewise.
* minsyms.c (prim_record_minimal_symbol_and_info): Use
SYMBOL_SET_NAMES instead of setting SYMBOL_NAME. Set the language
here.
(install_minimal_symbols): Don't set SYMBOL_LANGUAGE or call
SYMBOL_INIT_DEMANGLED_NAME.
* objfiles.c: Include "hashtab.h".
(allocate_objfile): Call htab_set_functions_ex for the
demangled_names_hash.
(free_objfile): Call htab_delete for the demangled_names_hash.
* objfiles.h (struct htab): Add declaration.
(struct objfile): Add demangled_names_hash.
* symfile.c: Include "hashtab.h".
(reread_symbols): Call htab_delete for the demangled_names_hash.
(add_psymbol_to_list): Use SYMBOL_SET_NAMES instead of putting
SYMBOL_NAME in the bcache.
* symtab.c: Include "hashtab.h". Update comments.
(create_demangled_names_hash, symbol_set_names): New functions.
(symbol_find_demangled_name): New function, broken out from
symbol_init_demangled_names.
(symbol_init_demangled_names): Use it.
* symtab.h (SYMBOL_INIT_DEMANGLED_NAME): Add missing parentheses.
(SYMBOL_SET_NAMES): New macro.
(symbol_set_names): Add prototype.
symbol table in an objfile.
* objfiles.c (terminate_minimal_symbol_table): New function.
(allocate_objfile): Call it.
* objfiles.h (terminate_minimal_symbol_table): New declaration.
(ALL_MSYMBOLS): No need to test whether (objfile)->msymbols is
non-NULL.
* minsyms.c (lookup_minimal_symbol_by_pc_section): To see whether
objfile has minimal symbols, compare minimal_symbol_count to zero,
instead of comparing msymbols with NULL.
* objfiles.c (have_minimal_symbols): Same.
* solib-sunos.c (solib_add_common_symbols): Call
terminate_minimal_symbol_table.
* symfile.c (reread_symbols): Same.
2003-01-23 Alexander Larsson <alexl@redhat.com>
Jim Blandy <jimb@redhat.com>
Add support for executables whose debug info has been separated
out into a separate file, leaving only a link behind.
* objfiles.h (struct objfile): New fields: separate_debug_objfile
and separate_debug_objfile_backlink.
(put_objfile_before): New declaration.
* symfile.c: #include "filenames.h".
(symbol_file_add_with_addrs_or_offsets): If this objfile has its
debug info in a separate file, read that, too. Save the addrs
argument, so we can use it again to read the separated debug info;
syms_from_objfile modifies the table we pass it.
(reread_symbols): After re-reading an objfile, call
reread_separate_symbols to refresh its separate debug info
objfile, if it has one.
(reread_separate_symbols, find_separate_debug_file,
get_debug_link_info, separate_debug_file_exists): New functions.
(debug_file_directory): New global var.
(_initialize_symfile): Initialize debug_file_directory, and
provide the new `set debug-file-directory' command to let the user
change it.
* objfiles.c (free_objfile): If this objfile has its debug info in
a separate objfile, free that one too. If this is itself a
separate debug info objfile, clear our parent's backlink.
(put_objfile_before): New function.
* utils.c (gnu_debuglink_crc32): New function.
* defs.h (gnu_debuglink_crc32): New declaration.
* Makefile.in (symfile.o): Note dependency on "filenames.h".
* configure.in: Handle --with-separate-debug-dir config option.
* acinclude.m4 (AC_DEFINE_DIR): New macro.
* acconfig.h (DEBUGDIR): New macro.
* configure, aclocal.m4, config.in: Regenerated.
gdb/doc/ChangeLog:
2003-01-23 Jim Blandy <jimb@redhat.com>
* gdb.texinfo (Separate Debug Files): New section.
(struct bstring, struct bcache): Move definition to "bcache.c".
Replaced by opaque declaration.
(bcache_xfree): Replace free_bcache.
(bcache_xmalloc, bcache_memory_used): Declare.
* bcache.c: Update copyright.
(struct bstring, struct bcache): Moved to here from "bcache.h".
Update comments.
(bcache_xmalloc, bcache_memory_used): New functions.
(bcache_xfree): Replace function free_bcache.
* Makefile.in (objfiles.o): Add $(bcache_h).
(objfiles_h): Remove $(bcache_h).
(symfile.o): Add $(bcache_h).
* symmisc.c: Update copyright.
(print_symbol_bcache_statistics): Pass psymbol_cache by value.
(print_objfile_statistics): Use bcache_memory_used.
* symfile.c: Include "bcache.h".
(reread_symbols): Use bcache_xfree.
(reread_symbols): Use bcache_xmalloc and bcache_xfree.
(add_psymbol_to_list): Pass psymbol_cache by value.
(add_psymbol_with_dem_name_to_list): Ditto.
* objfiles.h: Update copyright.
(struct bcache): Declare opaque. Do not include "bcache.h".
(struct objfile): Change psymbol_cache and macro_cache to ``struct
bcache'' pointers.
* dwarf2read.c (macro_start_file): Pass macro_cache by value.
* objfiles.c: Include "bcache.h". Update copyright.
(allocate_objfile): Use bcache_xmalloc to create psymbol_cache and
macro_cache.
(free_objfile): Use bcache_xfree.
in them yet.
* symtab.h (struct symtab): New member: `macro_table'.
* buildsym.h (pending_macros): New global variable.
* buildsym.c: #include "macrotab.h".
(buildsym_init): Initialize `pending_macros'.
(end_symtab): If we found macro information while reading a CU's
debugging info, do build a symtab structure for it. Make the
symtab point to the macro information, and clear the
`pending_macros' pointer which held it while we were reading the
debug info.
(really_free_pendings): Free any pending macro table.
* objfiles.h (struct objfile): New member: `macro_cache'.
* objfiles.c (allocate_objfile): Set allocate and free functions
for the macro cache's objstack.
(free_objfile): Empty the macro cache's obstack.
* symfile.c (reread_symbols): Empty the macro cache's obstack, and
set new allocate and free functions for it.
* solib-sunos.c (allocate_rt_common_objfile): Set allocate and
free functions for the macro cache's objstack. (Why is this
function building its own objfile?)
* symmisc.c (print_objfile_statistics): Print statistics on the
macro bcache.
* Makefile.in: Note that buildsym.o depends on macrotab.h.
* objfiles.h (SECT_OFF_BSS): Don't detect invalid sect_index_bss
here, let the users of the macro do it.
* symtab.h (ANOFFSET): Detect here if the section index is not
initialized.
* xcoffread.c (find_targ_sec): Don't treat .bss as special,
because some objfiles may not have that section at all.
* coffread.c (cs_to_section): Ditto.
* elfread.c (elf_symtab_read): Detect an uninitialized index
value.
(elfstab_offset_sections): The macro ANOFFSET cannot be used as an
lvalue anymore.
* remote.c (get_offsets, remote_cisco_objfile_relocate): Don't use
ANOFFSET as an lvalue.
* objfiles.c (objfile_relocate, objfile_relocate): Don't use
ANOFFSET as an lvalue.
* symfile.c (default_symfile_offsets): Don't use ANOFFSET as an
lvalue.
* minsyms.c: #include <ctype.h>, for msymbol_hash_iw.
(compact_minimal_symbols): Added `objfile' argument.
Put symbols in the objfile's hash table.
(install_minimal_symbols): Put symbols in the objfile's demangled
hash table.
(lookup_minimal_symbol): Use hash table to find symbol in
objfile.
(msymbol_hash_iw, msymbol_hash, add_minsym_to_hash_table): New
functions.
(prim_record_minimal_symbol_and_info): Initialize the
hash link fields of the new minimal symbol.
* symtab.h (struct minimal_symbol): New fields `hash_next',
`demangled_hash_next'.
(msymbol_hash_iw, msymbol_hash, add_minsym_to_hash_table): Declare.
* objfiles.h (MINIMAL_SYMBOL_HASH_SIZE): New define.
(struct objfile): New fields `msymbol_hash',
`msymbol_demangled_hash'.
Except for the two m32r modules, this checkin is for
overlay support.
* blockframe.c: blockvector_for_pc_sect(), block_for_pc_sect(),
find_pc_sect_function(), find_pc_sect_partial_function(): new
functions for debugging overlays; pc without section is ambiguous.
* breakpoint.[ch]: add section pointer to breakpoint struct;
add section argument to check_duplicates(); check section as well
as pc in [breakpoint_here_p(), breakpoint_inserted_here_p(),
breakpoint_thread_match(), bpstat_stop_status()];
add section argument to describe_other_breakpoints();
use INIT_SAL() macro to zero-out new sal structures;
make resolve_sal_pc() fix up the sal's section as well as its pc;
match on section + pc in clear_command() and delete_breakpoint();
account for overlay sections in insert_breakpoints(),
remove_breakpoint() and breakpoint_re_set_one();
all this to support overlays where a PC is not unique.
* exec.c: change xfer_memory() to handle overlay sections.
* findvar.c: change read_var_value() to handle overlay sections.
* frame.h: declaration for block_for_pc_sect() [blockframe.c].
* infcmd.c: jump_command() warns against jumping into an overlay
that's not in memory. Also use INIT_SAL() to initialize sals.
* infrun.c: wait_for_inferior() sets a flag to invalidate cached
overlay state information; Also use INIT_SAL() to init sals.
* m32r-rom.c: modify load routines to use LMA instead of VMA.
* m32r-stub.c: mask exit value down to 8 bits; screen out any
memory read/writes in the range 600000 to a00000, and ff680000
to ff800000 (hangs because nothing is mapped there); fix strcpy().
* maint.c: maintenance command "translate-address" supports overlays.
* minsyms.c: lookup_minimal_symbol_by_pc_sect() supports overlays.
* objfiles.[ch]: add ovly_mapped field to the obj_section struct;
this constitutes gdb's internal overlay mapping table. Add macro
ALL_OBJSECTIONS() to loop thru the obj_structs and look at overlays.
Add function find_pc_sect_section().
* printcmd.c: modify print_address_symbolic() with overlay smarts;
modify address_info() with overlay smarts; add function sym_info()
to support the INFO SYMBOL command (translate address to symbol(s));
modify disassemble_command() to work on unmapped overlays.
* source.c: use INIT_SAL() to initialize sals.
* symfile.[ch]: change generic_load() to use section's LMA address
instead of VMA address, for overlay sections.
Add numerous functions for finding a PC's section / overlay,
translating between VMA and LMA address ranges, determining if an
overlay section is mapped, etc. Add several user commands for
overlay debugging. Add support for a "generic" form of automatically
reading overlay mapping info from the inferior (based on the default
(simple) overlay manager which Cygnus provides as an example).
* symtab.[ch]: add functions find_pc_sect_symtab(),
find_pc_sect_psymtab(), find_pc_sect_psymbol(), find_pc_sect_line()
for lookup; modify lookup_symbol and decode_line_1() to use them;
modify find_function_start_sal() to account for overlay sections;
add macro INIT_SAL() for initializing struct symtab_and_line.
* target.c: fix a comment in the declaration of target_ops.
ENABLE_OBS, and THREAD_DB_OBS. These are consolidated into LIBS
and CONFIG_OBS.
* configure configure.in: Clean up test cases around thread support.
start-sanitize-v850
* configure.tgt (v850-*-*): Include v850ice.o and v850.lib if
host is Windows.
end-sanitize-v850
* c-valprint.c ch-valprint.c cp-valprint.c eval.c expprint.c
printcmd.c valops.c value.h values.c: Add bfd_section arg to
value_at and value_at_lazy.
* coffread.c dbxread.c elfread.c mdebugread.c minsyms.c symtab.h:
Add bfd_section arg to prim_record_minimal_symbol_and_info.
* corefile.c gdbcore.h printcmd.c valops.c: Use read_memory_section
instead of read_memory. It takes a bfd_section arg.
* coffread.c dbxread.c elfread.c gdb-stabs.h objfiles.h: Remove
unnecessary cast for assignment of struct dbx_symfile_info.
Struct objfile now uses a real pointer instead of PTR for this
element.
* dbxread.c (dbx_symfile_init): Stash bfd section pointers for
text, data and bss into dbx_symfile_info.
* exec.c (xfer_memory): Handle transfers for user-specified
sections.
* findvar.c (read_var_value locate_var_value): Copy bfd section
from the symbol to the value.
* gdb-stabs.h: Add section pointers for text, data and bss
sections.
* maint.c (translate address command): Add test code for overlay
address translation.
* printcmd.c (do_examine do_one_display): Now takes a bfd section
arg.
* (print_formatted x_command): Record current section along with
current address for repeated commands.
* sparc-nat.c (fetch_inferior_registers): Change
target_xfer_memory to target_{read write}_memory to allow changes
to target_xfer_memory interface for section info.
* symmisc.c (dump_msymbols print_symbol): Print section
assocaited with symbol.
* symtab.c (fixup_symbol_section): New routine to
add section info to symbols returned by lookup_symbol.
* symtab.h (struct general_symbol_info): Add bfd section to
symbols.
* target.c target.h (target_xfer_memory): Add bfd section to
args.
* (target_read_memory_section): New routine to read data from a
specific section.
* (target_memory_bfd_section): New global variable to pass bfd
section in to targets.
* valarith.c (value_add value_addr value_array): Preserve bfd
section when computing new value.
* value.h (struct value): Add bfd section to values.
* values.c (allocate_value value_copy): Initialize/preserve bfd
section.
* (unpack_double): Clean up _MSC_VER conditionals to remove
duplicate code.
start-sanitize-v850
* v850ice.c: New module to support communication with NEC's
PC-based ICE.
* config/v850/tm-v850.h (REGISTER_NAMES): Replace sp, gp, fp, and
ep names with rxx names. sp and fp are renamed via a different
mechanism.
end-sanitize-v850
before testing against reg_ptr.
* eval.c (evaluate_subexp_standard): Cast type of
TYPE_FN_FIELD_VOFFSET to int.
* findvar.c (extract_signed_integer, extract_unsigned_integer,
extract_long_unsigned_integer): Cast type of sizeof to int.
* values.c (unpack_field_as_long, modify_field): Ditto.
* valops.c (value_assign, call_function_by_hand): Ditto.
* infcmd.c (do_registers_info): Ditto.
* ser-tcp.c (tcp_open): Ditto
* remote.c (putpkt): Ditto.
* dcache.c (dcache_peek): Ditto.
* dcache.c (dcache_poke): Ditto.
* m2-exp.y (yylex): Ditto.
* gnu-regex.c (re_match_2): Ditto.
* f-lang.c (ADD_BF_SYMNUM, saved_bf_list_end, tmp_bf_ptr): Ifdef
out unused macro definition and variables.
* inftarg.c (proc_wait): Move from main.c to here, and make static.
* valprint.c (val_print_string): Change bufsize from int to unsigned.
* main.c (wait.h): Include
* top.c (command_line_input): Remove unused variable "c".
* f-typeprint.c (f_type_print_varspec_prefix): Add missing enum
value TYPE_CODE_TYPEDEF to switch statement.
(f_type_print_varspec_suffix): Add missing enum value
TYPE_CODE_TYPEDEF to switch statement.
* ch-exp.c (parse_primval): Add remaining enumeration values to
switch statement, with no specific action.
(ch_lex): Add LOC_UNRESOLVED in switch statement.
(pushback_token): Ifdef out, since code using it is ifdef'd out.
* stabsread.c (cleanup_undefined_types): Remove unused label
"badtype".
* objfiles.h (print_symbol_bcache_statistics): Add prototype.
* maint.c (objfiles.h): Include.
(maintenance_print_statistics): Remove unused variable "temp".
* minsyms.c (lookup_minimal_symbol_solib_trampoline): Remove
unused variable "found_file_symbol".
* m2-exp.y (yylex): Add LOC_UNRESOLVED case to switch.
* language.c (lang_bool_type): Use existing function local type
variable rather than create block local variables.
* solib.c (disable_break): Enclose in ifndef SVR4_SHARED_LIBS.
* infptrace.c (wait.h, command.h): Include.
* ser-tcp.c (gdb_string.h): Include
* i386-tdep.c (codestream_seek): Change "place" to CORE_ADDR.
(i386_get_frame_setup): Change "pc" from int to CORE_ADDR.
* command.c (complete_on_enum): Make assignment used as truth value
explictly check against NULL.
(wait.h): Include.
* infrun.c (wait_for_inferior): Ifdef out prologue_pc since code
that uses it is ifdef'd out.
* parser-defs.h: Add prototype for write_dollar_variable.
* infrun.c: Add prototype for write_pc_pid.
* breakpoint.h: Add prototype for re_enable_breakpoints_in_shlibs.
* symmisc.c (bcache.h): Include.
* bcache.h: Add prototype for print_bcache_statistics.
* symfile.c: Include <time.h>.
* printcmd.c (print_scalar_formatted): Change len to unsigned int.
* valarith.c (value_equal): Cast result of TYPE_LENGTH to int.
* valarith.c (value_binop): Change result_len, promoted_len1,
and promoted_len2 to unsigned int.
* valarith.c (value_subscripted_rvalue): Change elt_offs and
elt_size to unsigned int.
* valops.c (value_array): Change typelength to unsigned int.
(destructor_name_p): Change len to unsigned int.
* scm-lang.h (scm_parse): Add prototype for scm_unpack.
* symfile.c (decrement_reading_symtab): Change return type to void.
* valarith.c (value_subscript): Remove unused variable "word".
(value_subscript): Remove unused variable "tint".
* valops.c (auto_abandon): Ifdef out, since code using it is also
ifdef'd out.
* eval.c (init_array_element): Remove unused variable "val".
* Makefile.in (values.o): Depends on scm-lang.h.
(command.o): Depends upon wait_h.
(ser-tcp.o): Depends upon gdb_string.h.
(infptrace.o): Depends upon wait_h and command_h.
(maint.o): Depends on objfiles.h and symfile.h.
* values.c (allocate_repeat_value): Remove unused variable
"element_type".
(scm-lang.h): Include.
* breakpoint.c (create_longjmp_breakpoint): Enclose in
GET_LONGJMP_TARGET define, unused otherwise.
* config/i386/nm-linux.h: Add prototypes for i386_insert_watchpoint,
i386_remove_watchpoint and i386_stopped_by_watchpoint.
* Makefile.in (SFILES): Add bcache.c.
(symtab_h): Add bcache.h.
(HFILES_NO_SRCDIR): add bcache.h
(COMMON_OBJS): Add bcache.o
(bcache.o): New target.
* dbxread.c (start_psymtab): Make global_syms & static_syms
type "partial_symbol **".
* hpread.c (hpread_start_symtab): Ditto.
* os9kread.c (os9k_start_psymtab): Ditto.
* stabsread.h (start_psymtab): Ditto.
* {symfile.c, symfile.h} (start_psymtab_common): Ditto.
* maint.c (maintenance_print_statistics): Call
print_symbol_bcache_statistics.
* objfiles.c (allocate_objfile): Initialize psymbol bcache malloc
and free pointers.
* solib.c (allocate_rt_common_objfile): Ditto.
* symfile.c (reread_symbols): Ditto.
(free_objfile): Free psymbol bcache when objfile is freed.
(objfile_relocate): Use new indirect psymbol pointers.
* objfiles.h (struct objfile): Add psymbol cache.
* symfile.c (compare_psymbols): Now passed pointers to pointers to
psymbols.
(reread_symbols): Free psymbol bcache when freeing other objfile
resources.
(add_psymbol_to_list, add_psymbol_addr_to_list): Initialize new
psymbol using the psymbol bcache.
(init_psymbol_list): Psymbol lists now contain pointers rather than
the actual psymbols.
* symfile.h (psymbol_allocation_list): Psymbol lists now dynamically
grown arrays of pointers.
(ADD_PSYMBOL_VT_TO_LIST): Initialize new symbol using the psymbol
bcache.
* symmisc.c (print_partial_symbols): Now takes pointer to pointer
to partial symbol.
(print_symbol_bcache_statistics): New function to print per objfile
bcache statistics.
(print_partial_symbol, print_partial_symbols,
maintenance_check_symtabs, extend_psymbol_list):
Account for change to pointer to pointer to partial symbol.
* symtab.c (find_pc_psymbol, lookup_partial_symbol, decode_line_2,
make_symbol_completion_list):
Account for change to pointer to pointer to partial symbol.
* symtab.h (bcache.h): Include.
* xcoffread.c (xcoff_start_psymtab): Make global_syms & static_syms
type "partial_symbol **".
for Sun acc 3.0 under SunOS4.
Changes to improve handling of runtime common symbols
under SunOS4.
* minsyms.c (get_symbol_leading_char): New routine to determine
the leading symbol character for an objfile.
(prim_record_minimal_symbol_and_info, install_minimal_symbols):
Use it.
* objfiles.h (rt_common_objfile): New global, points to objfile
containing the runtime common minimal symbols.
* objfiles.c (free_objfile): Mark rt_common_objfile as
unallocated before freeing it.
* solib.c (allocate_rt_common_objfile): New routine to allocate
an objfile for the runtime common minimal symbols.
(solib_add_common_symbols): Allocate an objfile for the runtime
common symbols if necessary and put common symbols into it.
Clean up code and comments.
(solib_add, special_symbol_handling): Cleanup comments regarding
runtime common symbols.
* stabsread.c (scan_file_globals_1): New routine, contains
old scan_file_globals code. Checks if there are any unresolved
global symbols before starting the expensive minimal symbol table
search.
(scan_file_globals): Now calls scan_file_globals_1 for the passed
objfile and eventually for the runtime common objfile. Complains
about any unresolved global symbols and removes them from the
global symbol chain to avoid dangling pointers into the symbol
table if the symbol table is reread.
objfile not symfile_objfile.
* symtab.h, minsyms.c (minsyms_sort): New function.
* objfiles.c (objfile_relocate): Call it.
* remote-vx.c (vx_add_symbols): Call breakpoint_re_set.
* objfiles.c, objfiles.h (objfile_to_front): New function.
* remote-vx.c (vx_add_symbols): Call it.
* coffread.c (coff_symtab_read): Handle common symbols the same
way that partial-stab.h does.
* symfile.h (ADD_PSYMBOL_VT_TO_LIST),
symfile.c (add_psymbol_to_list, add_psymbol_addr_to_list):
No longer demangle partial symbols.
* symtab.c (lookup_symbol, list_symbols): Handle mangled
variables, e.g. C++ static members, via the minimal symbols.
Handle reordered functions in an objfile, for Irix 5.2 shared
libraries.
* objfiles.h (OBJF_REORDERED): New bit in the objfile flags,
set if the functions in an objfile are reordered.
* mdebugread.c (parse_partial_symbols): Detect reordered
functions in an objfile.
* symtab.c (find_pc_psymtab, find_pc_symtab): Use expensive
lookup algorithm if the functions in the objfile are reordered.
* xcoffexec.c (exec_close): If the current target has a copy
of the exec_ops sections, reflect the freeing of the sections
in current_target.
* valops.c (call_function_by_hand): Use `sizeof dummy1', not
`sizeof dummy', for constructing the call dummy code.
* config/sparc/tm-sparc.h: Add PARAMS declarations to all
function declarations.
* sparc-tdep.c (sparc_pop_frame): Cast result of
read_memory_integer to CORE_ADDR when passing it to PC_ADJUST.
* irix5-nat.c (enable_break): Set breakpoint at the entry point
of the executable, to handle the case where main resides in a
shared library.
* irix5-nat.c (solib_create_inferior_hook): Reset stop_soon_quietly
after shared library symbol reading, to get rid of a warning from
heuristic_proc_start if the startup code has no symbolic debug info.
* breakpoint.h (struct breakpoint): Add new fields language
and input_radix, to enable breakpoint resetting with the
proper language and radix.
* breakpoint.c (set_raw_breakpoint): Initialize them.
(breakpoint_re_set_one): Use them when resetting the breakpoint.
(breakpoint_re_set): Preserve current language and input_radix
across breakpoint_re_set_one calls.
* symtab.c (decode_line_1): Do not build a canonical line
specification for `*expr' line specifications.
* breakpoint.h (bpstat_stop_status): Fix prototype declaration.
* (nlm_symfile_read): Record bounds of main() so that backtrace
command will know where to stop.
* objfiles.c (objfile_relocate): Relocate entry point/func info
for backtrace as well.
* objfiles.h: Define values for invalid PCs for entry point info.
* symfile.c (init_entry_point_info): Initialize invalid values
with aforementioned macros.
* config/alpha/tm-alphanw.h: Turn on FRAME_CHAIN_VALID_ALTERNATE
to cause backtrace to stop when it gets back to main().
* config/i386/tm-i386nw.h: Ditto.
find, to locate TM_FILE, XM_FILE, and NAT_FILE. This is faster
and means that these filenames no longer need be unique across all
the config/* directories.
* configure.in: Put the config/*/ into TM_FILE, etc.
* m68k-stub.c (computeSignal): Return SIGFPE, not SIGURG, for chk
and trapv exceptions.
* target.h (struct section_table), objfiles.h (struct obj_section):
Change name of field sec_ptr to the_bfd_section. More mnemonic
and avoids the (sort of, for the ptx compiler) name clash with
the name of the typedef.
* exec.c, xcoffexec.c, sparc-tdep.c, rs6000-nat.c, osfsolib.c,
solib.c, irix5-nat.c, objfiles.c, remote.c: Change users.
* utils.c: Include readline.h.
* Makefile.in (utils.o): Add dependency.
* remote.c (getpkt): Add support for run-length encoding.
cp-valprint.c, eval.c, expprint.c, findvar.c, language.c,
objfiles.h, infcmd.c, printcmd.c, stack.c, typeprint.c,
valarith.c, valops.c, valprint.c, value.h, values.c: Replace
value with value_ptr. This is for the ptx compiler.
* objfiles.h, target.h: Don't declare a "sec_ptr" field using a
"sec_ptr" typedef.
* symm-nat.c: Add a bunch of stuff for symmetry's ptrace stuff.
#if 0 i386_float_info.
* symm-tdep.c (round): Remove. Also remove sgttyb.
* symm-tdep.c: Remove lots of stuff which duplicates stuff from
i386-tdep.c. Remove register_addr and ptx_coff_regno_to_gdb.
* i386-tdep.c (i386_frame_find_saved_regs): Put in
I386_REGNO_TO_SYMMETRY check in case it is needed for Dynix
someday.
* config/i386/nm-symmetry.h: Change KERNEL_U_ADDR. Move
stuff from PTRACE_READ_REGS, PTRACE_WRITE_REGS macros to
symm-nat.c. Define CHILD_WAIT and declare child_wait().
* config/i386/tm-symmetry.h: Remove call function stuff; stuff in
tm-i386v.h is apparently OK.
* config/i386/xm-symmetry.h [_SEQUENT_]: Define HAVE_TERMIOS not
HAVE_TERMIO. Define MEM_FNS_DECLARED, NEED_POSIX_SETPGID, and
USE_O_NOCTTY.
VARIABLES_INSIDE_BLOCK to OS9K_VARIABLES_INSIDE_BLOCK.
* symfile.c (symbol_file_command): Check for (CORE_ADDR)-1, not
(CORE_ADDR)0, from target_link, since that is what it uses.
Process name at end, not during parsing (like we did before Kung's
change), so that -readnow and -mapped can appear anywhere.
Make text_relocation a local variable.
* config/i386/i386os9k.mt: Fix comment.
* Makefile.in (ALLDEPFILES): Add remote-os9k.c.
* os9kread.c: Put "comments" after #endif inside /* */.
* stabsread.h: Add os9k_stabs variable.
* stabsread.c (start_stabs), os9kread.c (os9k_process_one_symbol):
Set it.
* stabsread.c (define_symbol): If os9k_stabs, put a 'V' symbol
descriptor in global_symbols not local_symbols.
(read_type): If os9k_stabs, accept 'c', 'i', and 'b' type
descriptors.
(read_type): If os9k_stabs, accept function parameters after 'f'
type descriptor.
(read_array_type): If os9k_stabs, don't expect index type and
expect lower and upper to be separated by ',' not ';'.
(read_enum_type): If os9k_stabs, read a number before the first
enumeration constant.
(os9k_init_type_vector): New function.
(dbx_lookup_type): Call it when starting new type vector.
* config/i386/tm-i386os9k.h: Define BELIEVE_PCC_PROMOTION.
* (os9k_process_one_symbol): Call define_symbol not os9k_define_symbol.
* os9kstab.c: Removed.
* Makefile.in: Update accordingly.
* objfiles.c (objfile_relocate_data): Removed.
* remote-os9k.c (rombug_wait): Call objfile_relocate
not objfile_relocate_data.
* objfiles.h, objfiles.c: Remove find_pc_objfile.
* remote-os9k.c (rombug_wait): Call find_pc_section not
find_pc_objfile.
* main.c (quit_command): Check inferior_pid; revert Kung change.
* remote-os9k.c (rombug_create_inferior): Set inferior_pid.
ChangeLog objfiles.c objfiles.h symfile.c target.c main.c
Makefile.in configure.in
Added Files:
os9kread.c os9kstab.c remote-os9k.c
* os9kread.c: New file to read os9000 style symbo table.
* os9kstab.c: new file to read os9000 style stabs.
* remote-os9k.c: remote protocol talking to os9000 rombug monitor.
* objfiles.c (find_pc_objfile): new function to search objfile
from pc.
* objfiles.c (objfile_relocate_data): new function to relocate
data symbols in symbol table.
* objfiles.h: Add two aux fields in struct objfile to handle
multiple symbol table files situation like in os9000.
* symfile.c: Change so 'symbol-file' command can handle multiple
files. Also call target_link() to get relocation infos.
* target.c (target_link): new function to get relocation info when
a symbol file is requested to load.
* main.c (quit_command): take out 'inferior_pid != 0' condition,
because in cross mode there's no inferior pid, bit they need to
be detached.
Makefile.in: add os9kread.c os9kstab.c and .o's.
configure.in: add i386os9k target.
config/i386/i386os9k.mt: new add.
config/i386/tm-i386os9k.h: new add.
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.
read_memory to get byte order right.
* hppah-tdep.c (find_unwind_info): Don't read in unwind info
anymore. This is done in paread.c now. We expect unwind info
to hang off of objfiles, and search all of the objfiles when until
we find a match.
* (skip_trampoline_code): Cast arg to target_read_memory.
* objfiles.h (struct objfile): Add new field obj_private to hold
per object file private data (unwind info in this case).
* paread.c (read_unwind_info): New routine to read unwind info
for the objfile. This data is hung off of obj_private.
* tm-hppa.h: Define struct obj_unwind_info, to hold pointers to
the unwind info for this objfile. Also define OBJ_UNWIND_INFO to
make this easier to access.
* 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.
prevent crashes when examining cross-targets.
* dbxread.c (process_one_symbol): Include directory name when
calling start_subfile for SOL & BINCL symbols. This allows gdb to
find include files, and yacc/lex sources when the cwd doesn't match
that in which the object was compiled.
* objfiles.h (ALL_MSYMBOLS): Don't seg fault when there are no
msymbols.
* symtab.c (lookup_symtab_1): Rewrite. It now handles include
files.
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.
tried to read symbols from a file, for mapped objfiles. This fixes a
memory leak (actually a constant memory growth) due to reading symbol
files with no debug info and thus generating no psymtabs or symtabs.
Most typically happened with shared libraries.
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.