/* True if the stub reports support for vCont;t. */
int support_vCont_t;
+
+ /* True if the stub reports support for conditional tracepoints. */
+ int cond_tracepoints;
};
/* Returns true if the multi-process extensions are in effect. */
PACKET_qXfer_siginfo_read,
PACKET_qXfer_siginfo_write,
PACKET_qAttached,
+ PACKET_ConditionalTracepoints,
PACKET_MAX
};
xsnprintf (msg, get_remote_packet_size (), "qSymbol::%s", &reply[8]);
else
{
+ int addr_size = gdbarch_addr_bit (target_gdbarch) / 8;
CORE_ADDR sym_addr = SYMBOL_VALUE_ADDRESS (sym);
/* If this is a function address, return the start of code
¤t_target);
xsnprintf (msg, get_remote_packet_size (), "qSymbol:%s:%s",
- paddr_nz (sym_addr), &reply[8]);
+ phex_nz (sym_addr, addr_size), &reply[8]);
}
putpkt (msg);
rs->non_stop_aware = (support == PACKET_ENABLE);
}
+static void
+remote_cond_tracepoint_feature (const struct protocol_feature *feature,
+ enum packet_support support,
+ const char *value)
+{
+ struct remote_state *rs = get_remote_state ();
+ rs->cond_tracepoints = (support == PACKET_ENABLE);
+}
+
static struct protocol_feature remote_protocol_features[] = {
{ "PacketSize", PACKET_DISABLE, remote_packet_size, -1 },
{ "qXfer:auxv:read", PACKET_DISABLE, remote_supported_packet,
PACKET_qXfer_siginfo_read },
{ "qXfer:siginfo:write", PACKET_DISABLE, remote_supported_packet,
PACKET_qXfer_siginfo_write },
+ { "ConditionalTracepoints", PACKET_DISABLE, remote_cond_tracepoint_feature,
+ PACKET_ConditionalTracepoints },
};
static void
/* Expedited registers. */
if (stop_reply->regcache)
{
+ struct regcache *regcache
+ = get_thread_arch_regcache (ptid, target_gdbarch);
cached_reg_t *reg;
int ix;
for (ix = 0;
VEC_iterate(cached_reg_t, stop_reply->regcache, ix, reg);
ix++)
- regcache_raw_supply (get_thread_regcache (ptid),
- reg->num, reg->data);
+ regcache_raw_supply (regcache, reg->num, reg->data);
VEC_free (cached_reg_t, stop_reply->regcache);
}
remote_flash_erase (struct target_ops *ops,
ULONGEST address, LONGEST length)
{
+ int addr_size = gdbarch_addr_bit (target_gdbarch) / 8;
int saved_remote_timeout = remote_timeout;
enum packet_result ret;
remote_timeout = remote_flash_timeout;
ret = remote_send_printf ("vFlashErase:%s,%s",
- paddr (address),
+ phex (address, addr_size),
phex (length, 4));
switch (ret)
{
getpkt (&rs->buf, &rs->buf_size, 0);
if (rs->buf[0] == 'E')
- error (_("target memory fault, section %s, range 0x%s -- 0x%s"),
- sectname, paddr (lma), paddr (lma + size));
+ error (_("target memory fault, section %s, range %s -- %s"), sectname,
+ paddress (target_gdbarch, lma),
+ paddress (target_gdbarch, lma + size));
if (rs->buf[0] != 'C')
error (_("remote target does not support this operation"));
for (target_crc = 0, tmp = &rs->buf[1]; *tmp; tmp++)
target_crc = target_crc * 16 + fromhex (*tmp);
- printf_filtered ("Section %s, range 0x%s -- 0x%s: ",
- sectname, paddr (lma), paddr (lma + size));
+ printf_filtered ("Section %s, range %s -- %s: ", sectname,
+ paddress (target_gdbarch, lma),
+ paddress (target_gdbarch, lma + size));
if (host_crc == target_crc)
printf_filtered ("matched.\n");
else
const gdb_byte *pattern, ULONGEST pattern_len,
CORE_ADDR *found_addrp)
{
+ int addr_size = gdbarch_addr_bit (target_gdbarch) / 8;
struct remote_state *rs = get_remote_state ();
int max_size = get_memory_write_packet_size ();
struct packet_config *packet =
/* Insert header. */
i = snprintf (rs->buf, max_size,
"qSearch:memory:%s;%s;",
- paddr_nz (start_addr),
+ phex_nz (start_addr, addr_size),
phex_nz (search_space_len, sizeof (search_space_len)));
max_size -= (i + 1);
return remote_multi_process_p (rs);
}
+int
+remote_supports_cond_tracepoints (void)
+{
+ struct remote_state *rs = get_remote_state ();
+ return rs->cond_tracepoints;
+}
+
static void
init_remote_ops (void)
{
add_packet_config_cmd (&remote_protocol_packets[PACKET_qAttached],
"qAttached", "query-attached", 0);
+ add_packet_config_cmd (&remote_protocol_packets[PACKET_ConditionalTracepoints],
+ "ConditionalTracepoints", "conditional-tracepoints", 0);
+
/* Keep the old ``set remote Z-packet ...'' working. Each individual
Z sub-packet has its own set and show commands, but users may
have sets to this variable in their .gdbinit files (or in their