mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-23 01:53:38 +08:00
gdb: rename ext_lang_missing_debuginfo_result
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>
This commit is contained in:
parent
73d7312ff6
commit
629bcc68d7
@ -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);
|
||||
};
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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 ())
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user