diff options
author | Tom Tromey <tom@tromey.com> | 2019-09-24 17:36:07 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2019-09-25 09:37:56 -0600 |
commit | 858f25f0dd3c7013e4c87b95fa8edac223d26156 (patch) | |
tree | df6f8df78087efc82bda224864035a94ab03a5f8 /gdb/utils.c | |
parent | 9a24a2763daa773328a788988048a7b3f344a548 (diff) | |
download | gdb-858f25f0dd3c7013e4c87b95fa8edac223d26156.zip gdb-858f25f0dd3c7013e4c87b95fa8edac223d26156.tar.gz gdb-858f25f0dd3c7013e4c87b95fa8edac223d26156.tar.bz2 |
Remove make_hex_string
I noticed that make_hex_string does essentially the same thing as
bin2hex, and furthermore is only called in a single spot. This patch
removes make_hex_string.
Tested by the builtbot.
gdb/ChangeLog
2019-09-25 Tom Tromey <tom@tromey.com>
* python/py-objfile.c (objfpy_get_build_id): Use bin2hex.
* utils.h (make_hex_string): Don't declare.
* utils.c (make_hex_string): Remove.
Diffstat (limited to 'gdb/utils.c')
-rw-r--r-- | gdb/utils.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/gdb/utils.c b/gdb/utils.c index b2535eb..154fcd9 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -736,22 +736,6 @@ gdb_print_host_address_1 (const void *addr, struct ui_file *stream) fprintf_filtered (stream, "%s", host_address_to_string (addr)); } -/* See utils.h. */ - -char * -make_hex_string (const gdb_byte *data, size_t length) -{ - char *result = (char *) xmalloc (length * 2 + 1); - char *p; - size_t i; - - p = result; - for (i = 0; i < length; ++i) - p += xsnprintf (p, 3, "%02x", data[i]); - *p = '\0'; - return result; -} - /* An RAII class that sets up to handle input and then tears down |