aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog9
-rw-r--r--gdb/remote.c39
2 files changed, 48 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index f520669..395326b 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,14 @@
2013-05-29 Pedro Alves <palves@redhat.com>
+ * remote.c (remote_insert_breakpoint, remote_remove_breakpoint)
+ (remote_insert_watchpoint, remote_remove_watchpoint)
+ (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
+ (remote_verify_memory, compare_sections_command)
+ (remote_search_memory): Set the general process/thread on the
+ remote side.
+
+2013-05-29 Pedro Alves <palves@redhat.com>
+
* aarch64-tdep.c: Don't include "features/aarch64-without-fpu.c".
(_initialize_aarch64_tdep): Don't call
initialize_tdesc_aarch64_without_fpu.
diff --git a/gdb/remote.c b/gdb/remote.c
index 658fae2..9a529cf 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -8153,6 +8153,11 @@ remote_insert_breakpoint (struct gdbarch *gdbarch,
int bpsize;
struct condition_list *cond = NULL;
+ /* Make sure the remote is pointing at the right process, if
+ necessary. */
+ if (!gdbarch_has_global_breakpoints (target_gdbarch ()))
+ set_general_process ();
+
gdbarch_remote_breakpoint_from_pc (gdbarch, &addr, &bpsize);
rs = get_remote_state ();
@@ -8203,6 +8208,11 @@ remote_remove_breakpoint (struct gdbarch *gdbarch,
char *p = rs->buf;
char *endbuf = rs->buf + get_remote_packet_size ();
+ /* Make sure the remote is pointing at the right process, if
+ necessary. */
+ if (!gdbarch_has_global_breakpoints (target_gdbarch ()))
+ set_general_process ();
+
*(p++) = 'z';
*(p++) = '0';
*(p++) = ',';
@@ -8252,6 +8262,11 @@ remote_insert_watchpoint (CORE_ADDR addr, int len, int type,
if (remote_protocol_packets[PACKET_Z0 + packet].support == PACKET_DISABLE)
return 1;
+ /* Make sure the remote is pointing at the right process, if
+ necessary. */
+ if (!gdbarch_has_global_breakpoints (target_gdbarch ()))
+ set_general_process ();
+
xsnprintf (rs->buf, endbuf - rs->buf, "Z%x,", packet);
p = strchr (rs->buf, '\0');
addr = remote_address_masked (addr);
@@ -8296,6 +8311,11 @@ remote_remove_watchpoint (CORE_ADDR addr, int len, int type,
if (remote_protocol_packets[PACKET_Z0 + packet].support == PACKET_DISABLE)
return -1;
+ /* Make sure the remote is pointing at the right process, if
+ necessary. */
+ if (!gdbarch_has_global_breakpoints (target_gdbarch ()))
+ set_general_process ();
+
xsnprintf (rs->buf, endbuf - rs->buf, "z%x,", packet);
p = strchr (rs->buf, '\0');
addr = remote_address_masked (addr);
@@ -8399,6 +8419,11 @@ remote_insert_hw_breakpoint (struct gdbarch *gdbarch,
if (remote_protocol_packets[PACKET_Z1].support == PACKET_DISABLE)
return -1;
+ /* Make sure the remote is pointing at the right process, if
+ necessary. */
+ if (!gdbarch_has_global_breakpoints (target_gdbarch ()))
+ set_general_process ();
+
rs = get_remote_state ();
p = rs->buf;
endbuf = rs->buf + get_remote_packet_size ();
@@ -8452,6 +8477,11 @@ remote_remove_hw_breakpoint (struct gdbarch *gdbarch,
if (remote_protocol_packets[PACKET_Z1].support == PACKET_DISABLE)
return -1;
+ /* Make sure the remote is pointing at the right process, if
+ necessary. */
+ if (!gdbarch_has_global_breakpoints (target_gdbarch ()))
+ set_general_process ();
+
*(p++) = 'z';
*(p++) = '1';
*(p++) = ',';
@@ -8515,6 +8545,9 @@ remote_verify_memory (struct target_ops *ops,
unsigned long host_crc, target_crc;
char *tmp;
+ /* Make sure the remote is pointing at the right process. */
+ set_general_process ();
+
/* FIXME: assumes lma can fit into long. */
xsnprintf (rs->buf, get_remote_packet_size (), "qCRC:%lx,%lx",
(long) lma, (long) size);
@@ -8559,6 +8592,9 @@ compare_sections_command (char *args, int from_tty)
if (!exec_bfd)
error (_("command cannot be used without an exec file"));
+ /* Make sure the remote is pointing at the right process. */
+ set_general_process ();
+
for (s = exec_bfd->sections; s; s = s->next)
{
if (!(s->flags & SEC_LOAD))
@@ -8985,6 +9021,9 @@ remote_search_memory (struct target_ops* ops,
pattern, pattern_len, found_addrp);
}
+ /* Make sure the remote is pointing at the right process. */
+ set_general_process ();
+
/* Insert header. */
i = snprintf (rs->buf, max_size,
"qSearch:memory:%s;%s;",