gdb: rename type::{arch,objfile} -> type::{arch_owner,objfile_owner}
I think this makes the names of the methods clearer, especially for the arch. The type::arch method (which gets the arch owner, or NULL if the type is not arch owned) is easily confused with the get_type_arch method (which returns an arch no matter what). The name "arch_owner" will make it intuitive that the method returns NULL if the type is not arch-owned. Also, this frees the type::arch name, so we will be able to morph the get_type_arch function into the type::arch method. gdb/ChangeLog: * gdbtypes.h (struct type) <arch>: Rename to... <arch_owner>: ... this, update all users. <objfile>: Rename to... <objfile_owner>: ... this, update all users. Change-Id: Ie7c28684c7b565adec05a7619c418c69429bd8c0
This commit is contained in:
parent
cc3edc5274
commit
6ac373717c
12 changed files with 58 additions and 50 deletions
|
@ -418,7 +418,7 @@ static PyObject *
|
|||
typy_get_objfile (PyObject *self, void *closure)
|
||||
{
|
||||
struct type *type = ((type_object *) self)->type;
|
||||
struct objfile *objfile = type->objfile ();
|
||||
struct objfile *objfile = type->objfile_owner ();
|
||||
|
||||
if (objfile == nullptr)
|
||||
Py_RETURN_NONE;
|
||||
|
@ -1098,9 +1098,9 @@ set_type (type_object *obj, struct type *type)
|
|||
{
|
||||
obj->type = type;
|
||||
obj->prev = NULL;
|
||||
if (type != nullptr && type->objfile () != nullptr)
|
||||
if (type != nullptr && type->objfile_owner () != nullptr)
|
||||
{
|
||||
struct objfile *objfile = type->objfile ();
|
||||
struct objfile *objfile = type->objfile_owner ();
|
||||
|
||||
obj->next = ((type_object *)
|
||||
objfile_data (objfile, typy_objfile_data_key));
|
||||
|
@ -1119,10 +1119,10 @@ typy_dealloc (PyObject *obj)
|
|||
|
||||
if (type->prev)
|
||||
type->prev->next = type->next;
|
||||
else if (type->type != nullptr && type->type->objfile () != nullptr)
|
||||
else if (type->type != nullptr && type->type->objfile_owner () != nullptr)
|
||||
{
|
||||
/* Must reset head of list. */
|
||||
struct objfile *objfile = type->type->objfile ();
|
||||
struct objfile *objfile = type->type->objfile_owner ();
|
||||
|
||||
if (objfile)
|
||||
set_objfile_data (objfile, typy_objfile_data_key, type->next);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue