gdb: rename address_class -> location_class

The enum address_class and related fields and methods seem misnamed to
me.  Generalize it to "location_class".  The enumerators in
address_class are already prefixed with LOC, so the new name seems
logical to me.  Rename related fields and methods as well.

Plus, address_class could easily be mistaken for other unrelated things
named "address class" in GDB or DWARF.

Tested by rebuilding.

Change-Id: I0dca3738df412b350715286c608041b08e9b4d82
Approved-by: Kevin Buettner <kevinb@redhat.com>
This commit is contained in:
Simon Marchi
2025-08-14 16:14:06 -04:00
parent 1d5f884e50
commit 4260abb7a7
48 changed files with 331 additions and 342 deletions

View File

@@ -2678,11 +2678,11 @@ var_value_operation::evaluate_for_address (struct expression *exp,
if (noside == EVAL_AVOID_SIDE_EFFECTS)
{
struct type *type = lookup_pointer_type (var->type ());
enum address_class sym_class = var->aclass ();
location_class loc_class = var->loc_class ();
if (sym_class == LOC_CONST
|| sym_class == LOC_CONST_BYTES
|| sym_class == LOC_REGISTER)
if (loc_class == LOC_CONST
|| loc_class == LOC_CONST_BYTES
|| loc_class == LOC_REGISTER)
error (_("Attempt to take address of register or constant."));
return value::zero (type, not_lval);