Minor cleanup in loclist_describe_location
authorTom Tromey <tromey@adacore.com>
Thu, 20 Apr 2023 12:33:12 +0000 (06:33 -0600)
committerTom Tromey <tromey@adacore.com>
Mon, 5 Jun 2023 15:59:17 +0000 (09:59 -0600)
loclist_describe_location already has a per_objfile local variable, so
use it consistently.

gdb/dwarf2/loc.c

index d9615870aeb33f477011926eb6002bb8230b14c7..c1955f28a443a0c096e342ec0713d8aaa855653f 100644 (file)
@@ -3968,7 +3968,7 @@ loclist_describe_location (struct symbol *symbol, CORE_ADDR addr,
 
       if (dlbaton->per_cu->version () < 5 && dlbaton->from_dwo)
        kind = decode_debug_loc_dwo_addresses (dlbaton->per_cu,
-                                              dlbaton->per_objfile,
+                                              per_objfile,
                                               loc_ptr, buf_end, &new_ptr,
                                               &low, &high, byte_order);
       else if (dlbaton->per_cu->version () < 5)
@@ -3978,7 +3978,7 @@ loclist_describe_location (struct symbol *symbol, CORE_ADDR addr,
                                           signed_addr_p);
       else
        kind = decode_debug_loclists_addresses (dlbaton->per_cu,
-                                               dlbaton->per_objfile,
+                                               per_objfile,
                                                loc_ptr, buf_end, &new_ptr,
                                                &low, &high, byte_order,
                                                addr_size, signed_addr_p);
@@ -4041,7 +4041,7 @@ loclist_describe_location (struct symbol *symbol, CORE_ADDR addr,
       /* Now describe this particular location.  */
       locexpr_describe_location_1 (symbol, low, stream, loc_ptr, length,
                                   addr_size, offset_size,
-                                  dlbaton->per_cu, dlbaton->per_objfile);
+                                  dlbaton->per_cu, per_objfile);
 
       gdb_printf (stream, "\n");