* sparc-tdep.c (sparc_init_extra_frame_info): Set it.
(examine_prologue, sparc_init_extra_frame_info): Use ->frame plus
->sp_offset to compute the address something is saved at, not
->bottom.
* sparc-tdep.c (get_saved_register): New function.
* tm-sparc.h: Define GET_SAVED_REGISTER; don't define
FRAME_FIND_SAVED_REGS, HAVE_REGISTER_WINDOWS or REGISTER_IN_WINDOW_P.
* stack.c (frame_info): Add comment about what to do if
FRAME_FIND_SAVED_REGS is not defined.
* sparc-tdep.c (sparc_init_extra_frame_info): Set ->frame field
here. Get it right for flat frames.
* sparc-tdep.c (sparc_frame_chain): Instead of returning
meaningful value for ->frame field, just return dummy value.
This change is needed because the old code didn't deal with mixed
flat and non-flat frames.
* sparc-tdep.c (sparc_pop_frame): Write SP_REGNUM from
frame->frame, don't go through saved regs for this.
* sparc-tdep.c: Move guts of skip_prologue to new function
examine_prologue. Check for flat prologue and set is_flat.
Provide the caller with the information about what is saved where
if desired.
(skip_prologue, sparc_frame_find_saved_regs): Call examine_prologue.
* sparc-tdep.c: Replace union sparc_insn_layout and anonymous
union in isannulled, which won't work on a little-endian host,
with X_* macros.
* sparc-tdep.c (sparc_frame_saved_pc): If addr == 0, the saved PC
is still in %o7.
* config/sparc/tm-sparc.h: Define INIT_FRAME_PC and
INIT_FRAME_PC_FIRST.
* blockframe.c (get_prev_frame_info): Modify comments regarding
INIT_FRAME_PC_FIRST and the sparc.
* sparc-tdep.c (single_step): Use 4 not sizeof (long) for size of
instruction.
the return type of methods to avoid infinite loops with anonymous
types.
* valops.c (search_struct_field): Handle anonymous unions.
* sparc-tdep.c (sunos4_skip_trampoline_code): New function
to correctly handle steps into -g compiled PIC objects in the
main executable.
* config/sparc/tm-sun4os4.h (SKIP_TRAMPOLINE_CODE):
Redefine to use sunos4_skip_trampoline_code.
* dwarfread.c (DWARF_REG_TO_REGNUM): Provide a default mapping
from DWARF to GDB register numbering.
* dwarfread.c (locval): Use DWARF_REG_TO_REGNUM to map the
register value.
* config/mips/tm-mipsv4.h (DWARF_REG_TO_REGNUM): Define.
* 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.
and stack pointer during stepping, to speed things up.
A. Changes to not select a frame until we need a selected frame:
* blockframe.c (flush_cached_frames): Call select_frame (NULL, -1).
* infrun.c (wait_for_inferior): Move call to select_frame back to
normal_stop. This reverts a change of 13 Apr 94 (it says Jeff
Law, but the change was my idea); the only reason for that change
was so we could save and restore the selected frame in
wait_for_inferior, and now that flush_cached frames clears the
selected frame, that should work OK now.
B. Changes to not create a current_frame until we need one:
* blockframe.c (get_current_frame): If current_frame is NULL, try
to create an innermost frame.
* sparc-tdep.c (sparc_pop_frame), infcmd.c (run-stack_dummy),
infrun.c (wait_for_inferior), thread.c (thread_switch),
convex-tdep.c (set_thread_command), a29k-tdep.c (pop_frame),
alpha-tdep.c (alpha_pop_frame), convex-xdep.c (core_file_command),
h8300-tdep.c (h8300_pop_frame), h8500-tdep.c (h8300_pop_frame),
hppa-tdep.c (hppa_pop_frame), i386-tdep.c (i386_pop_frame),
i960-tdep.c (pop_frame), m68k-tdep.c
(m68k_pop_frame), mips-tdep.c (mips_pop_frame), rs6000-tdep.c
(push_dummy_frame, pop_dummy_frame, pop_frame), sh-tdep.c
(pop_frame), config/arm/tm-arm.h (POP_FRAME),
config/convex/tm-convex.h (POP_FRAME), config/gould/tm-pn.h
(POP_FRAME), config/ns32k/tm-merlin.h (POP_FRAME),
config/ns32k/tm-umax.h (POP_FRAME), config/tahoe/tm-tahoe.h
(POP_FRAME), config/vax/tm-vax.h (POP_FRAME): Don't
call create_new_frame.
* corelow.c (core_open), altos-xdep.c (core_file_command),
arm-xdep.c (core_file_command), gould-xdep.c (core_file_command),
m3-nat.c (select_thread), sun386-nat.c (core_file_command),
umax-xdep.c (core_file_command): Don't call create_new_frame; do
call flush_cached_frames.
* blockframe.c (reinit_frame_cache): Don't call create_new_frame
or select_frame.
C. Changes to get rid of stop_frame_address and instead only
fetch the frame pointer when we need it.
* breakpoint.c (bpstat_stop_status): Remove argument
frame_address; use FRAME_FP (get_current_frame ()).
* infrun.c (wait_for_inferior): Don't pass frame pointer to
bpstat_stop_status.
* infrun.c (wait_for_inferior): Use FRAME_FP (get_current_frame
()) instead of stop_frame_address.
* infrun.c (save_inferior_status, restore_inferior_status),
inferior.h (struct inferior_status): Don't save and restore
stop_frame_address.
* inferior.h, infcmd.c, thread.c (thread_switch), m3-nat.c
(select_thread): Remove stop_frame_address and uses thereof.
D. Same thing for the stack pointer.
* infrun.c (wait_for_inferior): Remove stop_sp and replace
uses thereof with read_sp ().
E. Change to eliminate one nasty little spot where we were
wanting to know the frame pointer from before the current step
(idea from GDB 3.5, which saved my ass, because my other ideas of
how to fix it were very baroque).
* infrun.c: Remove prev_frame_address.
* infrun.c (wait_for_inferior, step_over_function): Use
step_frame_address instead of prev_frame_address.
F. Same basic idea for the stack pointer.
* inferior.h, infcmd.c: New variable step_sp.
* infcmd.c (step_1, until_next_command): Set it.
* infrun.c: Remove prev_sp and replace uses by step_sp.
* infrun.c (wait_for_inferior): If we get out of the step
range, then set step_sp to the current stack pointer before we
start going again.
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.
in case execution was stopped in the called function.
* stack.c (print_frame_info, frame_info): If backtracing through
a call dummy, handle the starting source line number on a line
boundary like backtracing through sigtramp.
* sparc-tdep.c (sparc_frame_find_saved_regs): Get frame address
for call dummy frame right. Remove old test for dummy frame,
it has been unused at least since gdb-3.5.
* sparc-tdep.c (sparc_push_dummy_frame): Set return address register
of the dummy frame.
({extract,store}_{signed_integer,unsigned_integer,address}):
New routines to replace SWAP_TARGET_AND_HOST.
All over: All uses of SWAP_TARGET_AND_HOST on integers replaced.
* solib.[hc] (find_pc_section_from_so_list): new function and
prototype.
* sparc-tdep.c (in_solib_trampoline): new function.
* symfile.[hc] (find_pc_section): new function and prototypes.
* target.[hc] (find_pc_section_from_targets): new function and
prototypes.
* config/sparc/tm-sun4sol2.h (IN_SOLIB_TRAMPOLINE): redefine to
in_solib_trampoline.
* regex.c: Always rename bcopy to memcpy, etc.
FIXME: Eventually do the renames rather than use #define's.
* sparc-tdep.c (deferred_stores): Moved from sparc-xdep.c.
Fix bcopy->memcpy.
* sparc-xdep.c: Move deferred_stores to target dependent.
symtab.h, tm-i386v4.h, valprint.c, values.c: Lint.
* breakpoint.c, c-exp.y, coffread.c, command.c, environ.c, eval.c,
findvar.c, infcmd.c, infptrace.c, infrun.c, m2-exp.y, parse.c,
putenv.c, solib.c, sparc-xdep.c, symtab.c, tm-i386v.h, tm-sparc.h,
utils.c, valarith.c, valops.c, valprint.c, values.c:
Replace bcopy() use with memcpy(), which is more standard and can
take advantage of gcc's builtin functions for increased performance.
* breakpoint.c, buildsym.c, coffread.c, dbxread.c, i386-tdep.c,
ieee-float.c, infcmd.c, sparc-tdep.c, stack.c, symtab.c, symtab.h,
target.c, values.c:
Replace bzero() use with memset(), which is more standard and can
take advantage of gcc's builtin functions for increased performance.
* i386-tdep.c, main.c, valprint.c:
Replace bcmp() use with memcmp(), which is more standard and can
take advantage of gcc's builtin functions for increased performance.
(_initialize_remote): `set remotedebug' enables packet trace.
* dbxread.c (process_one_symbol:N_FUN): GCC now produces relative
N_SLINE's, etc, just like Sun cc on Solaris2.
* am29k-tdep.c (read_register_stack, write_register_stack):
Change RSTACK_HIGH_ADDR to rstack_high_address, a user-settable
variable. Add `set' and `show' commands for it.
* doc/gdb.texinfo: Document it.
* eval.c: Avoid residue-by-zero when evaluating without side effects.
(Bug and fix found by Pierre Willard.)
* sparc-tdep.c: Clean up slightly for Solaris2.
* tm-sparc.h (PC_ADJUST): Avoid calling error() from this;
it causes recursive calls to error() when used in cleanups.
To do so requires that we make it a function, so we do.
* sparc-tdep.c (sparc_pc_adjust): New implem of PC_ADJUST.
* utils.c (do_cleanups): Remove the current cleanup from the
chain *before* calling it, in case error() is called from it.
The result won't be pretty, but won't be an infinite loop either.
calling SKIP_PROLOGUE_FRAMELESS_P if it's defined.
* tm-sparc.h (SKIP_PROLOGUE, SKIP_PROLOGUE_FRAMELESS_P):
Define two variants, one faster.
* sparc-tdep.c (sparc_frame_chain): Use target_read_memory
and return zero, rather than giving an error.
(setup_arbitrary_frame): Initialize the PC in the new frame.
(skip_prologue): Add a second arg saying whether we're just
checking for a frameless function or not.