summaryrefslogtreecommitdiff
path: root/gdb/python/py-objfile.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/python/py-objfile.c')
-rw-r--r--gdb/python/py-objfile.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/python/py-objfile.c b/gdb/python/py-objfile.c
index 38052245bde..3e3270e7cd3 100644
--- a/gdb/python/py-objfile.c
+++ b/gdb/python/py-objfile.c
@@ -510,10 +510,10 @@ objfpy_repr (PyObject *self_)
objfile *obj = self->objfile;
if (obj == nullptr)
- return PyString_FromString ("<gdb.Objfile (invalid)>");
+ return PyUnicode_FromString ("<gdb.Objfile (invalid)>");
- return PyString_FromFormat ("<gdb.Objfile filename=%s>",
- objfile_filename (obj));
+ return PyUnicode_FromFormat ("<gdb.Objfile filename=%s>",
+ objfile_name (obj));
}
/* Subroutine of gdbpy_lookup_objfile_by_build_id to simplify it.
@@ -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;
@@ -661,7 +661,7 @@ gdbpy_lookup_objfile (PyObject *self, PyObject *args, PyObject *kw)
static void
py_free_objfile (struct objfile *objfile, void *datum)
{
- gdbpy_enter enter_py (objfile->arch (), current_language);
+ gdbpy_enter enter_py (objfile->arch ());
gdbpy_ref<objfile_object> object ((objfile_object *) datum);
object->objfile = NULL;
}