]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Rename "raw" to "unrelocated"
authorTom Tromey <tom@tromey.com>
Mon, 20 Mar 2023 22:03:05 +0000 (16:03 -0600)
committerTom Tromey <tom@tromey.com>
Tue, 28 Mar 2023 21:12:44 +0000 (15:12 -0600)
Per an earlier discussion, this patch renames the existing "raw" APIs
to use the word "unrelocated" instead.

15 files changed:
gdb/coff-pe-read.c
gdb/dbxread.c
gdb/findvar.c
gdb/mdebugread.c
gdb/minsyms.c
gdb/mips-tdep.c
gdb/parse.c
gdb/printcmd.c
gdb/psympriv.h
gdb/psymtab.c
gdb/solib.c
gdb/symmisc.c
gdb/symtab.c
gdb/symtab.h
gdb/xcoffread.c

index 07cd216b4b215de7c9df9d65af94250b333d7b0e..fdd062f1b2e8d5d5598e14b220a09b74bbd95b3f 100644 (file)
@@ -210,7 +210,7 @@ add_pe_forwarded_sym (minimal_symbol_reader &reader,
                              " \"%s\" in dll \"%s\", pointing to \"%s\"\n"),
                sym_name, dll_name, forward_qualified_name.c_str ());
 
-  unrelocated_addr vma = msymbol.minsym->value_raw_address ();
+  unrelocated_addr vma = msymbol.minsym->unrelocated_address ();
   msymtype = msymbol.minsym->type ();
   section = msymbol.minsym->section_index ();
 
