mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-05-31 10:09:16 +08:00
gdb/
Code cleanup. * objfiles.c (allocate_objfile) <objfile->name != NULL>: Remove. (free_objfile) <objfile->name != NULL>: Remove the conditional around xfree. * objfiles.h (struct objfile) <name>: New comment it is never NULL. * python/py-auto-load.c (auto_load_new_objfile) <!objfile->name>: Remove. * python/py-objfile.c (objfpy_get_filename) <obj->objfile->name> Remove the conditional. * python/py-progspace.c (pspy_get_filename) <objfile->name>: Likewise.
This commit is contained in:
@ -395,8 +395,6 @@ auto_load_new_objfile (struct objfile *objfile)
|
||||
clear_section_scripts ();
|
||||
return;
|
||||
}
|
||||
if (!objfile->name)
|
||||
return;
|
||||
|
||||
load_auto_scripts_for_objfile (objfile);
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ objfpy_get_filename (PyObject *self, void *closure)
|
||||
{
|
||||
objfile_object *obj = (objfile_object *) self;
|
||||
|
||||
if (obj->objfile && obj->objfile->name)
|
||||
if (obj->objfile)
|
||||
return PyString_Decode (obj->objfile->name, strlen (obj->objfile->name),
|
||||
host_charset (), NULL);
|
||||
Py_RETURN_NONE;
|
||||
|
@ -52,7 +52,7 @@ pspy_get_filename (PyObject *self, void *closure)
|
||||
{
|
||||
struct objfile *objfile = obj->pspace->symfile_object_file;
|
||||
|
||||
if (objfile && objfile->name)
|
||||
if (objfile)
|
||||
return PyString_Decode (objfile->name, strlen (objfile->name),
|
||||
host_charset (), NULL);
|
||||
}
|
||||
|
Reference in New Issue
Block a user