mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-12-18 16:57:56 +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:
@@ -292,7 +292,7 @@ struct extension_language_ops
|
|||||||
/* Give extension languages a chance to deal with missing debug
|
/* Give extension languages a chance to deal with missing debug
|
||||||
information. OBJFILE is the file for which GDB was unable to find
|
information. OBJFILE is the file for which GDB was unable to find
|
||||||
any debug information. */
|
any debug information. */
|
||||||
ext_lang_missing_debuginfo_result
|
ext_lang_missing_file_result
|
||||||
(*handle_missing_debuginfo) (const struct extension_language_defn *,
|
(*handle_missing_debuginfo) (const struct extension_language_defn *,
|
||||||
struct objfile *objfile);
|
struct objfile *objfile);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1053,7 +1053,7 @@ ext_lang_print_insn (struct gdbarch *gdbarch, CORE_ADDR address,
|
|||||||
|
|
||||||
/* See extension.h. */
|
/* See extension.h. */
|
||||||
|
|
||||||
ext_lang_missing_debuginfo_result
|
ext_lang_missing_file_result
|
||||||
ext_lang_handle_missing_debuginfo (struct objfile *objfile)
|
ext_lang_handle_missing_debuginfo (struct objfile *objfile)
|
||||||
{
|
{
|
||||||
for (const struct extension_language_defn *extlang : extension_languages)
|
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
|
if (extlang->ops == nullptr
|
||||||
|| extlang->ops->handle_missing_debuginfo == nullptr)
|
|| extlang->ops->handle_missing_debuginfo == nullptr)
|
||||||
continue;
|
continue;
|
||||||
ext_lang_missing_debuginfo_result result
|
ext_lang_missing_file_result result
|
||||||
= extlang->ops->handle_missing_debuginfo (extlang, objfile);
|
= extlang->ops->handle_missing_debuginfo (extlang, objfile);
|
||||||
if (!result.filename ().empty () || result.try_again ())
|
if (!result.filename ().empty () || result.try_again ())
|
||||||
return result;
|
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
|
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
|
result, indication there is nothing the extension can do to provide the
|
||||||
missing debug information. */
|
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
|
/* Default result. The extension was unable to provide the missing debug
|
||||||
info. */
|
info. */
|
||||||
ext_lang_missing_debuginfo_result ()
|
ext_lang_missing_file_result ()
|
||||||
{ /* Nothing. */ }
|
{ /* Nothing. */ }
|
||||||
|
|
||||||
/* When TRY_AGAIN is true GDB should try searching again, the extension
|
/* When TRY_AGAIN is true GDB should try searching again, the extension
|
||||||
may have installed the missing debug info into a suitable location.
|
may have installed the missing debug info into a suitable location.
|
||||||
When TRY_AGAIN is false this is equivalent to the default, no
|
When TRY_AGAIN is false this is equivalent to the default, no
|
||||||
argument, constructor. */
|
argument, constructor. */
|
||||||
ext_lang_missing_debuginfo_result (bool try_again)
|
ext_lang_missing_file_result (bool try_again)
|
||||||
: m_try_again (try_again)
|
: m_try_again (try_again)
|
||||||
{ /* Nothing. */ }
|
{ /* Nothing. */ }
|
||||||
|
|
||||||
/* Look in FILENAME for the missing debug info. */
|
/* 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))
|
: m_filename (std::move (filename))
|
||||||
{ /* Nothing. */ }
|
{ /* Nothing. */ }
|
||||||
|
|
||||||
@@ -407,7 +407,7 @@ private:
|
|||||||
|
|
||||||
/* Called when GDB failed to find any debug information for OBJFILE. */
|
/* 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);
|
(struct objfile *objfile);
|
||||||
|
|
||||||
#if GDB_SELF_TEST
|
#if GDB_SELF_TEST
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ static std::optional<std::string> gdbpy_colorize
|
|||||||
(const std::string &filename, const std::string &contents);
|
(const std::string &filename, const std::string &contents);
|
||||||
static std::optional<std::string> gdbpy_colorize_disasm
|
static std::optional<std::string> gdbpy_colorize_disasm
|
||||||
(const std::string &content, gdbarch *gdbarch);
|
(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);
|
(const struct extension_language_defn *extlang, struct objfile *objfile);
|
||||||
|
|
||||||
/* The interface between gdb proper and loading of python scripts. */
|
/* 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
|
/* Implement the 'handle_missing_debuginfo' hook for Python. GDB has
|
||||||
failed to find any debug information for OBJFILE. The extension has a
|
failed to find any debug information for OBJFILE. The extension has a
|
||||||
chance to record this, or even install the required debug information.
|
chance to record this, or even install the required debug information.
|
||||||
See the description of ext_lang_missing_debuginfo_result in
|
See the description of ext_lang_missing_file_result in extension-priv.h
|
||||||
extension-priv.h for details of the return value. */
|
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,
|
gdbpy_handle_missing_debuginfo (const struct extension_language_defn *extlang,
|
||||||
struct objfile *objfile)
|
struct objfile *objfile)
|
||||||
{
|
{
|
||||||
@@ -1806,7 +1806,7 @@ gdbpy_handle_missing_debuginfo (const struct extension_language_defn *extlang,
|
|||||||
if (PyBool_Check (pyo_execute_ret.get ()))
|
if (PyBool_Check (pyo_execute_ret.get ()))
|
||||||
{
|
{
|
||||||
bool try_again = PyObject_IsTrue (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 ()))
|
if (!gdbpy_is_string (pyo_execute_ret.get ()))
|
||||||
@@ -1826,7 +1826,7 @@ gdbpy_handle_missing_debuginfo (const struct extension_language_defn *extlang,
|
|||||||
return {};
|
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
|
/* 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 user a system specific message that guides them to finding
|
||||||
the missing debug info. */
|
the missing debug info. */
|
||||||
|
|
||||||
ext_lang_missing_debuginfo_result ext_result
|
ext_lang_missing_file_result ext_result
|
||||||
= ext_lang_handle_missing_debuginfo (this);
|
= ext_lang_handle_missing_debuginfo (this);
|
||||||
if (!ext_result.filename ().empty ())
|
if (!ext_result.filename ().empty ())
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user