index 9df9320bc7bf1bfd53bfe44f1e8da3d02207cc09..f7c44c14ae2eb4e363565e3a086af25d1be815c5 100644 (file)
@@ -1131,13 +1131,13 @@ read_dbx_symtab (minimal_symbol_reader &reader,
              if (past_first_source_file && pst
                  /* The gould NP1 uses low values for .o and -l symbols
                     which are not the address.  */
-                 && unrel_val >= pst->raw_text_low ())
+                 && unrel_val >= pst->unrelocated_text_low ())
                {
                  dbx_end_psymtab (objfile, partial_symtabs,
                                   pst, psymtab_include_list,
                                   includes_used, symnum * symbol_size,
-                                  unrel_val > pst->raw_text_high ()
-                                  ? unrel_val : pst->raw_text_high (),
+                                  unrel_val > pst->unrelocated_text_high ()
+                                  ? unrel_val : pst->unrelocated_text_high (),
                                   dependency_list, dependencies_used,
                                   textlow_not_set);
                  pst = (legacy_psymtab *) 0;
@@ -1253,8 +1253,9 @@ read_dbx_symtab (minimal_symbol_reader &reader,
                    dbx_end_psymtab (objfile, partial_symtabs,
                                     pst, psymtab_include_list,
                                     includes_used, symnum * symbol_size,
-                                    (unrel_value > pst->raw_text_high ()
-                                     ? unrel_value : pst->raw_text_high ()),
+                                    unrel_value > pst->unrelocated_text_high ()
+                                    ? unrel_value
+                                    : pst->unrelocated_text_high (),
                                     dependency_list, dependencies_used,
                                     prev_textlow_not_set);
                    pst = (legacy_psymtab *) 0;
@@ -1427,8 +1428,8 @@ read_dbx_symtab (minimal_symbol_reader &reader,
                 function relative stabs, or the address of the function's
                 end for old style stabs.  */
              valu = unrelocated_addr (nlist.n_value + last_function_start);
-             if (pst->raw_text_high () == unrelocated_addr (0)
-                 || valu > pst->raw_text_high ())
+             if (pst->unrelocated_text_high () == unrelocated_addr (0)
+                 || valu > pst->unrelocated_text_high ())
                pst->set_text_high (valu);
              break;
            }
@@ -1682,7 +1683,7 @@ read_dbx_symtab (minimal_symbol_reader &reader,
                                          objfile);
                  if (minsym.minsym != NULL)
                    nlist.n_value
-                     = CORE_ADDR (minsym.minsym->value_raw_address ());
+                     = CORE_ADDR (minsym.minsym->unrelocated_address ());
                }
              if (pst && textlow_not_set
                  && gdbarch_sofun_address_maybe_missing (gdbarch))
@@ -1703,7 +1704,7 @@ read_dbx_symtab (minimal_symbol_reader &reader,
              if (pst
                  && (textlow_not_set
                      || (unrelocated_addr (nlist.n_value)
-                         < pst->raw_text_low ()
+                         < pst->unrelocated_text_low ()
                          && (nlist.n_value != 0))))
                {
                  pst->set_text_low (unrelocated_addr (nlist.n_value));
@@ -1741,7 +1742,7 @@ read_dbx_symtab (minimal_symbol_reader &reader,
                                          objfile);
                  if (minsym.minsym != NULL)
                    nlist.n_value
-                     = CORE_ADDR (minsym.minsym->value_raw_address ());
+                     = CORE_ADDR (minsym.minsym->unrelocated_address ());
                }
              if (pst && textlow_not_set
                  && gdbarch_sofun_address_maybe_missing (gdbarch))
@@ -1762,7 +1763,7 @@ read_dbx_symtab (minimal_symbol_reader &reader,
              if (pst
                  && (textlow_not_set
                      || (unrelocated_addr (nlist.n_value)
-                         < pst->raw_text_low ()
+                         < pst->unrelocated_text_low ()
                          && (nlist.n_value != 0))))
                {
                  pst->set_text_low (unrelocated_addr (nlist.n_value));
@@ -1957,8 +1958,8 @@ read_dbx_symtab (minimal_symbol_reader &reader,
       dbx_end_psymtab (objfile, partial_symtabs,
                       pst, psymtab_include_list, includes_used,
                       symnum * symbol_size,
-                      (text_end > pst->raw_text_high ()
-                       ? text_end : pst->raw_text_high ()),
+                      (text_end > pst->unrelocated_text_high ()
+                       ? text_end : pst->unrelocated_text_high ()),
                       dependency_list, dependencies_used, textlow_not_set);
     }
 }
@@ -2058,7 +2059,7 @@ dbx_end_psymtab (struct objfile *objfile, psymtab_storage *partial_symtabs,
 
       if (minsym.minsym)
        pst->set_text_high
-         (unrelocated_addr (CORE_ADDR (minsym.minsym->value_raw_address ())
+         (unrelocated_addr (CORE_ADDR (minsym.minsym->unrelocated_address ())
                             + minsym.minsym->size ()));
 
       last_function_name = NULL;
@@ -2068,7 +2069,7 @@ dbx_end_psymtab (struct objfile *objfile, psymtab_storage *partial_symtabs,
     ;
   /* This test will be true if the last .o file is only data.  */
   else if (textlow_not_set)
-    pst->set_text_low (pst->raw_text_high ());
+    pst->set_text_low (pst->unrelocated_text_high ());
   else
     {
       /* If we know our own starting text address, then walk through all other
@@ -2078,7 +2079,7 @@ dbx_end_psymtab (struct objfile *objfile, psymtab_storage *partial_symtabs,
 
       for (partial_symtab *p1 : partial_symtabs->range ())
        if (!p1->text_high_valid && p1->text_low_valid && p1 != pst)
-         p1->set_text_high (pst->raw_text_low ());
+         p1->set_text_high (pst->unrelocated_text_low ());
     }
 
   /* End of kludge for patching Solaris textlow and texthigh.  */
index 97cc9ba76608bd31fce4cbff506f44afa9b2ffcd..1b7aa22888cb6a897ebe3478d9b2b81c05338df7 100644 (file)
@@ -754,7 +754,7 @@ language_defn::read_var_value (struct symbol *var,
           a TLS variable. */
        if (obj_section == NULL
            || (obj_section->the_bfd_section->flags & SEC_THREAD_LOCAL) != 0)
-         addr = CORE_ADDR (bmsym.minsym->value_raw_address ());
+         addr = CORE_ADDR (bmsym.minsym->unrelocated_address ());
        else
          addr = bmsym.value_address ();
        if (overlay_debugging)
index 8faf482b09cd713c834a9b1c10beda4c7a09d8e2..697ce0b5b1a61c2412cbe4cf50b683e32f867fe8 100644 (file)
@@ -2659,7 +2659,7 @@ parse_partial_symbols (minimal_symbol_reader &reader,
        psymtab_language = prev_language;
       PST_PRIVATE (pst)->pst_language = psymtab_language;
 
-      pst->set_text_high (pst->raw_text_low ());
+      pst->set_text_high (pst->unrelocated_text_low ());
 
       /* For stabs-in-ecoff files, the second symbol must be @stab.
         This symbol is emitted by mips-tfile to signal that the
@@ -2726,9 +2726,9 @@ parse_partial_symbols (minimal_symbol_reader &reader,
                          /* Kludge for Irix 5.2 zero fh->adr.  */
                          if (!relocatable
                              && (!pst->text_low_valid
-                                 || procaddr < pst->raw_text_low ()))
+                                 || procaddr < pst->unrelocated_text_low ()))
                            pst->set_text_low (procaddr);
-                         if (high > pst->raw_text_high ())
+                         if (high > pst->unrelocated_text_high ())
                            pst->set_text_high (high);
                        }
                    }
@@ -3319,7 +3319,7 @@ parse_partial_symbols (minimal_symbol_reader &reader,
                    {
                      unrelocated_addr unrel_value
                        = unrelocated_addr (sh.value);
-                     if (unrel_value > save_pst->raw_text_high ())
+                     if (unrel_value > save_pst->unrelocated_text_high ())
                        save_pst->set_text_high (unrel_value);
                    }
                    continue;
@@ -3511,11 +3511,11 @@ parse_partial_symbols (minimal_symbol_reader &reader,
                  /* Kludge for Irix 5.2 zero fh->adr.  */
                  if (!relocatable
                      && (!pst->text_low_valid
-                         || procaddr < pst->raw_text_low ()))
+                         || procaddr < pst->unrelocated_text_low ()))
                    pst->set_text_low (procaddr);
 
                  high = unrelocated_addr (CORE_ADDR (procaddr) + sh.value);
-                 if (high > pst->raw_text_high ())
+                 if (high > pst->unrelocated_text_high ())
                    pst->set_text_high (high);
                  continue;
 
@@ -3696,7 +3696,7 @@ parse_partial_symbols (minimal_symbol_reader &reader,
       fdr_to_pst[f_idx].pst
        = dbx_end_psymtab (objfile, partial_symtabs, save_pst,
                           psymtab_include_list, includes_used,
-                          -1, save_pst->raw_text_high (),
+                          -1, save_pst->unrelocated_text_high (),
                           dependency_list, dependencies_used,
                           textlow_not_set);
       includes_used = 0;
index 67bd4903a3e5b4b11bc710dea1680dcd6d18c093..3fa07f47b9fc63b359d6395f5941d018a330c846 100644 (file)
@@ -796,14 +796,14 @@ lookup_minimal_symbol_by_pc_section (CORE_ADDR pc_in, struct obj_section *sectio
 
          unrelocated_addr unrel_pc;
          if (frob_address (objfile, pc, &unrel_pc)
-             && unrel_pc >= msymbol[lo].value_raw_address ())
+             && unrel_pc >= msymbol[lo].unrelocated_address ())
            {
-             while (msymbol[hi].value_raw_address () > unrel_pc)
+             while (msymbol[hi].unrelocated_address () > unrel_pc)
                {
                  /* pc is still strictly less than highest address.  */
                  /* Note "new" will always be >= lo.  */
                  newobj = (lo + hi) / 2;
-                 if ((msymbol[newobj].value_raw_address () >= unrel_pc)
+                 if ((msymbol[newobj].unrelocated_address () >= unrel_pc)
                      || (lo == newobj))
                    {
                      hi = newobj;
@@ -818,8 +818,8 @@ lookup_minimal_symbol_by_pc_section (CORE_ADDR pc_in, struct obj_section *sectio
                 hi to point to the last one.  That way we can find the
                 right symbol if it has an index greater than hi.  */
              while (hi < objfile->per_bfd->minimal_symbol_count - 1
-                    && (msymbol[hi].value_raw_address ()
-                        == msymbol[hi + 1].value_raw_address ()))
+                    && (msymbol[hi].unrelocated_address ()
+                        == msymbol[hi + 1].unrelocated_address ()))
                hi++;
 
              /* Skip various undesirable symbols.  */
@@ -866,8 +866,8 @@ lookup_minimal_symbol_by_pc_section (CORE_ADDR pc_in, struct obj_section *sectio
                      && msymbol[hi].type () != want_type
                      && msymbol[hi - 1].type () == want_type
                      && (msymbol[hi].size () == msymbol[hi - 1].size ())
-                     && (msymbol[hi].value_raw_address ()
-                         == msymbol[hi - 1].value_raw_address ())
+                     && (msymbol[hi].unrelocated_address ()
+                         == msymbol[hi - 1].unrelocated_address ())
                      && (msymbol[hi].obj_section (objfile)
                          == msymbol[hi - 1].obj_section (objfile)))
                    {
@@ -896,8 +896,8 @@ lookup_minimal_symbol_by_pc_section (CORE_ADDR pc_in, struct obj_section *sectio
                     the cancellable variants, but both have sizes.  */
                  if (hi > 0
                      && msymbol[hi].size () != 0
-                     && unrel_pc >= msymbol[hi].value_raw_end_address ()
-                     && unrel_pc < msymbol[hi - 1].value_raw_end_address ())
+                     && unrel_pc >= msymbol[hi].unrelocated_end_address ()
+                     && unrel_pc < msymbol[hi - 1].unrelocated_end_address ())
                    {
                      hi--;
                      continue;
@@ -926,7 +926,7 @@ lookup_minimal_symbol_by_pc_section (CORE_ADDR pc_in, struct obj_section *sectio
 
              if (hi >= 0
                  && msymbol[hi].size () != 0
-                 && unrel_pc >= msymbol[hi].value_raw_end_address ())
+                 && unrel_pc >= msymbol[hi].unrelocated_end_address ())
                {
                  if (best_zero_sized != -1)
                    hi = best_zero_sized;
@@ -937,8 +937,8 @@ lookup_minimal_symbol_by_pc_section (CORE_ADDR pc_in, struct obj_section *sectio
                      if (previous != nullptr)
                        {
                          if (previous->minsym == nullptr
-                             || (msymbol[hi].value_raw_address ()
-                                 > previous->minsym->value_raw_address ()))
+                             || (msymbol[hi].unrelocated_address ()
+                                 > previous->minsym->unrelocated_address ()))
                            {
                              previous->minsym = &msymbol[hi];
                              previous->objfile = objfile;
@@ -955,8 +955,8 @@ lookup_minimal_symbol_by_pc_section (CORE_ADDR pc_in, struct obj_section *sectio
 
              if (hi >= 0
                  && ((best_symbol == NULL) ||
-                     (best_symbol->value_raw_address () <
-                      msymbol[hi].value_raw_address ())))
+                     (best_symbol->unrelocated_address () <
+                      msymbol[hi].unrelocated_address ())))
                {
                  best_symbol = &msymbol[hi];
                  best_objfile = objfile;
@@ -1222,11 +1222,11 @@ static inline bool
 minimal_symbol_is_less_than (const minimal_symbol &fn1,
                             const minimal_symbol &fn2)
 {
-  if ((&fn1)->value_raw_address () < (&fn2)->value_raw_address ())
+  if ((&fn1)->unrelocated_address () < (&fn2)->unrelocated_address ())
     {
       return true;             /* addr 1 is less than addr 2.  */
     }
-  else if ((&fn1)->value_raw_address () > (&fn2)->value_raw_address ())
+  else if ((&fn1)->unrelocated_address () > (&fn2)->unrelocated_address ())
     {
       return false;            /* addr 1 is greater than addr 2.  */
     }
@@ -1286,8 +1286,8 @@ compact_minimal_symbols (struct minimal_symbol *msymbol, int mcount,
       copyfrom = copyto = msymbol;
       while (copyfrom < msymbol + mcount - 1)
        {
-         if (copyfrom->value_raw_address ()
-             == (copyfrom + 1)->value_raw_address ()
+         if (copyfrom->unrelocated_address ()
+             == (copyfrom + 1)->unrelocated_address ()
              && (copyfrom->section_index ()
                  == (copyfrom + 1)->section_index ())
              && strcmp (copyfrom->linkage_name (),
@@ -1593,8 +1593,8 @@ minimal_symbol_upper_bound (struct bound_minimal_symbol minsym)
   section = msymbol->section_index ();
   for (iter = msymbol + 1; iter != past_the_end; ++iter)
     {
-      if ((iter->value_raw_address ()
-          != msymbol->value_raw_address ())
+      if ((iter->unrelocated_address ()
+          != msymbol->unrelocated_address ())
          && iter->section_index () == section)
        break;
     }
index b86bf61f4d15b2edbb244b91f3c56172f94d61d1..7092b266db3cfbad3bec8c7aae127535eb105ff9 100644 (file)
@@ -436,13 +436,13 @@ mips_elf_make_msymbol_special (asymbol * sym, struct minimal_symbol *msym)
   if (ELF_ST_IS_MICROMIPS (st_other))
     {
       SET_MSYMBOL_TARGET_FLAG_MICROMIPS (msym);
-      CORE_ADDR fixed = CORE_ADDR (msym->value_raw_address ()) | 1;
+      CORE_ADDR fixed = CORE_ADDR (msym->unrelocated_address ()) | 1;
       msym->set_unrelocated_address (unrelocated_addr (fixed));
     }
   else if (ELF_ST_IS_MIPS16 (st_other))
     {
       SET_MSYMBOL_TARGET_FLAG_MIPS16 (msym);
-      CORE_ADDR fixed = CORE_ADDR (msym->value_raw_address ()) | 1;
+      CORE_ADDR fixed = CORE_ADDR (msym->unrelocated_address ()) | 1;
       msym->set_unrelocated_address (unrelocated_addr (fixed));
     }
 }
index 4bce63c58f70b3c6048f5f19065ecdea88411d77..c0c9fa0a4489b8bc6cbdc366679196fc36c298c1 100644 (file)
@@ -115,7 +115,7 @@ find_minsym_type_and_address (minimal_symbol *msymbol,
     {
       /* Addresses of TLS symbols are really offsets into a
         per-objfile/per-thread storage block.  */
-      addr = CORE_ADDR (bound_msym.minsym->value_raw_address ());
+      addr = CORE_ADDR (bound_msym.minsym->unrelocated_address ());
     }
   else if (msymbol_is_function (objfile, msymbol, &addr))
     {
index d4b3cce696fc54702f62e060c20c73e68871adf8..dd92e31d31b2f198a6d20a88fa8ebc5891822cf4 100644 (file)
@@ -1824,7 +1824,7 @@ info_address_command (const char *exp, int from_tty)
            if (section
                && (section->the_bfd_section->flags & SEC_THREAD_LOCAL) != 0)
              {
-               load_addr = CORE_ADDR (msym.minsym->value_raw_address ());
+               load_addr = CORE_ADDR (msym.minsym->unrelocated_address ());
                gdb_printf (_("a thread-local variable at offset %s "
                              "in the thread-local storage for `%s'"),
                            paddress (gdbarch, load_addr),
index 8f059dc5975ae8b9cb7c260b0e1e0d32bb03d848..17c45e9220a86fea103420a2504ff31b9f9c03fa 100644 (file)
@@ -173,14 +173,14 @@ struct partial_symtab
 
   /* Return the unrelocated low text address of this
      partial_symtab.  */
-  unrelocated_addr raw_text_low () const
+  unrelocated_addr unrelocated_text_low () const
   {
     return m_text_low;
   }
 
   /* Return the unrelocated_addr high text address of this
      partial_symtab.  */
-  unrelocated_addr raw_text_high () const
+  unrelocated_addr unrelocated_text_high () const
   {
     return m_text_high;
   }
index c74280761ddd0d6e3193775e893145bdef8652ea..64b67078641f325341ae8995ac9b366e8f0ce2e6 100644 (file)
@@ -1115,7 +1115,7 @@ partial_symtab::partial_symtab (const char *filename,
   : partial_symtab (filename, partial_symtabs, objfile_per_bfd)
 {
   set_text_low (textlow);
-  set_text_high (raw_text_low ()); /* default */
+  set_text_high (unrelocated_text_low ()); /* default */
 }
 
 /* Perform "finishing up" operations of a partial symtab.  */
@@ -1654,7 +1654,7 @@ maintenance_check_psymtabs (const char *ignore, int from_tty)
                      gdb_printf (" psymtab\n");
                    }
                }
-             if (ps->raw_text_high () != unrelocated_addr (0)
+             if (ps->unrelocated_text_high () != unrelocated_addr (0)
                  && (ps->text_low (objfile) < b->start ()
                      || ps->text_high (objfile) > b->end ()))
                {
index b6af8a15582948152fd1bd971d17d71bcb2f3401..09bee497fd6efbb09957fe8a509f5d7fd48bc5c6 100644 (file)
@@ -1515,7 +1515,7 @@ gdb_bfd_lookup_symbol_from_symtab
 
                  msym.set_value_address (symaddr);
                  gdbarch_elf_make_msymbol_special (gdbarch, sym, &msym);
-                 symaddr = CORE_ADDR (msym.value_raw_address ());
+                 symaddr = CORE_ADDR (msym.unrelocated_address ());
                }
 
              /* BFD symbols are section relative.  */
index 2483d317f325a53d21c03394ef081108c8805006..3d7fd5609564fdfbcd43993e391bebfdce851a89 100644 (file)
@@ -201,7 +201,7 @@ dump_msymbols (struct objfile *objfile, struct ui_file *outfile)
 
       /* Use the relocated address as shown in the symbol here -- do
         not try to respect copy relocations.  */
-      CORE_ADDR addr = (CORE_ADDR (msymbol->value_raw_address ())
+      CORE_ADDR addr = (CORE_ADDR (msymbol->unrelocated_address ())
                        + objfile->section_offsets[msymbol->section_index ()]);
       gdb_puts (paddress (gdbarch, addr), outfile);
       gdb_printf (outfile, " %s", msymbol->linkage_name ());
index ac6535fe9834fe7ec060c274c64625280d2a352e..42e7f5cd908c479703f2319b14e3610e6a8ef1cd 100644 (file)
@@ -424,7 +424,7 @@ minimal_symbol::value_address (objfile *objfile) const
   if (this->maybe_copied)
     return get_msymbol_address (objfile, this);
   else
-    return (CORE_ADDR (this->value_raw_address ())
+    return (CORE_ADDR (this->unrelocated_address ())
            + objfile->section_offsets[this->section_index ()]);
 }
 
index 826489c9cbc6fb0d52e0596b71bbc4f0f8e66afd..404d0ab30a8e2b645a78eb611142bed2b14900ee 100644 (file)
@@ -759,16 +759,16 @@ struct minimal_symbol : public general_symbol_info
   CORE_ADDR value_address () const = delete;
 
   /* The unrelocated address of the minimal symbol.  */
-  unrelocated_addr value_raw_address () const
+  unrelocated_addr unrelocated_address () const
   {
     return m_value.unrel_addr;
   }
 
   /* The unrelocated address just after the end of the the minimal
      symbol.  */
-  unrelocated_addr value_raw_end_address () const
+  unrelocated_addr unrelocated_end_address () const
   {
-    return unrelocated_addr (CORE_ADDR (value_raw_address ()) + size ());
+    return unrelocated_addr (CORE_ADDR (unrelocated_address ()) + size ());
   }
 
   /* Return this minimal symbol's type.  */
index 2a27bc3e8046fa488eca6daa2939d38fb47727eb..d71127b40f6772b9fbc02cdd7d4fa1064948d399 100644 (file)
@@ -2177,11 +2177,12 @@ scan_xcoff_symtab (minimal_symbol_reader &reader,
                          = unrelocated_addr (symbol.n_value
                                              + CSECT_LEN (&csect_aux));
 
-                       if (highval > pst->raw_text_high ())
+                       if (highval > pst->unrelocated_text_high ())
                          pst->set_text_high (highval);
                        unrelocated_addr loval
                          = unrelocated_addr (symbol.n_value);
-                       if (!pst->text_low_valid || loval < pst->raw_text_low ())
+                       if (!pst->text_low_valid
+                           || loval < pst->unrelocated_text_low ())
                          pst->set_text_low (loval);
                      }
                    misc_func_recorded = 0;