* infrun.c (wait_for_inferior): Mark registers as invalid when

stepping over an instruction that triggered a watchpoint.
	* remote-mips.c: Numerous changes to support hardware breakpoints
	and watchpoints on LSI MiniRISC and TinyRISC boards.
	* mips-tdep.c: Move MIPS16-related macros to config/mips/tm-mips.h.
	(mips_breakpoint_from_pc): Account for different breakpoint
	instructions used by PMON and IDT monitor.
	* config/mips/tm-embed.h: Enable hardware breakpoints on embedded
	MIPS targets.
	* config/mips/tm-mips.h: Define breakpoint instructions for
	PMON and IDT monitor.  Move MIPS16-related macros here from
	mips-tdep.c.
This commit is contained in:
Mark Alexander
1997-06-17 02:11:42 +00:00
parent 77f3ac77b5
commit f781fe93a6
5 changed files with 862 additions and 446 deletions

View File

@@ -23,6 +23,27 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#undef DEFAULT_MIPS_TYPE
#define DEFAULT_MIPS_TYPE "r3051"
/* Watchpoint support */
#define TARGET_HAS_HARDWARE_WATCHPOINTS
/* Use these macros for watchpoint insertion/deletion. */
/* type can be 0: write watch, 1: read watch, 2: access watch (read/write) */
#define target_insert_watchpoint(addr, len, type) \
remote_mips_set_watchpoint (addr, len, type)
int remote_mips_set_watchpoint PARAMS ((CORE_ADDR addr, int len, int type));
#define target_remove_watchpoint(addr, len, type) \
remote_mips_remove_watchpoint (addr, len, type)
int remote_mips_remove_watchpoint PARAMS ((CORE_ADDR addr, int len, int type));
/* We need to remove watchpoints when stepping, else we hit them again! */
#define HAVE_NONSTEPPABLE_WATCHPOINT
#define STOPPED_BY_WATCHPOINT(w) remote_mips_stopped_by_watchpoint ()
/* start-sanitize-gm */
#ifdef GENERAL_MAGIC
@@ -32,29 +53,18 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#undef GET_LONGJMP_TARGET
/* Watchpoint support */
#define TARGET_HAS_HARDWARE_WATCHPOINTS
#define TARGET_CAN_USE_HARDWARE_WATCHPOINT(type, cnt, ot) \
(1 == 1) /* We allow all types of hardware watchpoints */
/* Use these macros for watchpoint insertion/deletion. */
/* type can be 0: write watch, 1: read watch, 2: access watch (read/write) */
#define target_insert_watchpoint(addr, len, type) \
remote_mips_set_watchpoint (addr, len, type)
#define target_remove_watchpoint(addr, len, type) \
remote_mips_remove_watchpoint (addr, len, type)
/* We need to remove watchpoints when stepping, else we hit them again! */
#define HAVE_NONSTEPPABLE_WATCHPOINT
#define STOPPED_BY_WATCHPOINT(w) remote_mips_stopped_by_watchpoint ()
#define FLUSH_CACHED_MEMORY() flush_cached_memory()
#else
/* end-sanitize-gm */
#define TARGET_CAN_USE_HARDWARE_WATCHPOINT(type, cnt, ot) \
remote_mips_can_use_hardware_watchpoint(cnt)
int remote_mips_can_use_hardware_watchpoint PARAMS ((int cnt));
/* start-sanitize-gm */
#endif /* GENERAL_MAGIC */
/* end-sanitize-gm */