* NEWS: Add Alpha Linux as a new native configuration.
* mdebugread.c (parse_symbol): When we find a malloc() symbol with
return type VOID, assume no debugging info is available for that
object file and patch the return value into VOID *. Otherwise,
operations requiring an implicit call to malloc() will fail.
* infrun.c (wait_for_inferior): The criterion to detect entering a
sigtramp handler is now: (a) the current pc is inside a sigtramp
handler, (b) the previous pc is not in a sigtramp handler, and (c)
the current stack pointer is "inner" than the old one. Condition
(c) is new to avoid mistaking a return from a signal handler into
sigtramp as a new sigtramp invocation.
* dcache.c (struct dcache_block): Declare addr as CORE_ADDR. An
int may not be big enough to hold an address.
(dcache_hit): Ditto.
(dcache_peek_byte): Fix indentation.
* configure.in (alpha-*-linux*): Add target.
* configure: Rebuild
* config/alpha/tm-alpha.h (PROC_DESC_IS_DYN_SIGTRAMP): New macro.
(SET_PROC_DESC_IS_DYN_SIGTRAMP): Ditto.
(DYNAMIC_SIGTRAMP_OFFSET): Ditto.
(SIGCONTEXT_ADDR): Ditto.
(FRAME_PAST_SIGTRAMP_FRAME): Ditto.
* config/alpha/alpha-linux.mh: New file.
* config/alpha/alpha-linux.mt: Ditto.
* config/alpha/nm-linux.h: Ditto.
* config/alpha/tm-alphalinux.h: Ditto.
* config/alpha/xm-alphalinux.h: Ditto.
* config/alpha/xm-alphaosf.h: Renamed from xm-alpha.h.
* config/alpha/alpha-osf1.mh (XM_FILE): Change from xm-alpha.h to
xm-alphaosf.h.
* config/alpha/alpha-osf2.mh: Ditto.
* blockframe.c (find_pc_partial_function): Pass PC to
SIGTRAMP_START and SIGTRAMP_END macros for the benefit of systems
that detect sigtramp code via designated code sequences (as is the
case for Linux/Alpha, for example).
* config/i386/tm-i386bsd.h: Change SIGTRAMP_START and SIGTRAMP_END
to ignore new PC argument.
* config/m68k/tm-hp300bsd.h: Ditto.
* config/vax/tm-vax.h: Ditto.
* alpha-tdep.c (alpha_linux_sigtramp_offset): New function.
(alpha_osf_skip_sigtramp_frame): Ditto.
(push_sigtramp_desc): Ditto.
(alpha_find_saved_regs): Use SIGCONTEXT_ADDR macro to extract
sigcontext address from frame.
(alpha_saved_pc_after_call): When in sigtramp, use
alpha_frame_saved_pc() instead of read-register().
(after_prologue): When inside a dynamically generated sigtramp
function, there is no prologue, so return address of first
instruction.
(alpha_in_prologue): Fix typo in comment.
(find_proc_desc): Use macro DYNAMIC_SIGTRAMP_OFFSET to determine
whether we're inside a dynamicaly generated sigtramp function. If
so, create and push and appropriate procedure descriptor.
(alpha_frame_chain): Use macro FRAME_PAST_SIGTRAMP_FRAME to obtain
the frame past a sigtramp frame (if the current frame is indeed a
sigtramp function).
(init_extra_frame_info): Don't read next frame register off of
stack-pointer when inside a dynamiccaly generated sigtramp.
(alpha_pop_frame): Also unlink and destroy procedure descriptors
created for dynamically generated sigtramp functions.
* alpha-nat.c: When compiling under Linux, include <asm/reg.h> and
<alpha/ptrace.h> instead of <machine/reg.h>
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.
BROKEN_LARGE_ALLOCA. Do the cleanup before returning, rather than
leaving it on the chain. Reindent much of this function.
* config/sparc/{xm-sun4sol2.h,xm-sun4os4.h},
config/i386/{xm-sun386.h,xm-i386m3.h,xm-i386mach.h},
config/m68k/{sun3os4.h,xm-news.h,xm-hp300hpux.h},
config/ns32k/xm-ns32km3.h: Remove all references to
BROKEN_LARGE_ALLOCA; with the above change it is no longer needed.
* main.c, fork-child.c, many config files: Remove all
SET_STACK_LIMIT_HUGE code; with the above changes it should no
longer be needed.
* symtab.c (lookup_partial_symbol): Use if and abort, not assert.
This avoids __eprintf troubles.
* main.c (main): Surround in #ifndef MAIN_OVERRIDE. Move
initialization code which needs to be called even if we bypass the
command line stuff into gdb_init.
* utils.c (fputs_unfiltered): Surround in #ifndef
FPUTS_UNFILTERED_OVERRIDE.
* Makefile.in (libgdb.a): New target.
* utils.c: Rearrange I/O stuff a bit so that all output goes
through fputs_unfiltered. Use vasprintf; removes arbitrary limit
which made %s not work with arbitrarily large strings.
* printcmd.c (printf_command): Use printf_filtered, not
printf_unfiltered and printf, now that arbitrary limit is gone.
hppa-tdep.c (pa_print_fp_reg), infcmd.c (do_registers_info),
valops.c (value_assign): Use REGISTER_CONVERT_TO_* only if
REGISTER_CONVERTIBLE is defined, otherwise just copy the content.
Pass desired type to REGISTER_CONVERT_TO_*.
* config/m68k/tm-m68k.h, config/i960/tm-i960.h (REGISTER_CONVERT_*):
Pass length of desired type to store/extract_floating.
* config/i386/tm-arm.h, config/i386/tm-i386aix.h,
config/i386/tm-sun386.h, config/i386/tm-symmetry.h,
config/m88k/tm-m88k.h config/rs6000/tm-rs6000.h (REGISTER_CONVERT_*):
Use extract_floating and store_floating with length of desired type.
* config/m68k/tm-news.h (STORE,EXTRACT_RETURN_VALUE): Add type
parameter to REGISTER_CONVERT_*.
* config/a29k/tm-a29k.h, config/convex/tm-convex.h,
config/gould/tm-np1.h, config/gould/tm-pn.h, config/h8300/tm-h8300.h,
config/h8500/tm-h8500.h, config/i386/tm-i386v.h,
config/mips/tm-mips.h, config/ns32k/tm-merlin.h,
config/ns32k/tm-umax.h, config/pa/tm-hppa.h, config/pyr/tm-pyr.h,
config/sh/tm-sh.h, config/sparc/tm-sparc.h, config/tahoe/tm-tahoe.h,
config/vax/tm-vax.h, config/z8k/tm-z8k.h (REGISTER_CONVERTIBLE,
REGISTER_CONVERT_TO_RAW, REGISTER_CONVERT_TO_VIRTUAL): Remove
versions for which REGISTER_CONVERTIBLE is always false.
* z8k-tdep.c (register_convert_to_virtual, register_convert_to_raw):
Remove, no longer used.
* alpha-tdep.c (alpha_register_convert_to_raw,
alpha_register_convert_to_virtual): New routines to handle
the different raw formats in alpha floating point registers.
* config/alpha/tm-alpha.h (REGISTER_CONVERTIBLE,
REGISTER_CONVERT_TO_VIRTUAL, REGISTER_CONVERT_TO_RAW): Use them.
config/gould/tmp-{pn,np1}.h,
config/{sparc/tm-sparc.h,pyr/tm-pyr.h,vax/tm-vax.h}: Remove field
next_frame from struct frame_info. It has no purpose beyond
->next->frame and is an artifact from GDB 2.8.
config files moved to an appropriate config/<cpu> subdirectory.
* nm-*, xm-*, tm-*: All native, host, and target files, which
get linked to nm.h, xm.h, and tm.h respectively by configure,
moved to appropriate config/<cpu> subdirectory.