]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb: rename ext_lang_missing_debuginfo_result
authorAndrew Burgess <aburgess@redhat.com>
Wed, 31 Jul 2024 14:58:20 +0000 (15:58 +0100)
committerAndrew Burgess <aburgess@redhat.com>
Sun, 10 Nov 2024 10:18:22 +0000 (10:18 +0000)
In preparation for later commits in this series, rename
ext_lang_missing_debuginfo_result to ext_lang_missing_file_result.

A later commit will add additional Python APIs to handle different
types of missing files beyond just debuginfo.

This is just a rename commit, there should be no functional changes
after this commit.

Approved-By: Tom Tromey <tom@tromey.com>
gdb/extension-priv.h
gdb/extension.c
gdb/extension.h
gdb/python/python.c
gdb/symfile-debug.c

index 653fd51e2f11ec0053a2d3ebf55b58d3053e45f6..90810e4bbc8ce841eb8ed8d10a962f38924ea339 100644 (file)
@@ -292,7 +292,7 @@ struct extension_language_ops
   /* Give extension languages a chance to deal with missing debug
      information.  OBJFILE is the file for which GDB was unable to find
      any debug information.  */
-  ext_lang_missing_debuginfo_result
+  ext_lang_missing_file_result
     (*handle_missing_debuginfo) (const struct extension_language_defn *,
                                 struct objfile *objfile);
 };
index 897bf25dad4aeb89ad730af1467c119f7f3fedf1..15e1f11d6192fe442ad1d5a722e90599e0c8a2c3 100644 (file)
@@ -1053,7 +1053,7 @@ ext_lang_print_insn (struct gdbarch *gdbarch, CORE_ADDR address,
 
 /* See extension.h.  */
 
-ext_lang_missing_debuginfo_result
+ext_lang_missing_file_result
 ext_lang_handle_missing_debuginfo (struct objfile *objfile)
 {
   for (const struct extension_language_defn *extlang : extension_languages)
@@ -1061,7 +1061,7 @@ ext_lang_handle_missing_debuginfo (struct objfile *objfile)
       if (extlang->ops == nullptr
          || extlang->ops->handle_missing_debuginfo == nullptr)
        continue;
-      ext_lang_missing_debuginfo_result result
+      ext_lang_missing_file_result result
        = extlang->ops->handle_missing_debuginfo (extlang, objfile);
       if (!result.filename ().empty () || result.try_again ())
        return result;
index 5b0830b667510275fa04cae95462e832f3dde878..2a7491615084c045eb0322c37a04b879b43fac19 100644 (file)
@@ -361,23 +361,23 @@ extern std::optional<int> ext_lang_print_insn
    it.  And the third option is for the extension to just return a null
    result, indication there is nothing the extension can do to provide the
    missing debug information.  */
-struct ext_lang_missing_debuginfo_result
+struct ext_lang_missing_file_result
 {
   /* Default result.  The extension was unable to provide the missing debug
      info.  */
-  ext_lang_missing_debuginfo_result ()
+  ext_lang_missing_file_result ()
   { /* Nothing.  */ }
 
   /* When TRY_AGAIN is true GDB should try searching again, the extension
      may have installed the missing debug info into a suitable location.
      When TRY_AGAIN is false this is equivalent to the default, no
      argument, constructor.  */
-  ext_lang_missing_debuginfo_result (bool try_again)
+  ext_lang_missing_file_result (bool try_again)
     : m_try_again (try_again)
   { /* Nothing.  */ }
 
   /* Look in FILENAME for the missing debug info.  */
-  ext_lang_missing_debuginfo_result (std::string &&filename)
+  ext_lang_missing_file_result (std::string &&filename)
     : m_filename (std::move (filename))
   { /* Nothing.  */ }
 
@@ -407,7 +407,7 @@ private:
 
 /* Called when GDB failed to find any debug information for OBJFILE.  */
 
-extern ext_lang_missing_debuginfo_result ext_lang_handle_missing_debuginfo
+extern ext_lang_missing_file_result ext_lang_handle_missing_debuginfo
   (struct objfile *objfile);
 
 #if GDB_SELF_TEST
index cc06526ffcfa652de03f450fbad956d91b5debe8..cceb7aa01c3edcad2899160c1fdd664991242f35 100644 (file)
@@ -128,7 +128,7 @@ static std::optional<std::string> gdbpy_colorize
   (const std::string &filename, const std::string &contents);
 static std::optional<std::string> gdbpy_colorize_disasm
 (const std::string &content, gdbarch *gdbarch);
-static ext_lang_missing_debuginfo_result gdbpy_handle_missing_debuginfo
+static ext_lang_missing_file_result gdbpy_handle_missing_debuginfo
   (const struct extension_language_defn *extlang, struct objfile *objfile);
 
 /* The interface between gdb proper and loading of python scripts.  */
@@ -1755,10 +1755,10 @@ gdbpy_get_current_objfile (PyObject *unused1, PyObject *unused2)
 /* Implement the 'handle_missing_debuginfo' hook for Python.  GDB has
    failed to find any debug information for OBJFILE.  The extension has a
    chance to record this, or even install the required debug information.
-   See the description of ext_lang_missing_debuginfo_result in
-   extension-priv.h for details of the return value.  */
+   See the description of ext_lang_missing_file_result in extension-priv.h
+   for details of the return value.  */
 
-static ext_lang_missing_debuginfo_result
+static ext_lang_missing_file_result
 gdbpy_handle_missing_debuginfo (const struct extension_language_defn *extlang,
                                struct objfile *objfile)
 {
@@ -1806,7 +1806,7 @@ gdbpy_handle_missing_debuginfo (const struct extension_language_defn *extlang,
   if (PyBool_Check (pyo_execute_ret.get ()))
     {
       bool try_again = PyObject_IsTrue (pyo_execute_ret.get ());
-      return ext_lang_missing_debuginfo_result (try_again);
+      return ext_lang_missing_file_result (try_again);
     }
 
   if (!gdbpy_is_string (pyo_execute_ret.get ()))
@@ -1826,7 +1826,7 @@ gdbpy_handle_missing_debuginfo (const struct extension_language_defn *extlang,
       return {};
     }
 
-  return ext_lang_missing_debuginfo_result (std::string (filename.get ()));
+  return ext_lang_missing_file_result (std::string (filename.get ()));
 }
 
 /* Compute the list of active python type printers and store them in
index 6bf8dc3cd821d4ef9ffd5509f669c2b64d9aaaa7..b21a5a433f3492e4f55c812abdf15e7c8349607d 100644 (file)
@@ -630,7 +630,7 @@ objfile::find_and_add_separate_symbol_file (symfile_add_flags symfile_flags)
             the user a system specific message that guides them to finding
             the missing debug info.  */
 
-         ext_lang_missing_debuginfo_result ext_result
+         ext_lang_missing_file_result ext_result
            = ext_lang_handle_missing_debuginfo (this);
          if (!ext_result.filename ().empty ())
            {