mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-19 17:18:24 +08:00
replace convert_int_to_ascii with bin2hex
convert_int_to_ascii is identical to bin2hex. This removes the former. In this case I made the choice of which to keep on the basis that I consider the name bin2hex to be superior to convert_int_to_ascii. 2014-02-12 Tom Tromey <tromey@redhat.com> * common/rsp-low.h (convert_int_to_ascii): Don't declare. * common/rsp-low.c (convert_int_to_ascii): Remove. 2014-02-12 Tom Tromey <tromey@redhat.com> * ax.c (gdb_unparse_agent_expr): Use bin2hex, not convert_int_to_ascii. * regcache.c (registers_to_string, collect_register_as_string): Likewise. * remote-utils.c (look_up_one_symbol, relocate_instruction): Likewise. * server.c (process_serial_event): Likewise. * tracepoint.c (cmd_qtstatus, response_source, response_tsv) (cmd_qtbuffer, cstr_to_hexstr): Likewise.
This commit is contained in:
@ -172,22 +172,6 @@ bin2hex (const gdb_byte *bin, char *hex, int count)
|
||||
return i;
|
||||
}
|
||||
|
||||
void
|
||||
convert_int_to_ascii (const unsigned char *from, char *to, int n)
|
||||
{
|
||||
int nib;
|
||||
int ch;
|
||||
while (n--)
|
||||
{
|
||||
ch = *from++;
|
||||
nib = ((ch & 0xf0) >> 4) & 0x0f;
|
||||
*to++ = tohex (nib);
|
||||
nib = ch & 0x0f;
|
||||
*to++ = tohex (nib);
|
||||
}
|
||||
*to++ = 0;
|
||||
}
|
||||
|
||||
int
|
||||
remote_escape_output (const gdb_byte *buffer, int len,
|
||||
gdb_byte *out_buf, int *out_len,
|
||||
|
Reference in New Issue
Block a user