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:
Simon Marchi
2021-01-28 10:09:02 -05:00
parent cc3edc5274
commit 6ac373717c
12 changed files with 58 additions and 50 deletions

View File

@ -2514,10 +2514,10 @@ void
preserve_one_value (struct value *value, struct objfile *objfile,
htab_t copied_types)
{
if (value->type->objfile () == objfile)
if (value->type->objfile_owner () == objfile)
value->type = copy_type_recursive (objfile, value->type, copied_types);
if (value->enclosing_type->objfile () == objfile)
if (value->enclosing_type->objfile_owner () == objfile)
value->enclosing_type = copy_type_recursive (objfile,
value->enclosing_type,
copied_types);
@ -2532,7 +2532,8 @@ preserve_one_internalvar (struct internalvar *var, struct objfile *objfile,
switch (var->kind)
{
case INTERNALVAR_INTEGER:
if (var->u.integer.type && var->u.integer.type->objfile () == objfile)
if (var->u.integer.type
&& var->u.integer.type->objfile_owner () == objfile)
var->u.integer.type
= copy_type_recursive (objfile, var->u.integer.type, copied_types);
break;