aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/py-objfile.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2022-02-03 11:45:59 -0700
committerTom Tromey <tromey@adacore.com>2022-02-04 07:37:22 -0700
commit2b531492447d10de27e6210117509097f6cbc9e0 (patch)
tree5e08243a39a075762c852e656563a6c3faf62b38 /gdb/python/py-objfile.c
parentfd3c53675c01472caaa4eb976781b9d6d2d3c53d (diff)
downloadfsf-binutils-gdb-2b531492447d10de27e6210117509097f6cbc9e0.zip
fsf-binutils-gdb-2b531492447d10de27e6210117509097f6cbc9e0.tar.gz
fsf-binutils-gdb-2b531492447d10de27e6210117509097f6cbc9e0.tar.bz2
Remove host_hex_value
I noticed that host_hex_value is redundant, because gdbsupport already has fromhex. This patch removes the former in favor of the latter. Regression tested on x86-64 Fedora 34.
Diffstat (limited to 'gdb/python/py-objfile.c')
-rw-r--r--gdb/python/py-objfile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/python/py-objfile.c b/gdb/python/py-objfile.c
index 48d2eb3..8c56879 100644
--- a/gdb/python/py-objfile.c
+++ b/gdb/python/py-objfile.c
@@ -550,7 +550,7 @@ objfpy_build_id_matches (const struct bfd_build_id *build_id,
for (i = 0; i < build_id->size; ++i)
{
char c1 = string[i * 2], c2 = string[i * 2 + 1];
- int byte = (host_hex_value (c1) << 4) | host_hex_value (c2);
+ int byte = (fromhex (c1) << 4) | fromhex (c2);
if (byte != build_id->data[i])
return 0;