* linux-low.h (struct lwp_info): New fields

`stopped_by_watchpoint' and `stopped_data_address'.
	* linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
	here, and cache them in the lwp object.
	(wait_for_sigstop): Check stopped_by_watchpoint lwp field
	directly.
	(linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
	field.
	(linux_stopped_by_watchpoint): Rewrite.
	(linux_stopped_data_address): Rewrite.
This commit is contained in:
Pedro Alves 2010-03-14 18:46:40 +00:00
parent 51f4c0b08e
commit c3adc08c6f
3 changed files with 76 additions and 9 deletions

View file

@ -161,6 +161,16 @@ struct lwp_info
int pending_is_breakpoint;
CORE_ADDR pending_stop_pc;
/* STOPPED_BY_WATCHPOINT is non-zero if this LWP stopped with a data
watchpoint trap. */
int stopped_by_watchpoint;
/* On architectures where it is possible to know the data address of
a triggered watchpoint, STOPPED_DATA_ADDRESS is non-zero, and
contains such data address. Only valid if STOPPED_BY_WATCHPOINT
is true. */
CORE_ADDR stopped_data_address;
/* If this is non-zero, it is a breakpoint to be reinserted at our next
stop (SIGTRAP stops only). */
CORE_ADDR bp_reinsert;