+Wed Aug 10 13:23:47 1994 Rick Sladkey (jrs@world.std.com)
+
+ * i386v-nat.c (i386_insert_nonaligned_watchpoint):
+ add additional argument specifying raw address to permit
+ proper release of debug registers.
+ (i386_insert_watchpoint, i386_insert_aligned_watchpoint):
+ change all callers.
+
Wed Aug 10 16:13:45 1994 Stu Grossman (grossman@cygnus.com)
* defs.h, top.c: Use `extern' in declarations of GUI hooks, and
static CORE_ADDR address_lookup[DR_LASTADDR - DR_FIRSTADDR + 1];
static int
-i386_insert_nonaligned_watchpoint PARAMS ((int, CORE_ADDR, int, int));
+i386_insert_nonaligned_watchpoint PARAMS ((int, CORE_ADDR, CORE_ADDR, int,
+ int));
+
+static int
+i386_insert_aligned_watchpoint PARAMS ((pid, addr, len, rw));
/* Insert a watchpoint. */
int len;
int rw;
{
+ return i386_insert_aligned_watchpoint (pid, addr, addr, len, rw);
+}
+
+static int
+i386_insert_aligned_watchpoint (pid, waddr, addr, len, rw)
+ int pid;
+ CORE_ADDR waddr;
+ CORE_ADDR addr;
+ int len;
+ int rw;
+{
int i;
int read_write_bits, len_bits;
int free_debug_register;
else if (len == 2)
{
if (addr % 2)
- return i386_insert_nonaligned_watchpoint (pid, addr, len, rw);
+ return i386_insert_nonaligned_watchpoint (pid, waddr, addr, len, rw);
len_bits = DR_LEN_2;
}
else if (len == 4)
{
if (addr % 4)
- return i386_insert_nonaligned_watchpoint (pid, addr, len, rw);
+ return i386_insert_nonaligned_watchpoint (pid, waddr, addr, len, rw);
len_bits = DR_LEN_4;
}
else
- return i386_insert_nonaligned_watchpoint (pid, addr, len, rw);
+ return i386_insert_nonaligned_watchpoint (pid, waddr, addr, len, rw);
free_debug_register = i;
register_number = free_debug_register - DR_FIRSTADDR;
}
static int
-i386_insert_nonaligned_watchpoint (pid, addr, len, rw)
- int pid;
- CORE_ADDR addr;
- int len;
- int rw;
+i386_insert_nonaligned_watchpoint (pid, waddr, addr, len, rw)
+ int pid;
+ CORE_ADDR waddr;
+ CORE_ADDR addr;
+ int len;
+ int rw;
{
int align;
int size;
size = (len > 4) ? 3 : len - 1;
size = size_try_array[size * 4 + align];
- rv = i386_insert_watchpoint (pid, addr, size, rw);
+ rv = i386_insert_watchpoint (pid, waddr, addr, size, rw);
if (rv)
{
- i386_remove_watchpoint (pid, addr, size);
+ i386_remove_watchpoint (pid, waddr, size);
return rv;
}
addr += size;