aboutsummaryrefslogtreecommitdiff
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.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gdb/python/py-objfile.c b/gdb/python/py-objfile.c
index a954c9d..9bbd4c2 100644
--- a/gdb/python/py-objfile.c
+++ b/gdb/python/py-objfile.c
@@ -53,7 +53,8 @@ objfpy_get_filename (PyObject *self, void *closure)
objfile_object *obj = (objfile_object *) self;
if (obj->objfile)
- return PyString_Decode (obj->objfile->name, strlen (obj->objfile->name),
+ return PyString_Decode (objfile_name (obj->objfile),
+ strlen (objfile_name (obj->objfile)),
host_charset (), NULL);
Py_RETURN_NONE;
}