Commit Graph

60 Commits

Author SHA1 Message Date
Jim Kingdon 16726dd15b The point of these changes is to avoid reading the frame pointer
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.
1994-10-08 03:41:21 +00:00
Steve Chamberlain c4deed18c0 Thu Sep 8 17:14:43 1994 Steve Chamberlain (sac@jonny.cygnus.com)
* remote.c (fromhex): Make error more explicit.
	(read_frame): Don't print bad checksum information unless
	remote_debugging.  Don't use repeat count unless it's > 0.
	* remote-e7000.c (expect): When echoing, ignore multiple newlines.
	(e7000_insert_breakpoint, e7000_remove_breakpoint, target_ops): Optionally
	cope with BC style breakpoints.
	(e7000_command):  After command send directly to the E7000 mark
	registers as changed.
	(why_stop, e7000_wait: Understand BC style stop condition.
	* sh-tdep.c (sh_skip_prologue):  Understand more complicated
	sequences.  (frame_find_saved_regs): Likewise.
	* config/h8500/tm-h8500.h (target_write_pc, TARGET_WRITE_PC):
	Handle extra arg.
	* config/i386/xm-go32.h (GDBINIT_FILENAME): Set to gdb.ini.
	(more work here to come)
	* config/sh/tm-sh.h (EXTRA_FRAME_INFO): Add f_offset and leaf_function
	fields.
1994-09-09 00:35:09 +00:00
Steve Chamberlain edd01519b9 Fri Feb 4 15:53:18 1994 Steve Chamberlain (sac@cygnus.com)
* h8500-tdep.c (saved_pc_after_call): The size of the
	pc is memory model dependent. (segmented_command,
	unsegmented_command, _initialize_h8500_tdep): New commands to
	change memory model.
	* remote-7000.c (initialize_remote_e7000): Change name of snoop
	command.
	* remote-hms.c (hms_load): Remove breakpoints when loaded.
	(hms_wait): Use new status structure
	(hms_open): Push the target here. (hms_before_main_loop): Not
	here.  (supply_val, hms_fetch_register, hms_store_register):  Cope
	with H8/500 names too.
	* sh-tdep.c (show_regs, initialize_sh_tdep): New command to print
	all registers in a compact way.
1994-02-05 00:22:08 +00:00
Steve Chamberlain 1b68cb4fb3 How many times do I have to do this... 1993-11-15 23:49:21 +00:00
Thomas Lord 199b2450f6 Change the stream argument to _filtered to GDB_FILE *.
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.
1993-11-01 22:25:23 +00:00
Jim Kingdon 976bb0be03 * Makefile.in (init.c): Generate using the source, not munch. This
cleans up all kinds of hassles (which nm to use in munch, etc).  The
	new formatting conventions (mostly already followed) are that
	the name of the _initialize_* routines must start in column zero,
	and must not be inside #if.
	* munch: Removed.
	* Makefile.in: Remove references to munch.
	* serial.c, remote.c, infptrace.c, maint.c, convex-tdep.c,
	alpha-tdep.c, hp300ux-nat.c, hppab-nat.c, osfsolib.c, remote-es.c,
	procfs.c, remote-udi.c, ser-go32.c, ultra3-xdep.c, sh-tdep.c,
	i960-tdep.c, hppa-tdep.c, h8500-tdep.c, dpx2-nat.c, delta68-nat.c,
	z8k-tdep.c: Make sure the above conventions are followed.  Make
	sure they are all declared as returning void.  Clean up
	miscellaneous comments and such.
1993-10-22 05:55:58 +00:00
Jim Kingdon c853c90d12 * sh-tdep.c (sim_load): Add function. 1993-10-22 00:53:32 +00:00
Steve Chamberlain 7ccb1e4401 * configure.in (alpha-*-osf*), config/alpha/alpha-osf.mh: New
host.
	* sh-tdep.c (frame_find_saved_regs): Use NUM_REGS rather than hard
	wired (and wrong) constant.
	* values.c (unpack_long): Add case to unpack when target object is
	sizeof(int).
	* config/sh/tm-sh.h (REGISTER_NAMES): Know about the news ones the
	simulator defines.
1993-06-17 22:16:07 +00:00
Steve Chamberlain df14b38baf * coffread.c (init_stringtab): Fix bug where sizeof(long) != 4.
* gdbcore.h, core.c (read_memory_unsigned_integer): New function.
	* findvar.c (read_register, write_register): Fix thinko where
	sizeof(host long) != sizeof(target int).
	* h8300-tdep.c: Use new read_memory_unsigned_integer call.
	* sh-tdep.c (_initialize_sh_tdep): Add memory_size command.
1993-06-09 00:47:13 +00:00
Steve Chamberlain 9faacb925f Support for Hitachi SH 1993-04-27 01:17:32 +00:00