- decode_m_packet (&own_buf[1], &mem_addr, &mem_len);
- mem_buf = (unsigned char *) xmalloc (mem_len);
- if (read_inferior_memory (mem_addr, mem_buf, mem_len) == 0)
- bin2hex (mem_buf, own_buf, mem_len);
+ decode_m_packet (&cs.own_buf[1], &mem_addr, &mem_len);
+ mem_buf = (unsigned char *) xmalloc (mem_len);
+ if (read_inferior_memory (mem_addr, mem_buf, mem_len) == 0)
+ bin2hex (mem_buf, cs.own_buf, mem_len);
+ else
+ write_enn (cs.own_buf);
+ free (mem_buf);
+ if (putpkt (cs.own_buf) < 0)
+ return -1;
+ }
+ else if (cs.own_buf[0] == 'v')
+ {
+ int new_len = -1;
+ handle_v_requests (cs.own_buf, len, &new_len);
+ if (new_len != -1)
+ putpkt_binary (cs.own_buf, new_len);
+ else
+ putpkt (cs.own_buf);
+ }