* frame.h (generic_unwind_get_saved_register): Declare.
* mips-tdep.c (read_next_frame_reg): Fetch register from
current regcache when frame is NULL.
(mips_init_extra_frame_info): Pass NULL explicitly for parameter
that must be NULL.
(mips_get_saved_register): Call generic_unwind_get_saved_register()
instead of frame_register_unwind().
* rs6000-tdep.c: Include "gdb_assert.h".
(registers_e500): Add "acc" and "spefscr".
(PPC_GPRS_PSEUDO_REGS): Remove trailing comma.
(rs6000_gdbarch_init): Update initialization of ppc_gp0_regnum,
ppc_gplast_regnum, sp_regnum and fp_regnum. Check that gp0_regnum
really is "r0".
(registers_e500): Mark the "acc" as a 64 bit (from Jim Willson).
From Jim Ingham <jingham@apple.com>:
* dbxread.c (process_one_symbol): Use last_function_start rather
than function_start_offset to find the real beginning of the
current function. The latter is just the text section offset on
some systems, the former is always the real function start.
* configure.in (Makefile): Use the test ${target} != ${host},
instead of the absence of the "nm.h" file, to determine of the
configuration non-native.
* configure: Regenerate.
2003-02-12 Jason Molenda (jmolenda@apple.com)
* symmisc.c (print_objfile_statistics): Include information about
the number of psymtabs and symtabs in each object file.
[testsuite/ChangeLog]
2003-02-13 Jason Molenda (jmolenda@apple.com)
* gdb.base/maint.exp: Update maint print statistics regexp to include
new entries.
* x86-64-tdep.c (x86_64_extract_return_value)
(x86_64_store_return_value): Use regcache instead of regbuf.
(x86_64_gdbarch_init): Change related set_gdbarch_* functions.
* x86-64-linux-nat.c (fill_gregset): Use regcache.
* interps.c (clear_interpreter_hooks): Convert function definition
to ISO C.
Index: mi/ChangeLog
2003-02-09 Andrew Cagney <ac131313@redhat.com>
* mi-interp.c (mi_remove_notify_hooks): Convert function
definition to ISO C.
for remote-e7000.c and infttrace.c.
2003-02-05 Fred Fish <fnf@intrinsity.com>
* remote-e7000.c (e7000_drain_command): Fix precedence problem with
'=' and '!='.
* rdi-share/ardi.c (wait_for_debug_message): Fix precedence problem
with '&' and '=='.
(angel_RDI_info): Ditto.
* infttrace.c (threads_continue_all_but_one): Fix precedence problem
with '&' and '!='.
(threads_continue_all_with_signals): Ditto.
i[3456]86-*-sysv5*, i[3456]86-*-sco3.2v5*): Remove. These are all
handled fine by i[3456]86-*sco* and i[3456]86-sysv*.
* config/i386/i386sco5.mt, config/i386/i386v4.mt,
config/i386/i386v42mp.mt: Removed.
* MAINTAINERS: Mark h8500 as obsolete.
* configure.tgt (h8500-*-*): Mark h8500 code as obsolete.
* findvar.c (value_from_register): Ditto.
* h8500-tdep.c: Mark file as obsolete.
* config/h8500/h8500.mt: Ditto.
* config/h8500/tm-h8500.h: Ditto.
* NEWS: Mention that h8500 is obsolete.
* 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.
(s390_address_class_type_flags_to_name)
(s390_address_class_name_to_type_flags): New functions.
(s390_gdbarch_init): Define ADDRESS_CLASS_TYPE_FLAGS_TO_NAME,
ADDRESS_CLASS_NAME_TO_TYPE_FLAGS, and ADDRESS_CLASS_TYPE_FLAGS.
* frame.h: Note that namelen can be negative.
* frame.c (frame_map_name_to_regnum): When LEN is negative, use
NAME's length.
* NEWS: Mention that the d10v's `regs' command is deprecated.
* d10v-tdep.c (d10v_gdbarch_init): Set print_registers_info.
(d10v_print_registers_info): New function.
(show_regs): Call d10v_print_registers_info.
(_initialize_d10v_tdep): Mark "show regs" command as deprecated.
From 2002-11-09 Jason Molenda (jason-cl@molenda.com)
* stack.c (print_frame_info_base): Output complete FRAME tuple
for synthesized frames.
2003-02-01 Andrew Cagney <ac131313@redhat.com>
From 2002-11-09 Jason Molenda (jason-cl@molenda.com):
* gdb.mi/mi-syn-frame.exp: New tests for synthetic frames in
stack backtraces.
* gdb.mi/mi-syn-frame.c: Part of same.
* gdbarch.sh: Explictly specify all method levels. When a
variable with an empty level, provide a non-multi-arch default.
(BELIEVE_PCC_PROMOTION_TYPE): Set level to empty.
* gdbarch.h: Re-generate.
* stabsread.c (BELIEVE_PCC_PROMOTION_TYPE): Delete. Always defined.
* config/m68k/tm-sun3.h (BELIEVE_PCC_PROMOTION_TYPE): Define as 1
* main.c (captured_main): Delete #ifdef ADDITIONAL_OPTIONS,
ADDITIONAL_OPTION_CASES, and ADDITIONAL_OPTION_HANDLER code.
(print_gdb_help): Delete #ifdef ADDITIONAL_OPTION_HELP code.
* stabsread.c (DBX_PARM_SYMBOL_CLASS): Delete macro.
(define_symbol): Update.
* symfile.c (generic_load): Remove references to nindy.
* symtab.c: Remove references to nindy.
Index: doc/ChangeLog
2003-02-01 Andrew Cagney <ac131313@redhat.com>
* gdbint.texinfo (Target Architecture Definition): Delete
description of ADDITIONAL_OPTIONS, ADDITIONAL_OPTION_CASES,
ADDITIONAL_OPTION_HANDLER, and ADDITIONAL_OPTION_HELP, and
BEFORE_MAIN_LOOP_HOOK, and DBX_PARM_SYMBOL_CLASS along with
references to nindy and i960.
* gdb.texinfo (i960): Delete all references to i960 and nindy.
(fill_symbuf): Support an in-memory buffer for stabs data.
(stabs_seek): New function.
(dbx_psymtab_to_symtab): Relocate the stabs data if necessary.
(read_ofile_symtab): Use stabs_seek.
(elfstab_build_psymtabs): Take an asection* instead of
an offset and size. Relocate the stabs data if necessary.
Save the section* for dbx_psymtab_to_symtab.
* dwarf2read.c: Add section variables for each debug section.
(dwarf2_locate_sections): Fill them in.
(dwarf2_read_section): Take an asection* argument.
Relocate the section contents if necessary.
(dwarf2_build_psymtabs, dwarf2_build_psymtabs_easy): Update callers.
* dwarf2cfi.c (parse_frame_info): Take a section argument and pass
it to dwarf2_read_section.
(dwarf2_build_frame_info): Update callers.
* elfread.c (elf_symfile_read): Update call to
elfstab_build_psymtabs.
* gdb-stabs.h (struct dbx_symfile_info): Add stab_section.
(DBX_STAB_SECTION): New macro.
* stabsread.h (elfstab_build_psymtabs): Update prototype.
* symfile.c (symfile_dummy_outputs): New function.
(symfile_relocate_debug_section): New function.
* symfile.h (symfile_relocate_debug_section): Add prototype.
* d10v-tdep.c: Include "frame-unwind.h".
(d10v_gdbarch_init): Append d10v_frame_p to the unwind predicate
list.
(next_addr, uses_frame): Delete.
(struct d10v_unwind_cache): Define.
(prologue_find_regs): Add struct d10v_unwind_cache info parameter.
Use info instead of next_addr and uses_frame globals.
(d10v_frame_init_saved_regs): Delete function.
(d10v_init_extra_frame_info): Delete function.
(d10v_gdbarch_init): Do not initialize init_extra_frame_info,
frame_init_saved_regs or pop_frame, frame_chain, frame_chain_valid,
init_frame_pc or frame_saved_pc.
(d10v_pop_frame): Delete function.
(do_d10v_pop_frame): Delete function.
(d10v_frame_chain): Delete function.
(d10v_frame_chain_valid): Delete function.
(d10v_frame_pc_unwind): New function.
(d10v_frame_id_unwind): New function.
(saved_regs_unwinder): New function.
(d10v_frame_register_unwind): New function.
(d10v_frame_pop): New function.
(d10v_frame_unwind): New variable.
(d10v_frame_p): New function.
(d10v_frame_saved_pc): Delete function.
* Makefile.in (d10v-tdep.o): Update dependencies.
* frame.c (frame_saved_regs_id_unwind): Assert FRAME_CHAIN_P.
(legacy_get_prev_frame): Assert FRAME_CHAIN_P.
(get_prev_frame): When FRAME_CHAIN_P, call legacy_get_prev_frame.
(frame_saved_regs_pc_unwind): Assert FRAME_SAVED_PC_P.
* gdbarch.sh (FRAME_CHAIN): Change to a function with predicate.
(FRAME_SAVED_PC): Change to a function with predicate.
* gdbarch.h, gdbarch.c: Re-generate.
* sentinel-frame.h, sentinel-frame.c: New files.
* Makefile.in (frame.o): Update dependencies.
(SFILES): Add sentinel-frame.c.
(sentinel_frame_h): Define.
(COMMON_OBS): Add sentinel-frame.o.
(sentinel-frame.o): Specify dependencies.
* frame.c: Include "sentinel-frame.h".
(frame_register_unwind): Rewrite assuming that there is always a a
->next frame.
(frame_register, generic_unwind_get_saved_register): Ditto.
(frame_read_unsigned_register, frame_read_signed_register): Ditto.
(create_sentinel_frame, unwind_to_current_frame): New functions.
(get_current_frame): Rewrite using create_sentinel_frame and
unwind_to_current_frame. When possible, always create a frame.
(create_new_frame): Set next to the sentinel frame.
(get_next_frame): Rewrite. Don't go below the level 0 frame.
(deprecated_update_frame_pc_hack): Update the next frame's PC and
ID cache when necessary.
(frame_saved_regs_id_unwind): Use frame_relative_level.
(deprecated_generic_get_saved_register): Use frame_relative_level,
get_frame_saved_regs, get_frame_pc, get_frame_base and
get_next_frame.
(frame_saved_regs_register_unwind): Use get_frame_saved_regs and
frame_register.
Check for monstartup and _mcleanup regardless of --enable-profiling.
* maint.c: Check for monstartup and _mcleanup before using them.
* config.in: Regenerated.
* configure: Regenerated.
symbols found)" message here; we haven't checked for a separate
debug info file yet, so we don't know yet.
(symbol_file_add_with_addrs_or_offsets): Print it here, after
we've looked everywhere. Also, there's no need to print a special
message when we're loading the separate debug info file: the one
symbol_file_add prints is fine.
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.
like the old symbol_file_add, but taking new arguments: you can
now pass in either a `struct section_addr_info' list to say where
each section is loaded, or a `struct section_offsets' table. Pass
these new arguments through to syms_from_objfile as appropriate.
(symbol_file_add): Just call symbol_file_add_with_addrs_or_offsets,
with the appropriate quiescent values for the new arguments.
(syms_from_objfile): Add the ability to pass in a section offset
table directly, as an alternative to the section_addr_info table.
Document arguments better.
(symbol_file_add): Pass extra arguments to syms_from_objfile.
* symfile.h (syms_from_objfile): Update declaration.
* rs6000-nat.c (objfile_symbol_add): Pass new arguments to
syms_from_objfile.
* Makefile.in (symfile.o): List dependency on $(gdb_assert_h).
Jason Molenda <jmolenda@apple.com>.
* Makefile.in (PROFILE_CFLAGS): Substitute from configure.
(INTERNAL_LDFLAGS): Don't include PROFILE_CFLAGS.
* NEWS: Mention profiling.
* configure.in (--enable-gdbtk): Fix typo.
(--enable-profiling): New. Set PROFILE_CFLAGS.
* maint.c (maintenance_set_profile_cmd): Remove NOTYET.
Fill in function.
(profiling_state): New variable.
(mcleanup_wrapper): New function.
(_initialize_maint): Remove NOTYET, fix call to
add_setshow_boolean_cmd for "maint set profile".
* configure: Regenerated.
* frame.c (frame_saved_regs_pop): Assert POP_FRAME_P.
* gdbarch.sh (POP_FRAME): Change to function with predicate.
Suppress actual parameters when `-'.
* gdbarch.h, gdbarch.c: Regenerate.
* config/djgpp/fnchange.lst: Rename mi1-var-block.exp,
mi1-var-child.exp, mi1-var-cmd.exp and mi1-var-display.exp.
Rename opcodes/iq2000-desc.c and opcodes/iq2000-dis.c. Rename
i386-interix-nat.c and i386-interix-tdep.c. Rename
m68klinux-nat.c and m68klinux-tdep.c. Rename
config/mips/tm-linux.h and config/mips/tm-linux64.h. Rename
bfd/po/.cvsignore and opcodes/po/.cvsignore. Rename
gdb/objc-exp.tab.c and gdb/ada-exp.tab.c
* main.c (captured_main): Use xfree, not free.
* frame.h (frame_id_unwind_ftype): Change type so that the frame's
ID back using a parameter.
* frame.c (frame_id_unwind): Update call.
(frame_saved_regs_id_unwind): Update.
* dummy-frame.c (dummy_frame_id_unwind): Update function.
* dummy-frame.h (struct frame_id): Add opaque declaration.
(dummy_frame_id_unwind): Update declaration.
* breakpoint.c (until_break_command): Add new argument. Use it to
decide whether to stop only at the current frame or not.
* breakpoint.h (until_break_command): Update prototype.
* infcmd.c (until_command): Add new argument to until_break_command
call.
(advance_command): New function.
(_initialize_infcmd): Update help string for 'until' command.
Add new 'advance' command.
(struct private_thread_info): Remove lwpid. Add thread handle (th),
thread information (ti), and valid flags (th_valid, ti_valid).
(attach_thread): Move target_pid_to_str call to after the thread
is added to GDB's list. Initialize the cache.
(thread_get_info_callback, thread_db_map_id2thr)
(thread_db_get_info): New functions.
(thread_from_lwp, lwp_from_thread, thread_db_fetch_registers)
(thread_db_store_registers, thread_db_thread_alive)
(thread_db_get_thread_local_address): Use them.
(thread_db_pid_to_str): Likewise. Return "Missing" instead
of calling error() for threads in unknown state.
(clear_lwpid_callback): New function.
(thread_db_resume): Use it to clear the cache.
* gdbarch.sh (FRAME_INIT_SAVED_REGS): Change to function with
predicate.
* gdbarch.h, gdbarch.c: Regenerate.
* stack.c (frame_info): Only initialize the saved registers when
FRAME_INIT_SAVED_REGS_P.
* frame.c (frame_saved_regs_register_unwind): Assert
FRAME_INIT_SAVED_REGS_P.
(deprecated_generic_get_saved_register): Ditto.