+2013-02-19 Pedro Alves <palves@redhat.com>
+ Kai Tietz <ktietz@redhat.com>
+
+ PR gdb/15161
+
+ * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
+ instead of strtoul to extract address from packet.
+ (process_serial_event) <'z'>: Likewise.
+
2013-02-18 Yao Qi <yao@codesourcery.com>
* linux-bfin-low.c (the_low_target): Use NULL instead of 0.
{
/* CRC check (compare-section). */
char *comma;
- CORE_ADDR base;
+ ULONGEST base;
int len;
unsigned long long crc;
require_running (own_buf);
- base = strtoul (own_buf + 5, &comma, 16);
+ comma = unpack_varlen_hex (own_buf + 5, &base);
if (*comma++ != ',')
{
write_enn (own_buf);
/* Fallthrough. */
case 'z': /* remove_ ... */
{
- char *lenptr;
char *dataptr;
- CORE_ADDR addr = strtoul (&own_buf[3], &lenptr, 16);
- int len = strtol (lenptr + 1, &dataptr, 16);
+ ULONGEST addr;
+ int len;
char type = own_buf[1];
int res;
const int insert = ch == 'Z';
+ char *p = &own_buf[3];
+
+ p = unpack_varlen_hex (p, &addr);
+ len = strtol (p + 1, &dataptr, 16);
/* Default to unrecognized/unsupported. */
res = 1;