|
|
e1d87d |
http://sourceware.org/ml/gdb-patches/2012-09/msg00629.html
|
|
|
e1d87d |
Subject: [PATCH 3/4] Expand watchpoint lengths to LONGEST
|
|
|
e1d87d |
|
|
|
e1d87d |
|
|
|
e1d87d |
--MP_/6HRlH6vpyqtSy4CYyMrX6b2
|
|
|
e1d87d |
Content-Type: text/plain; charset=US-ASCII
|
|
|
e1d87d |
Content-Transfer-Encoding: 7bit
|
|
|
e1d87d |
Content-Disposition: inline
|
|
|
e1d87d |
|
|
|
e1d87d |
Hi,
|
|
|
e1d87d |
|
|
|
e1d87d |
This is part three of the bitpos expansion change. Some architectures
|
|
|
e1d87d |
allow arbitrary length watchpoints and combined with the fact that type
|
|
|
e1d87d |
lengths could be large enough, we need LONGEST for watchpoint lengths.
|
|
|
e1d87d |
It is architecture dependent however, whether the LONGEST is needed or
|
|
|
e1d87d |
not. This patch updates the signatures of watchpoint insertion and
|
|
|
e1d87d |
removal functions of all architectures (to comply with the function
|
|
|
e1d87d |
signatures in the callback struct), but expands types only in
|
|
|
e1d87d |
architectures that need it. Tested on Fedora 16 x86_64.
|
|
|
e1d87d |
|
|
|
e1d87d |
Regards,
|
|
|
e1d87d |
Siddhesh
|
|
|
e1d87d |
--MP_/6HRlH6vpyqtSy4CYyMrX6b2
|
|
|
e1d87d |
Content-Type: text/plain
|
|
|
e1d87d |
Content-Transfer-Encoding: quoted-printable
|
|
|
e1d87d |
Content-Disposition: attachment; filename=ChangeLog-wp
|
|
|
e1d87d |
|
|
|
e1d87d |
gdb/ChangeLog:
|
|
|
e1d87d |
|
|
|
e1d87d |
* arm-linux-nat.c (arm_linux_insert_watchpoint): Expand
|
|
|
e1d87d |
parameter LEN to LONGEST.
|
|
|
e1d87d |
(arm_linux_remove_watchpoint): Likewise.
|
|
|
e1d87d |
(arm_linux_watchpoint_addr_within_range): Expand parameter
|
|
|
e1d87d |
LENGTH to LONGEST.
|
|
|
e1d87d |
* i386-nat.c (i386_insert_watchpoint): Expand parameter LEN to
|
|
|
e1d87d |
LONGEST.
|
|
|
e1d87d |
(i386_remove_watchpoint): Likewise.
|
|
|
e1d87d |
* ia64-linux-nat.c (ia64_linux_insert_watchpoint): Likewise.
|
|
|
e1d87d |
(ia64_linux_remove_watchpoint): Likewise.
|
|
|
e1d87d |
* inf-ttrace.c (inf_ttrace_insert_watchpoint): Likewise.
|
|
|
e1d87d |
Expand NUM_PAGES, PAGE to LONGEST.
|
|
|
e1d87d |
(inf_ttrace_remove_watchpoint): Likewise.
|
|
|
e1d87d |
* mips-linux-nat.c (mips_linux_insert_watchpoint): Expand
|
|
|
e1d87d |
parameter LEN to LONGEST.
|
|
|
e1d87d |
(mips_linux_remove_watchpoint): Likewise.
|
|
|
e1d87d |
* nto-procfs.c (procfs_remove_hw_watchpoint): Likewise.
|
|
|
e1d87d |
(procfs_insert_hw_watchpoint): Likewise.
|
|
|
e1d87d |
* ppc-linux-nat.c (calculate_dvc): Likewise. Expand I,
|
|
|
e1d87d |
NUM_BYTE_ENABLE to LONGEST.
|
|
|
e1d87d |
(check_condition): Expand parameter LEN to point to LONGEST.
|
|
|
e1d87d |
(ppc_linux_can_accel_watchpoint_condition): Expand parameter
|
|
|
e1d87d |
LEN to LONGEST.
|
|
|
e1d87d |
(create_watchpoint_request): Likewise.
|
|
|
e1d87d |
(ppc_linux_insert_watchpoint): Likewise.
|
|
|
e1d87d |
(ppc_linux_remove_watchpoint): Likewise.
|
|
|
e1d87d |
(ppc_linux_watchpoint_addr_within_range): Expand parameter
|
|
|
e1d87d |
LENGTH to LONGEST.
|
|
|
e1d87d |
* procfs.c (proc_set_watchpoint): Expand parameter LEN to
|
|
|
e1d87d |
LONGEST.
|
|
|
e1d87d |
(procfs_set_watchpoint): Likewise.
|
|
|
e1d87d |
(procfs_insert_watchpoint): Likewise.
|
|
|
e1d87d |
(procfs_remove_watchpoint): Likewise.
|
|
|
e1d87d |
* remote-m32r-sdi.c (m32r_insert_watchpoint): Likewise. Use
|
|
|
e1d87d |
plongest to format print LEN.
|
|
|
e1d87d |
(m32r_remove_watchpoint): Likewise.
|
|
|
e1d87d |
* remote-mips.c (mips_insert_watchpoint): Expand parameter LEN
|
|
|
e1d87d |
to LONGEST.
|
|
|
e1d87d |
(mips_remove_watchpoint): Likewise.
|
|
|
e1d87d |
* remote.c (remote_insert_watchpoint): Likewise.
|
|
|
e1d87d |
Use phex_nz to format print LEN.
|
|
|
e1d87d |
(remote_remove_watchpoint): Likewise.
|
|
|
e1d87d |
(remote_watchpoint_addr_within_range): Expand parameter LENGTH
|
|
|
e1d87d |
to LONGEST.
|
|
|
e1d87d |
* s390-linux-nat.c (s390_insert_watchpoint): Expand parameter LEN to
|
|
|
e1d87d |
LONGEST.
|
|
|
e1d87d |
(s390_remove_watchpoint): Likewise.
|
|
|
e1d87d |
* target.c (update_current_target): Expand parameter LEN for
|
|
|
e1d87d |
callbacks to TO_INSERT_WATCHPOINT, TO_REMOVE_WATCHPOINT,
|
|
|
e1d87d |
TO_CAN_ACCEL_WATCHPOINT_CONDITION, to LONGEST.
|
|
|
e1d87d |
(default_watchpoint_addr_within_range): Expand parameter
|
|
|
e1d87d |
LENGTH to LONGEST.
|
|
|
e1d87d |
(debug_to_can_accel_watchpoint_condition): Expand parameter LEN
|
|
|
e1d87d |
to LONGEST. Use plongest to format print LEN.
|
|
|
e1d87d |
(debug_to_watchpoint_addr_within_range): Expand parameter LENGTH
|
|
|
e1d87d |
to LONGEST. Use plongest to format print LENGTH.
|
|
|
e1d87d |
(debug_to_insert_watchpoint): Expand parameter LEN to LONGEST.
|
|
|
e1d87d |
Use plongest to format print LEN.
|
|
|
e1d87d |
(debug_to_remove_watchpoint): Likewise.
|
|
|
e1d87d |
* target.h (struct target_ops): Expand parameter LEN of
|
|
|
e1d87d |
TO_REMOVE_WATCHPOINT, TO_INSERT_WATCHPOINT,
|
|
|
e1d87d |
TO_WATCHPOINT_ADDR_WITHIN_RANGE and
|
|
|
e1d87d |
TO_CAN_ACCEL_WATCHPOINT_CONDITION to LONGEST.
|
|
|
e1d87d |
|
|
|
e1d87d |
--MP_/6HRlH6vpyqtSy4CYyMrX6b2
|
|
|
e1d87d |
Content-Type: text/x-patch
|
|
|
e1d87d |
Content-Transfer-Encoding: 7bit
|
|
|
e1d87d |
Content-Disposition: attachment; filename=bitpos-wp.patch
|
|
|
e1d87d |
|
|
|
e1d87d |
Index: gdb-7.10.50.20151027/gdb/arm-linux-nat.c
|
|
|
e1d87d |
===================================================================
|
|
|
e1d87d |
--- gdb-7.10.50.20151027.orig/gdb/arm-linux-nat.c 2015-11-08 10:36:33.050071812 +0100
|
|
|
e1d87d |
+++ gdb-7.10.50.20151027/gdb/arm-linux-nat.c 2015-11-08 10:36:33.094072110 +0100
|
|
|
e1d87d |
@@ -1209,7 +1209,7 @@ arm_linux_stopped_by_watchpoint (struct
|
|
|
e1d87d |
static int
|
|
|
e1d87d |
arm_linux_watchpoint_addr_within_range (struct target_ops *target,
|
|
|
e1d87d |
CORE_ADDR addr,
|
|
|
e1d87d |
- CORE_ADDR start, int length)
|
|
|
e1d87d |
+ CORE_ADDR start, LONGEST length)
|
|
|
e1d87d |
{
|
|
|
e1d87d |
return start <= addr && start + length - 1 >= addr;
|
|
|
e1d87d |
}
|
|
|
e1d87d |
Index: gdb-7.10.50.20151027/gdb/ppc-linux-nat.c
|
|
|
e1d87d |
===================================================================
|
|
|
e1d87d |
--- gdb-7.10.50.20151027.orig/gdb/ppc-linux-nat.c 2015-11-08 10:36:33.064071907 +0100
|
|
|
e1d87d |
+++ gdb-7.10.50.20151027/gdb/ppc-linux-nat.c 2015-11-08 10:36:33.095072117 +0100
|
|
|
e1d87d |
@@ -1807,11 +1807,11 @@ can_use_watchpoint_cond_accel (void)
|
|
|
e1d87d |
CONDITION_VALUE will hold the value which should be put in the
|
|
|
e1d87d |
DVC register. */
|
|
|
e1d87d |
static void
|
|
|
e1d87d |
-calculate_dvc (CORE_ADDR addr, int len, CORE_ADDR data_value,
|
|
|
e1d87d |
+calculate_dvc (CORE_ADDR addr, LONGEST len, CORE_ADDR data_value,
|
|
|
e1d87d |
uint32_t *condition_mode, uint64_t *condition_value)
|
|
|
e1d87d |
{
|
|
|
e1d87d |
- int i, num_byte_enable, align_offset, num_bytes_off_dvc,
|
|
|
e1d87d |
- rightmost_enabled_byte;
|
|
|
e1d87d |
+ LONGEST i, num_byte_enable;
|
|
|
e1d87d |
+ int align_offset, num_bytes_off_dvc, rightmost_enabled_byte;
|
|
|
e1d87d |
CORE_ADDR addr_end_data, addr_end_dvc;
|
|
|
e1d87d |
|
|
|
e1d87d |
/* The DVC register compares bytes within fixed-length windows which
|
|
|
e1d87d |
@@ -1898,7 +1898,7 @@ num_memory_accesses (struct value *v)
|
|
|
e1d87d |
of the constant. */
|
|
|
e1d87d |
static int
|
|
|
e1d87d |
check_condition (CORE_ADDR watch_addr, struct expression *cond,
|
|
|
e1d87d |
- CORE_ADDR *data_value, int *len)
|
|
|
e1d87d |
+ CORE_ADDR *data_value, LONGEST *len)
|
|
|
e1d87d |
{
|
|
|
e1d87d |
int pc = 1, num_accesses_left, num_accesses_right;
|
|
|
e1d87d |
struct value *left_val, *right_val, *left_chain, *right_chain;
|
|
|
e1d87d |
@@ -1966,7 +1966,7 @@ check_condition (CORE_ADDR watch_addr, s
|
|
|
e1d87d |
true. */
|
|
|
e1d87d |
static int
|
|
|
e1d87d |
ppc_linux_can_accel_watchpoint_condition (struct target_ops *self,
|
|
|
e1d87d |
- CORE_ADDR addr, int len, int rw,
|
|
|
e1d87d |
+ CORE_ADDR addr, LONGEST len, int rw,
|
|
|
e1d87d |
struct expression *cond)
|
|
|
e1d87d |
{
|
|
|
e1d87d |
CORE_ADDR data_value;
|
|
|
e1d87d |
@@ -1983,7 +1983,7 @@ ppc_linux_can_accel_watchpoint_condition
|
|
|
e1d87d |
|
|
|
e1d87d |
static void
|
|
|
e1d87d |
create_watchpoint_request (struct ppc_hw_breakpoint *p, CORE_ADDR addr,
|
|
|
e1d87d |
- int len, enum target_hw_bp_type type,
|
|
|
e1d87d |
+ LONGEST len, enum target_hw_bp_type type,
|
|
|
e1d87d |
struct expression *cond, int insert)
|
|
|
e1d87d |
{
|
|
|
e1d87d |
if (len == 1
|
|
|
e1d87d |
@@ -2249,7 +2249,7 @@ ppc_linux_stopped_by_watchpoint (struct
|
|
|
e1d87d |
static int
|
|
|
e1d87d |
ppc_linux_watchpoint_addr_within_range (struct target_ops *target,
|
|
|
e1d87d |
CORE_ADDR addr,
|
|
|
e1d87d |
- CORE_ADDR start, int length)
|
|
|
e1d87d |
+ CORE_ADDR start, LONGEST length)
|
|
|
e1d87d |
{
|
|
|
e1d87d |
int mask;
|
|
|
e1d87d |
|
|
|
e1d87d |
Index: gdb-7.10.50.20151027/gdb/procfs.c
|
|
|
e1d87d |
===================================================================
|
|
|
e1d87d |
--- gdb-7.10.50.20151027.orig/gdb/procfs.c 2015-11-08 10:36:33.065071913 +0100
|
|
|
e1d87d |
+++ gdb-7.10.50.20151027/gdb/procfs.c 2015-11-08 10:36:33.096072123 +0100
|
|
|
e1d87d |
@@ -2427,7 +2427,7 @@ procfs_address_to_host_pointer (CORE_ADD
|
|
|
e1d87d |
#endif
|
|
|
e1d87d |
|
|
|
e1d87d |
static int
|
|
|
e1d87d |
-proc_set_watchpoint (procinfo *pi, CORE_ADDR addr, int len, int wflags)
|
|
|
e1d87d |
+proc_set_watchpoint (procinfo *pi, CORE_ADDR addr, LONGEST len, int wflags)
|
|
|
e1d87d |
{
|
|
|
e1d87d |
#if !defined (PCWATCH) && !defined (PIOCSWATCH)
|
|
|
e1d87d |
/* If neither or these is defined, we can't support watchpoints.
|
|
|
e1d87d |
@@ -4706,7 +4706,7 @@ procfs_pid_to_str (struct target_ops *op
|
|
|
e1d87d |
/* Insert a watchpoint. */
|
|
|
e1d87d |
|
|
|
e1d87d |
static int
|
|
|
e1d87d |
-procfs_set_watchpoint (ptid_t ptid, CORE_ADDR addr, int len, int rwflag,
|
|
|
e1d87d |
+procfs_set_watchpoint (ptid_t ptid, CORE_ADDR addr, LONGEST len, int rwflag,
|
|
|
e1d87d |
int after)
|
|
|
e1d87d |
{
|
|
|
e1d87d |
#ifndef AIX5
|
|
|
e1d87d |
Index: gdb-7.10.50.20151027/gdb/remote.c
|
|
|
e1d87d |
===================================================================
|
|
|
e1d87d |
--- gdb-7.10.50.20151027.orig/gdb/remote.c 2015-11-08 10:36:33.067071927 +0100
|
|
|
e1d87d |
+++ gdb-7.10.50.20151027/gdb/remote.c 2015-11-08 10:36:33.097072130 +0100
|
|
|
e1d87d |
@@ -9085,7 +9085,7 @@ remote_insert_watchpoint (struct target_
|
|
|
e1d87d |
p = strchr (rs->buf, '\0');
|
|
|
e1d87d |
addr = remote_address_masked (addr);
|
|
|
e1d87d |
p += hexnumstr (p, (ULONGEST) addr);
|
|
|
e1d87d |
- xsnprintf (p, endbuf - p, ",%x", len);
|
|
|
e1d87d |
+ xsnprintf (p, endbuf - p, ",%s", phex_nz (len, sizeof (len)));
|
|
|
e1d87d |
|
|
|
e1d87d |
putpkt (rs->buf);
|
|
|
e1d87d |
getpkt (&rs->buf, &rs->buf_size, 0);
|
|
|
e1d87d |
@@ -9105,7 +9105,7 @@ remote_insert_watchpoint (struct target_
|
|
|
e1d87d |
|
|
|
e1d87d |
static int
|
|
|
e1d87d |
remote_watchpoint_addr_within_range (struct target_ops *target, CORE_ADDR addr,
|
|
|
e1d87d |
- CORE_ADDR start, int length)
|
|
|
e1d87d |
+ CORE_ADDR start, LONGEST length)
|
|
|
e1d87d |
{
|
|
|
e1d87d |
CORE_ADDR diff = remote_address_masked (addr - start);
|
|
|
e1d87d |
|
|
|
e1d87d |
@@ -9134,7 +9134,7 @@ remote_remove_watchpoint (struct target_
|
|
|
e1d87d |
p = strchr (rs->buf, '\0');
|
|
|
e1d87d |
addr = remote_address_masked (addr);
|
|
|
e1d87d |
p += hexnumstr (p, (ULONGEST) addr);
|
|
|
e1d87d |
- xsnprintf (p, endbuf - p, ",%x", len);
|
|
|
e1d87d |
+ xsnprintf (p, endbuf - p, ",%s", phex_nz (len, sizeof (len)));
|
|
|
e1d87d |
putpkt (rs->buf);
|
|
|
e1d87d |
getpkt (&rs->buf, &rs->buf_size, 0);
|
|
|
e1d87d |
|
|
|
e1d87d |
Index: gdb-7.10.50.20151027/gdb/target.c
|
|
|
e1d87d |
===================================================================
|
|
|
e1d87d |
--- gdb-7.10.50.20151027.orig/gdb/target.c 2015-11-08 10:36:33.069071941 +0100
|
|
|
e1d87d |
+++ gdb-7.10.50.20151027/gdb/target.c 2015-11-08 10:36:33.098072137 +0100
|
|
|
e1d87d |
@@ -51,7 +51,7 @@ static void generic_tls_error (void) ATT
|
|
|
e1d87d |
static void default_terminal_info (struct target_ops *, const char *, int);
|
|
|
e1d87d |
|
|
|
e1d87d |
static int default_watchpoint_addr_within_range (struct target_ops *,
|
|
|
e1d87d |
- CORE_ADDR, CORE_ADDR, int);
|
|
|
e1d87d |
+ CORE_ADDR, CORE_ADDR, LONGEST);
|
|
|
e1d87d |
|
|
|
e1d87d |
static int default_region_ok_for_hw_watchpoint (struct target_ops *,
|
|
|
e1d87d |
CORE_ADDR, LONGEST);
|
|
|
e1d87d |
@@ -3140,7 +3140,7 @@ default_region_ok_for_hw_watchpoint (str
|
|
|
e1d87d |
static int
|
|
|
e1d87d |
default_watchpoint_addr_within_range (struct target_ops *target,
|
|
|
e1d87d |
CORE_ADDR addr,
|
|
|
e1d87d |
- CORE_ADDR start, int length)
|
|
|
e1d87d |
+ CORE_ADDR start, LONGEST length)
|
|
|
e1d87d |
{
|
|
|
e1d87d |
return addr >= start && addr < start + length;
|
|
|
e1d87d |
}
|
|
|
e1d87d |
Index: gdb-7.10.50.20151027/gdb/target.h
|
|
|
e1d87d |
===================================================================
|
|
|
e1d87d |
--- gdb-7.10.50.20151027.orig/gdb/target.h 2015-11-08 10:36:33.069071941 +0100
|
|
|
e1d87d |
+++ gdb-7.10.50.20151027/gdb/target.h 2015-11-08 10:36:33.098072137 +0100
|
|
|
e1d87d |
@@ -543,7 +543,7 @@ struct target_ops
|
|
|
e1d87d |
int (*to_stopped_data_address) (struct target_ops *, CORE_ADDR *)
|
|
|
e1d87d |
TARGET_DEFAULT_RETURN (0);
|
|
|
e1d87d |
int (*to_watchpoint_addr_within_range) (struct target_ops *,
|
|
|
e1d87d |
- CORE_ADDR, CORE_ADDR, int)
|
|
|
e1d87d |
+ CORE_ADDR, CORE_ADDR, LONGEST)
|
|
|
e1d87d |
TARGET_DEFAULT_FUNC (default_watchpoint_addr_within_range);
|
|
|
e1d87d |
|
|
|
e1d87d |
/* Documentation of this routine is provided with the corresponding
|
|
|
e1d87d |
@@ -553,7 +553,7 @@ struct target_ops
|
|
|
e1d87d |
TARGET_DEFAULT_FUNC (default_region_ok_for_hw_watchpoint);
|
|
|
e1d87d |
|
|
|
e1d87d |
int (*to_can_accel_watchpoint_condition) (struct target_ops *,
|
|
|
e1d87d |
- CORE_ADDR, int, int,
|
|
|
e1d87d |
+ CORE_ADDR, LONGEST, int,
|
|
|
e1d87d |
struct expression *)
|
|
|
e1d87d |
TARGET_DEFAULT_RETURN (0);
|
|
|
e1d87d |
int (*to_masked_watch_num_registers) (struct target_ops *,
|
|
|
e1d87d |
Index: gdb-7.10.50.20151027/gdb/aarch64-linux-nat.c
|
|
|
e1d87d |
===================================================================
|
|
|
e1d87d |
--- gdb-7.10.50.20151027.orig/gdb/aarch64-linux-nat.c 2015-11-08 10:36:33.074071975 +0100
|
|
|
e1d87d |
+++ gdb-7.10.50.20151027/gdb/aarch64-linux-nat.c 2015-11-08 10:36:33.098072137 +0100
|
|
|
e1d87d |
@@ -795,7 +795,7 @@ aarch64_linux_stopped_by_watchpoint (str
|
|
|
e1d87d |
static int
|
|
|
e1d87d |
aarch64_linux_watchpoint_addr_within_range (struct target_ops *target,
|
|
|
e1d87d |
CORE_ADDR addr,
|
|
|
e1d87d |
- CORE_ADDR start, int length)
|
|
|
e1d87d |
+ CORE_ADDR start, LONGEST length)
|
|
|
e1d87d |
{
|
|
|
e1d87d |
return start <= addr && start + length - 1 >= addr;
|
|
|
e1d87d |
}
|
|
|
e1d87d |
Index: gdb-7.10.50.20151027/gdb/target-delegates.c
|
|
|
e1d87d |
===================================================================
|
|
|
e1d87d |
--- gdb-7.10.50.20151027.orig/gdb/target-delegates.c 2015-11-08 10:36:33.073071968 +0100
|
|
|
e1d87d |
+++ gdb-7.10.50.20151027/gdb/target-delegates.c 2015-11-08 10:36:33.099072144 +0100
|
|
|
e1d87d |
@@ -709,14 +709,14 @@ debug_stopped_data_address (struct targe
|
|
|
e1d87d |
}
|
|
|
e1d87d |
|
|
|
e1d87d |
static int
|
|
|
e1d87d |
-delegate_watchpoint_addr_within_range (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR arg2, int arg3)
|
|
|
e1d87d |
+delegate_watchpoint_addr_within_range (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR arg2, LONGEST arg3)
|
|
|
e1d87d |
{
|
|
|
e1d87d |
self = self->beneath;
|
|
|
e1d87d |
return self->to_watchpoint_addr_within_range (self, arg1, arg2, arg3);
|
|
|
e1d87d |
}
|
|
|
e1d87d |
|
|
|
e1d87d |
static int
|
|
|
e1d87d |
-debug_watchpoint_addr_within_range (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR arg2, int arg3)
|
|
|
e1d87d |
+debug_watchpoint_addr_within_range (struct target_ops *self, CORE_ADDR arg1, CORE_ADDR arg2, LONGEST arg3)
|
|
|
e1d87d |
{
|
|
|
e1d87d |
int result;
|
|
|
e1d87d |
fprintf_unfiltered (gdb_stdlog, "-> %s->to_watchpoint_addr_within_range (...)\n", debug_target.to_shortname);
|
|
|
e1d87d |
@@ -728,7 +728,7 @@ debug_watchpoint_addr_within_range (stru
|
|
|
e1d87d |
fputs_unfiltered (", ", gdb_stdlog);
|
|
|
e1d87d |
target_debug_print_CORE_ADDR (arg2);
|
|
|
e1d87d |
fputs_unfiltered (", ", gdb_stdlog);
|
|
|
e1d87d |
- target_debug_print_int (arg3);
|
|
|
e1d87d |
+ target_debug_print_LONGEST (arg3);
|
|
|
e1d87d |
fputs_unfiltered (") = ", gdb_stdlog);
|
|
|
e1d87d |
target_debug_print_int (result);
|
|
|
e1d87d |
fputs_unfiltered ("\n", gdb_stdlog);
|
|
|
e1d87d |
@@ -761,20 +761,20 @@ debug_region_ok_for_hw_watchpoint (struc
|
|
|
e1d87d |
}
|
|
|
e1d87d |
|
|
|
e1d87d |
static int
|
|
|
e1d87d |
-delegate_can_accel_watchpoint_condition (struct target_ops *self, CORE_ADDR arg1, int arg2, int arg3, struct expression *arg4)
|
|
|
e1d87d |
+delegate_can_accel_watchpoint_condition (struct target_ops *self, CORE_ADDR arg1, LONGEST arg2, int arg3, struct expression *arg4)
|
|
|
e1d87d |
{
|
|
|
e1d87d |
self = self->beneath;
|
|
|
e1d87d |
return self->to_can_accel_watchpoint_condition (self, arg1, arg2, arg3, arg4);
|
|
|
e1d87d |
}
|
|
|
e1d87d |
|
|
|
e1d87d |
static int
|
|
|
e1d87d |
-tdefault_can_accel_watchpoint_condition (struct target_ops *self, CORE_ADDR arg1, int arg2, int arg3, struct expression *arg4)
|
|
|
e1d87d |
+tdefault_can_accel_watchpoint_condition (struct target_ops *self, CORE_ADDR arg1, LONGEST arg2, int arg3, struct expression *arg4)
|
|
|
e1d87d |
{
|
|
|
e1d87d |
return 0;
|
|
|
e1d87d |
}
|
|
|
e1d87d |
|
|
|
e1d87d |
static int
|
|
|
e1d87d |
-debug_can_accel_watchpoint_condition (struct target_ops *self, CORE_ADDR arg1, int arg2, int arg3, struct expression *arg4)
|
|
|
e1d87d |
+debug_can_accel_watchpoint_condition (struct target_ops *self, CORE_ADDR arg1, LONGEST arg2, int arg3, struct expression *arg4)
|
|
|
e1d87d |
{
|
|
|
e1d87d |
int result;
|
|
|
e1d87d |
fprintf_unfiltered (gdb_stdlog, "-> %s->to_can_accel_watchpoint_condition (...)\n", debug_target.to_shortname);
|
|
|
e1d87d |
@@ -784,7 +784,7 @@ debug_can_accel_watchpoint_condition (st
|
|
|
e1d87d |
fputs_unfiltered (", ", gdb_stdlog);
|
|
|
e1d87d |
target_debug_print_CORE_ADDR (arg1);
|
|
|
e1d87d |
fputs_unfiltered (", ", gdb_stdlog);
|
|
|
e1d87d |
- target_debug_print_int (arg2);
|
|
|
e1d87d |
+ target_debug_print_LONGEST (arg2);
|
|
|
e1d87d |
fputs_unfiltered (", ", gdb_stdlog);
|
|
|
e1d87d |
target_debug_print_int (arg3);
|
|
|
e1d87d |
fputs_unfiltered (", ", gdb_stdlog);
|
|
|
e1d87d |
Index: gdb-7.10.50.20151027/gdb/nat/aarch64-linux-hw-point.c
|
|
|
e1d87d |
===================================================================
|
|
|
e1d87d |
--- gdb-7.10.50.20151027.orig/gdb/nat/aarch64-linux-hw-point.c 2015-10-27 02:48:31.000000000 +0100
|
|
|
e1d87d |
+++ gdb-7.10.50.20151027/gdb/nat/aarch64-linux-hw-point.c 2015-11-08 10:36:33.099072144 +0100
|
|
|
e1d87d |
@@ -111,7 +111,7 @@ aarch64_point_encode_ctrl_reg (enum targ
|
|
|
e1d87d |
Return 0 for any non-compliant ADDR and/or LEN; return 1 otherwise. */
|
|
|
e1d87d |
|
|
|
e1d87d |
static int
|
|
|
e1d87d |
-aarch64_point_is_aligned (int is_watchpoint, CORE_ADDR addr, int len)
|
|
|
e1d87d |
+aarch64_point_is_aligned (int is_watchpoint, CORE_ADDR addr, LONGEST len)
|
|
|
e1d87d |
{
|
|
|
e1d87d |
unsigned int alignment = 0;
|
|
|
e1d87d |
|
|
|
e1d87d |
@@ -180,9 +180,10 @@ aarch64_point_is_aligned (int is_watchpo
|
|
|
e1d87d |
limitations can be largely relaxed with some further work. */
|
|
|
e1d87d |
|
|
|
e1d87d |
static void
|
|
|
e1d87d |
-aarch64_align_watchpoint (CORE_ADDR addr, int len, CORE_ADDR *aligned_addr_p,
|
|
|
e1d87d |
+aarch64_align_watchpoint (CORE_ADDR addr, LONGEST len,
|
|
|
e1d87d |
+ CORE_ADDR *aligned_addr_p,
|
|
|
e1d87d |
int *aligned_len_p, CORE_ADDR *next_addr_p,
|
|
|
e1d87d |
- int *next_len_p)
|
|
|
e1d87d |
+ LONGEST *next_len_p)
|
|
|
e1d87d |
{
|
|
|
e1d87d |
int aligned_len;
|
|
|
e1d87d |
unsigned int offset;
|
|
|
e1d87d |
@@ -494,7 +495,7 @@ aarch64_handle_aligned_watchpoint (enum
|
|
|
e1d87d |
|
|
|
e1d87d |
static int
|
|
|
e1d87d |
aarch64_handle_unaligned_watchpoint (enum target_hw_bp_type type,
|
|
|
e1d87d |
- CORE_ADDR addr, int len, int is_insert,
|
|
|
e1d87d |
+ CORE_ADDR addr, LONGEST len, int is_insert,
|
|
|
e1d87d |
struct aarch64_debug_reg_state *state)
|
|
|
e1d87d |
{
|
|
|
e1d87d |
while (len > 0)
|
|
|
e1d87d |
@@ -517,9 +518,9 @@ aarch64_handle_unaligned_watchpoint (enu
|
|
|
e1d87d |
" "
|
|
|
e1d87d |
"aligned_addr: %s, aligned_len: %d\n"
|
|
|
e1d87d |
" "
|
|
|
e1d87d |
- "next_addr: %s, next_len: %d\n",
|
|
|
e1d87d |
+ "next_addr: %s, next_len: %s\n",
|
|
|
e1d87d |
is_insert, core_addr_to_string_nz (aligned_addr),
|
|
|
e1d87d |
- aligned_len, core_addr_to_string_nz (addr), len);
|
|
|
e1d87d |
+ aligned_len, core_addr_to_string_nz (addr), plongest (len));
|
|
|
e1d87d |
|
|
|
e1d87d |
if (ret != 0)
|
|
|
e1d87d |
return ret;
|
|
|
e1d87d |
@@ -530,7 +531,7 @@ aarch64_handle_unaligned_watchpoint (enu
|
|
|
e1d87d |
|
|
|
e1d87d |
int
|
|
|
e1d87d |
aarch64_handle_watchpoint (enum target_hw_bp_type type, CORE_ADDR addr,
|
|
|
e1d87d |
- int len, int is_insert,
|
|
|
e1d87d |
+ LONGEST len, int is_insert,
|
|
|
e1d87d |
struct aarch64_debug_reg_state *state)
|
|
|
e1d87d |
{
|
|
|
e1d87d |
if (aarch64_point_is_aligned (1 /* is_watchpoint */ , addr, len))
|
|
|
e1d87d |
@@ -581,14 +582,14 @@ aarch64_linux_set_debug_regs (const stru
|
|
|
e1d87d |
void
|
|
|
e1d87d |
aarch64_show_debug_reg_state (struct aarch64_debug_reg_state *state,
|
|
|
e1d87d |
const char *func, CORE_ADDR addr,
|
|
|
e1d87d |
- int len, enum target_hw_bp_type type)
|
|
|
e1d87d |
+ LONGEST len, enum target_hw_bp_type type)
|
|
|
e1d87d |
{
|
|
|
e1d87d |
int i;
|
|
|
e1d87d |
|
|
|
e1d87d |
debug_printf ("%s", func);
|
|
|
e1d87d |
if (addr || len)
|
|
|
e1d87d |
- debug_printf (" (addr=0x%08lx, len=%d, type=%s)",
|
|
|
e1d87d |
- (unsigned long) addr, len,
|
|
|
e1d87d |
+ debug_printf (" (addr=0x%08lx, len=%s, type=%s)",
|
|
|
e1d87d |
+ (unsigned long) addr, plongest (len),
|
|
|
e1d87d |
type == hw_write ? "hw-write-watchpoint"
|
|
|
e1d87d |
: (type == hw_read ? "hw-read-watchpoint"
|
|
|
e1d87d |
: (type == hw_access ? "hw-access-watchpoint"
|
|
|
e1d87d |
Index: gdb-7.10.50.20151027/gdb/nat/aarch64-linux-hw-point.h
|
|
|
e1d87d |
===================================================================
|
|
|
e1d87d |
--- gdb-7.10.50.20151027.orig/gdb/nat/aarch64-linux-hw-point.h 2015-10-27 02:48:31.000000000 +0100
|
|
|
e1d87d |
+++ gdb-7.10.50.20151027/gdb/nat/aarch64-linux-hw-point.h 2015-11-08 10:36:47.656170839 +0100
|
|
|
e1d87d |
@@ -168,7 +168,7 @@ int aarch64_handle_breakpoint (enum targ
|
|
|
e1d87d |
int len, int is_insert,
|
|
|
e1d87d |
struct aarch64_debug_reg_state *state);
|
|
|
e1d87d |
int aarch64_handle_watchpoint (enum target_hw_bp_type type, CORE_ADDR addr,
|
|
|
e1d87d |
- int len, int is_insert,
|
|
|
e1d87d |
+ LONGEST len, int is_insert,
|
|
|
e1d87d |
struct aarch64_debug_reg_state *state);
|
|
|
e1d87d |
|
|
|
e1d87d |
void aarch64_linux_set_debug_regs (const struct aarch64_debug_reg_state *state,
|
|
|
e1d87d |
@@ -176,7 +176,7 @@ void aarch64_linux_set_debug_regs (const
|
|
|
e1d87d |
|
|
|
e1d87d |
void aarch64_show_debug_reg_state (struct aarch64_debug_reg_state *state,
|
|
|
e1d87d |
const char *func, CORE_ADDR addr,
|
|
|
e1d87d |
- int len, enum target_hw_bp_type type);
|
|
|
e1d87d |
+ LONGEST len, enum target_hw_bp_type type);
|
|
|
e1d87d |
|
|
|
e1d87d |
void aarch64_linux_get_debug_reg_capacity (int tid);
|
|
|
e1d87d |
|