the worst case of maximum length for each of the pieces of a
continuation packet.
- NOTE: expressions get mem2hex'ed otherwise this would be twice as
+ NOTE: expressions get bin2hex'ed otherwise this would be twice as
large. (400 - 31)/2 == 184 */
#define MAX_AGENT_EXPR_LEN 184
/* support routines */
struct collection_list;
-static char *mem2hex (gdb_byte *, char *, int);
static counted_command_line all_tracepoint_actions (struct breakpoint *);
end += 10; /* 'X' + 8 hex digits + ',' */
count += 10;
- end = mem2hex (m_aexprs[i]->buf, end, m_aexprs[i]->len);
+ end += 2 * bin2hex (m_aexprs[i]->buf, end, m_aexprs[i]->len);
count += 2 * m_aexprs[i]->len;
}
warning (_("Target does not support trace notes, stop note ignored"));
}
-/* Convert the memory pointed to by mem into hex, placing result in buf.
- * Return a pointer to the last char put in buf (null)
- * "stolen" from sparc-stub.c
- */
-
-static const char hexchars[] = "0123456789abcdef";
-
-static char *
-mem2hex (gdb_byte *mem, char *buf, int count)
-{
- gdb_byte ch;
-
- while (count-- > 0)
- {
- ch = *mem++;
-
- *buf++ = hexchars[ch >> 4];
- *buf++ = hexchars[ch & 0xf];
- }
-
- *buf = 0;
-
- return buf;
-}
-
int
get_traceframe_number (void)
{