087b74b25b
* i386-nat.c (i386_stopped_data_address): Also check that hitted watch register is not vacant. gdb/testsuite ChangeLog entry: New test for two watchpoints, with disabling of the first inserted. * testsuite/gdb.base/watchpoints.c: New file. * testsuite/gdb.base/watchpoints.exp: New file.
33 lines
557 B
C
33 lines
557 B
C
#include <stdio.h>
|
|
#include <unistd.h>
|
|
/*
|
|
* This source is mainly to test
|
|
* what happens when a watchpoint is removed
|
|
* while another watchpoint, inserted later is
|
|
* left active.
|
|
*/
|
|
|
|
int count = -1;
|
|
int ival1 = -1;
|
|
int ival2 = -1;
|
|
int ival3 = -1;
|
|
int ival4 = -1;
|
|
|
|
int
|
|
main ()
|
|
{
|
|
#ifdef usestubs
|
|
set_debug_traps();
|
|
breakpoint();
|
|
#endif
|
|
|
|
for (count = 0; count < 4; count++) {
|
|
ival1 = count; ival2 = count;
|
|
ival3 = count; ival4 = count;
|
|
}
|
|
|
|
ival1 = count; ival2 = count; /* Outside loop */
|
|
ival3 = count; ival4 = count;
|
|
|
|
return 0;
|
|
}
|