Accepting request 1093460 from home:tomdevries:branches:devel:gcc:gdb-13-1-upgrade
gdb 13.2 update OBS-URL: https://build.opensuse.org/request/show/1093460 OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gdb?expand=0&rev=358
This commit is contained in:
@@ -21,7 +21,7 @@ diff --git a/bfd/libbfd-in.h b/bfd/libbfd-in.h
|
||||
diff --git a/bfd/libbfd.h b/bfd/libbfd.h
|
||||
--- a/bfd/libbfd.h
|
||||
+++ b/bfd/libbfd.h
|
||||
@@ -120,7 +120,7 @@ static inline char *
|
||||
@@ -121,7 +121,7 @@ static inline char *
|
||||
bfd_strdup (const char *str)
|
||||
{
|
||||
size_t len = strlen (str) + 1;
|
||||
@@ -59,8 +59,8 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||
+show_build_id_verbose (struct ui_file *file, int from_tty,
|
||||
+ struct cmd_list_element *c, const char *value)
|
||||
+{
|
||||
+ fprintf_filtered (file, _("Verbosity level of the build-id locator is %s.\n"),
|
||||
+ value);
|
||||
+ gdb_printf (file, _("Verbosity level of the build-id locator is %s.\n"),
|
||||
+ value);
|
||||
+}
|
||||
+/* Locate NT_GNU_BUILD_ID and return its matching debug filename.
|
||||
+ FIXME: NOTE decoding should be unified with the BFD core notes decoding. */
|
||||
@@ -517,9 +517,9 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||
+
|
||||
if (separate_debug_file_debug)
|
||||
{
|
||||
- fprintf_unfiltered (gdb_stdlog, _(" Trying %s..."), link.c_str ());
|
||||
- gdb_printf (gdb_stdlog, _(" Trying %s..."), link.c_str ());
|
||||
- gdb_flush (gdb_stdlog);
|
||||
+ fprintf_unfiltered (gdb_stdlog, _(" Trying %s..."), orig_link.c_str ());
|
||||
+ gdb_printf (gdb_stdlog, _(" Trying %s..."), orig_link.c_str ());
|
||||
+ gdb_flush (gdb_stdout);
|
||||
}
|
||||
|
||||
@@ -539,8 +539,8 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||
- if (filename == NULL)
|
||||
- {
|
||||
- if (separate_debug_file_debug)
|
||||
- fprintf_unfiltered (gdb_stdlog,
|
||||
- _(" no, unable to compute real path\n"));
|
||||
- gdb_printf (gdb_stdlog,
|
||||
- _(" no, unable to compute real path\n"));
|
||||
+ if (seqno > 0)
|
||||
+ {
|
||||
+ /* There can be multiple build-id symlinks pointing to real files
|
||||
@@ -559,7 +559,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||
- if (debug_bfd == NULL)
|
||||
- {
|
||||
- if (separate_debug_file_debug)
|
||||
- fprintf_unfiltered (gdb_stdlog, _(" no, unable to open.\n"));
|
||||
- gdb_printf (gdb_stdlog, _(" no, unable to open.\n"));
|
||||
+ struct stat statbuf_trash;
|
||||
+
|
||||
+ /* `access' automatically dereferences LINK. */
|
||||
@@ -583,7 +583,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||
+ if (filename == NULL)
|
||||
+ {
|
||||
+ if (separate_debug_file_debug)
|
||||
+ fprintf_unfiltered (gdb_stdlog,
|
||||
+ gdb_printf (gdb_stdlog,
|
||||
+ _(" no, unable to compute real path\n"));
|
||||
+
|
||||
+ continue;
|
||||
@@ -595,7 +595,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||
+ if (debug_bfd == NULL)
|
||||
+ {
|
||||
+ if (separate_debug_file_debug)
|
||||
+ fprintf_unfiltered (gdb_stdlog, _(" no, unable to open.\n"));
|
||||
+ gdb_printf (gdb_stdlog, _(" no, unable to open.\n"));
|
||||
|
||||
- return {};
|
||||
+ continue;
|
||||
@@ -604,8 +604,8 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||
+ if (!build_id_verify (debug_bfd.get(), build_id_len, build_id))
|
||||
+ {
|
||||
+ if (separate_debug_file_debug)
|
||||
+ fprintf_unfiltered (gdb_stdlog,
|
||||
+ _(" no, build-id does not match.\n"));
|
||||
+ gdb_printf (gdb_stdlog,
|
||||
+ _(" no, build-id does not match.\n"));
|
||||
+
|
||||
+ continue;
|
||||
+ }
|
||||
@@ -620,8 +620,8 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||
+ if (ret_bfd != NULL)
|
||||
{
|
||||
if (separate_debug_file_debug)
|
||||
- fprintf_unfiltered (gdb_stdlog, _(" no, build-id does not match.\n"));
|
||||
+ fprintf_unfiltered (gdb_stdlog, _(" yes!\n"));
|
||||
- gdb_printf (gdb_stdlog, _(" no, build-id does not match.\n"));
|
||||
+ gdb_printf (gdb_stdlog, _(" yes!\n"));
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
@@ -646,7 +646,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||
}
|
||||
|
||||
- if (separate_debug_file_debug)
|
||||
- fprintf_unfiltered (gdb_stdlog, _(" yes!\n"));
|
||||
- gdb_printf (gdb_stdlog, _(" yes!\n"));
|
||||
+ if (link_return != NULL)
|
||||
+ {
|
||||
+ if (ret_bfd != NULL)
|
||||
@@ -694,17 +694,16 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||
if (debug_bfd != NULL)
|
||||
return debug_bfd;
|
||||
|
||||
@@ -174,7 +678,8 @@ build_id_to_bfd_suffix (size_t build_id_len, const bfd_byte *build_id,
|
||||
@@ -174,7 +678,7 @@ build_id_to_bfd_suffix (size_t build_id_len, const bfd_byte *build_id,
|
||||
if (!gdb_sysroot.empty ())
|
||||
{
|
||||
link = gdb_sysroot + link;
|
||||
- debug_bfd = build_id_to_debug_bfd_1 (link, build_id_len, build_id);
|
||||
+ debug_bfd = build_id_to_debug_bfd_1 (link, build_id_len, build_id,
|
||||
+ link_return);
|
||||
+ debug_bfd = build_id_to_debug_bfd_1 (link, build_id_len, build_id, NULL);
|
||||
if (debug_bfd != NULL)
|
||||
return debug_bfd;
|
||||
}
|
||||
@@ -183,30 +688,649 @@ build_id_to_bfd_suffix (size_t build_id_len, const bfd_byte *build_id,
|
||||
@@ -183,30 +687,655 @@ build_id_to_bfd_suffix (size_t build_id_len, const bfd_byte *build_id,
|
||||
return {};
|
||||
}
|
||||
|
||||
@@ -1095,20 +1094,26 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||
+ debug_flush_missing -> missing_rpm_list_print ...
|
||||
+
|
||||
+ For this reason, we make sure MISSING_RPM_LIST_ENTRIES is zero
|
||||
+ *before* calling any print function. */
|
||||
+ *before* calling any print function.
|
||||
+
|
||||
+ Note: kevinb/2023-02-22: The code below used to call
|
||||
+ puts_unfiltered() and printf_unfiltered(), but calls to these
|
||||
+ functions have been replaced by calls to gdb_printf(). The call
|
||||
+ chain shown above (probably) used to be the case at one time and
|
||||
+ hopefully something similar is still the case now that
|
||||
+ gdb_printf() is being used instead. */
|
||||
+ missing_rpm_list_entries = 0;
|
||||
+
|
||||
+ printf_unfiltered (_("Missing separate debuginfos, use: %s"),
|
||||
+ gdb_printf (_("Missing separate debuginfos, use: %s"),
|
||||
+#ifdef DNF_DEBUGINFO_INSTALL
|
||||
+ "dnf "
|
||||
+#endif
|
||||
+ "debuginfo-install");
|
||||
+ for (const char *el : array)
|
||||
+ {
|
||||
+ puts_unfiltered (" ");
|
||||
+ puts_unfiltered (el);
|
||||
+ gdb_printf (" %s", el);
|
||||
+ }
|
||||
+ puts_unfiltered ("\n");
|
||||
+ gdb_printf ("\n");
|
||||
+
|
||||
+ while (missing_rpm_list != NULL)
|
||||
+ {
|
||||
@@ -1307,10 +1312,10 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||
+ /* We do not collect and flush these messages as each such message
|
||||
+ already requires its own separate lines. */
|
||||
+
|
||||
+ fprintf_unfiltered (gdb_stdlog,
|
||||
+ _("Missing separate debuginfo for %s\n"), binary);
|
||||
+ gdb_printf (gdb_stdlog,
|
||||
+ _("Missing separate debuginfo for %s\n"), binary);
|
||||
+ if (debug != NULL)
|
||||
+ fprintf_unfiltered (gdb_stdlog, _("Try: %s %s\n"),
|
||||
+ gdb_printf (gdb_stdlog, _("Try: %s %s\n"),
|
||||
+#ifdef DNF_DEBUGINFO_INSTALL
|
||||
+ "dnf"
|
||||
+#else
|
||||
@@ -1352,17 +1357,17 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||
{
|
||||
const struct bfd_build_id *build_id;
|
||||
|
||||
- build_id = build_id_bfd_get (objfile->obfd);
|
||||
- build_id = build_id_bfd_get (objfile->obfd.get ());
|
||||
+ if (build_id_filename_return)
|
||||
+ *build_id_filename_return = NULL;
|
||||
+
|
||||
+ build_id = build_id_bfd_shdr_get (objfile->obfd);
|
||||
+ build_id = build_id_bfd_shdr_get (objfile->obfd.get ());
|
||||
if (build_id != NULL)
|
||||
{
|
||||
if (separate_debug_file_debug)
|
||||
@@ -214,8 +1338,21 @@ find_separate_debug_file_by_buildid (struct objfile *objfile)
|
||||
_("\nLooking for separate debug info (build-id) for "
|
||||
"%s\n"), objfile_name (objfile));
|
||||
@@ -214,8 +1343,21 @@ find_separate_debug_file_by_buildid (struct objfile *objfile)
|
||||
_("\nLooking for separate debug info (build-id) for "
|
||||
"%s\n"), objfile_name (objfile));
|
||||
|
||||
+ char *build_id_filename_cstr = NULL;
|
||||
gdb_bfd_ref_ptr abfd (build_id_to_debug_bfd (build_id->size,
|
||||
@@ -1383,7 +1388,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
|
||||
/* Prevent looping on a stripped .debug file. */
|
||||
if (abfd != NULL
|
||||
&& filename_cmp (bfd_get_filename (abfd.get ()),
|
||||
@@ -228,3 +1365,22 @@ find_separate_debug_file_by_buildid (struct objfile *objfile)
|
||||
@@ -228,3 +1370,22 @@ find_separate_debug_file_by_buildid (struct objfile *objfile)
|
||||
|
||||
return std::string ();
|
||||
}
|
||||
@@ -1456,7 +1461,7 @@ diff --git a/gdb/build-id.h b/gdb/build-id.h
|
||||
diff --git a/gdb/coffread.c b/gdb/coffread.c
|
||||
--- a/gdb/coffread.c
|
||||
+++ b/gdb/coffread.c
|
||||
@@ -710,7 +710,8 @@ coff_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags)
|
||||
@@ -734,7 +734,8 @@ coff_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags)
|
||||
/* Try to add separate debug file if no symbols table found. */
|
||||
if (!objfile->has_partial_symbols ())
|
||||
{
|
||||
@@ -1480,7 +1485,7 @@ diff --git a/gdb/corelow.c b/gdb/corelow.c
|
||||
#include "inferior.h"
|
||||
#include "infrun.h"
|
||||
#include "symtab.h"
|
||||
@@ -356,6 +360,8 @@ add_to_thread_list (asection *asect, asection *reg_sect)
|
||||
@@ -391,6 +395,8 @@ add_to_thread_list (asection *asect, asection *reg_sect)
|
||||
switch_to_thread (thr); /* Yes, make it current. */
|
||||
}
|
||||
|
||||
@@ -1489,7 +1494,7 @@ diff --git a/gdb/corelow.c b/gdb/corelow.c
|
||||
/* Issue a message saying we have no core to debug, if FROM_TTY. */
|
||||
|
||||
static void
|
||||
@@ -392,19 +398,26 @@ core_file_command (const char *filename, int from_tty)
|
||||
@@ -427,12 +433,14 @@ core_file_command (const char *filename, int from_tty)
|
||||
static void
|
||||
locate_exec_from_corefile_build_id (bfd *abfd, int from_tty)
|
||||
{
|
||||
@@ -1504,8 +1509,9 @@ diff --git a/gdb/corelow.c b/gdb/corelow.c
|
||||
+ = build_id_to_exec_bfd (build_id->size, build_id->data,
|
||||
+ &build_id_filename);
|
||||
|
||||
if (execbfd != nullptr)
|
||||
if (execbfd == nullptr)
|
||||
{
|
||||
@@ -460,7 +468,12 @@ locate_exec_from_corefile_build_id (bfd *abfd, int from_tty)
|
||||
exec_file_attach (bfd_get_filename (execbfd.get ()), from_tty);
|
||||
symbol_file_add_main (bfd_get_filename (execbfd.get ()),
|
||||
symfile_add_flag (from_tty ? SYMFILE_VERBOSE : 0));
|
||||
@@ -1518,7 +1524,7 @@ diff --git a/gdb/corelow.c b/gdb/corelow.c
|
||||
}
|
||||
|
||||
/* See gdbcore.h. */
|
||||
@@ -1209,4 +1222,11 @@ _initialize_corelow ()
|
||||
@@ -1325,4 +1338,11 @@ _initialize_corelow ()
|
||||
maintenance_print_core_file_backed_mappings,
|
||||
_("Print core file's file-backed mappings."),
|
||||
&maintenanceprintlist);
|
||||
@@ -1533,7 +1539,7 @@ diff --git a/gdb/corelow.c b/gdb/corelow.c
|
||||
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
|
||||
--- a/gdb/doc/gdb.texinfo
|
||||
+++ b/gdb/doc/gdb.texinfo
|
||||
@@ -21524,6 +21524,27 @@ information files.
|
||||
@@ -22037,6 +22037,27 @@ information files.
|
||||
|
||||
@end table
|
||||
|
||||
@@ -1564,16 +1570,16 @@ diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
|
||||
diff --git a/gdb/dwarf2/index-cache.c b/gdb/dwarf2/index-cache.c
|
||||
--- a/gdb/dwarf2/index-cache.c
|
||||
+++ b/gdb/dwarf2/index-cache.c
|
||||
@@ -97,7 +97,7 @@ index_cache::store (dwarf2_per_objfile *per_objfile)
|
||||
@@ -101,7 +101,7 @@ index_cache::store (dwarf2_per_objfile *per_objfile)
|
||||
return;
|
||||
|
||||
/* Get build id of objfile. */
|
||||
- const bfd_build_id *build_id = build_id_bfd_get (obj->obfd);
|
||||
+ const bfd_build_id *build_id = build_id_bfd_shdr_get (obj->obfd);
|
||||
- const bfd_build_id *build_id = build_id_bfd_get (obj->obfd.get ());
|
||||
+ const bfd_build_id *build_id = build_id_bfd_shdr_get (obj->obfd.get ());
|
||||
if (build_id == nullptr)
|
||||
{
|
||||
index_cache_debug ("objfile %s has no build id",
|
||||
@@ -114,7 +114,8 @@ index_cache::store (dwarf2_per_objfile *per_objfile)
|
||||
@@ -118,7 +118,8 @@ index_cache::store (dwarf2_per_objfile *per_objfile)
|
||||
|
||||
if (dwz != nullptr)
|
||||
{
|
||||
@@ -1586,16 +1592,16 @@ diff --git a/gdb/dwarf2/index-cache.c b/gdb/dwarf2/index-cache.c
|
||||
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
|
||||
--- a/gdb/dwarf2/read.c
|
||||
+++ b/gdb/dwarf2/read.c
|
||||
@@ -5476,7 +5476,7 @@ get_gdb_index_contents_from_section (objfile *obj, T *section_owner)
|
||||
@@ -5328,7 +5328,7 @@ get_gdb_index_contents_from_section (objfile *obj, T *section_owner)
|
||||
static gdb::array_view<const gdb_byte>
|
||||
get_gdb_index_contents_from_cache (objfile *obj, dwarf2_per_bfd *dwarf2_per_bfd)
|
||||
{
|
||||
- const bfd_build_id *build_id = build_id_bfd_get (obj->obfd);
|
||||
+ const bfd_build_id *build_id = build_id_bfd_shdr_get (obj->obfd);
|
||||
- const bfd_build_id *build_id = build_id_bfd_get (obj->obfd.get ());
|
||||
+ const bfd_build_id *build_id = build_id_bfd_shdr_get (obj->obfd.get ());
|
||||
if (build_id == nullptr)
|
||||
return {};
|
||||
|
||||
@@ -5489,7 +5489,7 @@ get_gdb_index_contents_from_cache (objfile *obj, dwarf2_per_bfd *dwarf2_per_bfd)
|
||||
@@ -5341,7 +5341,7 @@ get_gdb_index_contents_from_cache (objfile *obj, dwarf2_per_bfd *dwarf2_per_bfd)
|
||||
static gdb::array_view<const gdb_byte>
|
||||
get_gdb_index_contents_from_cache_dwz (objfile *obj, dwz_file *dwz)
|
||||
{
|
||||
@@ -1607,7 +1613,7 @@ diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
|
||||
diff --git a/gdb/elfread.c b/gdb/elfread.c
|
||||
--- a/gdb/elfread.c
|
||||
+++ b/gdb/elfread.c
|
||||
@@ -1270,7 +1270,9 @@ elf_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags)
|
||||
@@ -1213,7 +1213,9 @@ elf_symfile_read_dwarf2 (struct objfile *objfile,
|
||||
&& objfile->separate_debug_objfile == NULL
|
||||
&& objfile->separate_debug_objfile_backlink == NULL)
|
||||
{
|
||||
@@ -1618,21 +1624,22 @@ diff --git a/gdb/elfread.c b/gdb/elfread.c
|
||||
|
||||
if (debugfile.empty ())
|
||||
debugfile = find_separate_debug_file_by_debuglink (objfile);
|
||||
@@ -1285,7 +1287,7 @@ elf_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags)
|
||||
else
|
||||
@@ -1229,7 +1231,7 @@ elf_symfile_read_dwarf2 (struct objfile *objfile,
|
||||
{
|
||||
has_dwarf2 = false;
|
||||
- const struct bfd_build_id *build_id = build_id_bfd_get (objfile->obfd);
|
||||
+ const struct bfd_build_id *build_id = build_id_bfd_shdr_get (objfile->obfd);
|
||||
const struct bfd_build_id *build_id
|
||||
- = build_id_bfd_get (objfile->obfd.get ());
|
||||
+ = build_id_bfd_shdr_get (objfile->obfd.get ());
|
||||
const char *filename = bfd_get_filename (objfile->obfd.get ());
|
||||
|
||||
if (build_id != nullptr)
|
||||
{
|
||||
@@ -1310,6 +1312,10 @@ elf_symfile_read (struct objfile *objfile, symfile_add_flags symfile_flags)
|
||||
@@ -1256,6 +1258,11 @@ elf_symfile_read_dwarf2 (struct objfile *objfile,
|
||||
has_dwarf2 = true;
|
||||
}
|
||||
}
|
||||
+ /* Check if any separate debug info has been extracted out. */
|
||||
+ else if (bfd_get_section_by_name (objfile->obfd, ".gnu_debuglink")
|
||||
+ else if (bfd_get_section_by_name (objfile->obfd.get (),
|
||||
+ ".gnu_debuglink")
|
||||
+ != NULL)
|
||||
+ debug_print_missing (objfile_name (objfile), build_id_filename.get ());
|
||||
}
|
||||
@@ -1641,7 +1648,7 @@ diff --git a/gdb/elfread.c b/gdb/elfread.c
|
||||
diff --git a/gdb/exec.c b/gdb/exec.c
|
||||
--- a/gdb/exec.c
|
||||
+++ b/gdb/exec.c
|
||||
@@ -238,7 +238,7 @@ validate_exec_file (int from_tty)
|
||||
@@ -237,7 +237,7 @@ validate_exec_file (int from_tty)
|
||||
current_exec_file = get_exec_file (0);
|
||||
|
||||
const bfd_build_id *exec_file_build_id
|
||||
@@ -1650,7 +1657,7 @@ diff --git a/gdb/exec.c b/gdb/exec.c
|
||||
if (exec_file_build_id != nullptr)
|
||||
{
|
||||
/* Prepend the target prefix, to force gdb_bfd_open to open the
|
||||
@@ -251,7 +251,7 @@ validate_exec_file (int from_tty)
|
||||
@@ -250,7 +250,7 @@ validate_exec_file (int from_tty)
|
||||
if (abfd != nullptr)
|
||||
{
|
||||
const bfd_build_id *target_exec_file_build_id
|
||||
@@ -1662,7 +1669,7 @@ diff --git a/gdb/exec.c b/gdb/exec.c
|
||||
diff --git a/gdb/objfiles.h b/gdb/objfiles.h
|
||||
--- a/gdb/objfiles.h
|
||||
+++ b/gdb/objfiles.h
|
||||
@@ -769,6 +769,10 @@ struct objfile
|
||||
@@ -786,6 +786,10 @@ struct objfile
|
||||
bool skip_jit_symbol_lookup = false;
|
||||
};
|
||||
|
||||
@@ -1676,24 +1683,24 @@ diff --git a/gdb/objfiles.h b/gdb/objfiles.h
|
||||
diff --git a/gdb/python/py-objfile.c b/gdb/python/py-objfile.c
|
||||
--- a/gdb/python/py-objfile.c
|
||||
+++ b/gdb/python/py-objfile.c
|
||||
@@ -132,7 +132,7 @@ objfpy_get_build_id (PyObject *self, void *closure)
|
||||
@@ -158,7 +158,7 @@ objfpy_get_build_id (PyObject *self, void *closure)
|
||||
|
||||
try
|
||||
{
|
||||
- build_id = build_id_bfd_get (objfile->obfd);
|
||||
+ build_id = build_id_bfd_shdr_get (objfile->obfd);
|
||||
- build_id = build_id_bfd_get (objfile->obfd.get ());
|
||||
+ build_id = build_id_bfd_shdr_get (objfile->obfd.get ());
|
||||
}
|
||||
catch (const gdb_exception &except)
|
||||
{
|
||||
@@ -600,7 +600,7 @@ objfpy_lookup_objfile_by_build_id (const char *build_id)
|
||||
/* Don't return separate debug files. */
|
||||
if (objfile->separate_debug_objfile_backlink != NULL)
|
||||
continue;
|
||||
- obfd_build_id = build_id_bfd_get (objfile->obfd);
|
||||
+ obfd_build_id = build_id_bfd_shdr_get (objfile->obfd);
|
||||
if (obfd_build_id == NULL)
|
||||
continue;
|
||||
if (objfpy_build_id_matches (obfd_build_id, build_id))
|
||||
@@ -629,7 +629,7 @@ gdbpy_lookup_objfile (PyObject *self, PyObject *args, PyObject *kw)
|
||||
if (obfd == nullptr)
|
||||
return 0;
|
||||
|
||||
- const bfd_build_id *obfd_build_id = build_id_bfd_get (obfd);
|
||||
+ const bfd_build_id *obfd_build_id = build_id_bfd_shdr_get (obfd);
|
||||
if (obfd_build_id == nullptr)
|
||||
return 0;
|
||||
|
||||
diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
|
||||
--- a/gdb/solib-svr4.c
|
||||
+++ b/gdb/solib-svr4.c
|
||||
@@ -1703,9 +1710,9 @@ diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
|
||||
#include "probe.h"
|
||||
+#include "build-id.h"
|
||||
|
||||
static struct link_map_offsets *svr4_fetch_link_map_offsets (void);
|
||||
static int svr4_have_link_map_offsets (void);
|
||||
@@ -1248,9 +1249,51 @@ svr4_read_so_list (svr4_info *info, CORE_ADDR lm, CORE_ADDR prev_lm,
|
||||
#include <map>
|
||||
|
||||
@@ -1319,9 +1320,51 @@ svr4_read_so_list (svr4_info *info, CORE_ADDR lm, CORE_ADDR prev_lm,
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1763,19 +1770,19 @@ diff --git a/gdb/solib-svr4.c b/gdb/solib-svr4.c
|
||||
diff --git a/gdb/source.c b/gdb/source.c
|
||||
--- a/gdb/source.c
|
||||
+++ b/gdb/source.c
|
||||
@@ -1199,7 +1199,7 @@ open_source_file (struct symtab *s)
|
||||
srcpath += s->filename;
|
||||
@@ -1196,7 +1196,7 @@ open_source_file (struct symtab *s)
|
||||
}
|
||||
|
||||
- const struct bfd_build_id *build_id = build_id_bfd_get (ofp->obfd);
|
||||
+ const struct bfd_build_id *build_id = build_id_bfd_shdr_get (ofp->obfd);
|
||||
const struct bfd_build_id *build_id
|
||||
- = build_id_bfd_get (ofp->obfd.get ());
|
||||
+ = build_id_bfd_shdr_get (ofp->obfd.get ());
|
||||
|
||||
/* Query debuginfod for the source file. */
|
||||
if (build_id != nullptr && !srcpath.empty ())
|
||||
diff --git a/gdb/symfile.h b/gdb/symfile.h
|
||||
--- a/gdb/symfile.h
|
||||
+++ b/gdb/symfile.h
|
||||
@@ -332,12 +332,18 @@ bool expand_symtabs_matching
|
||||
@@ -342,12 +342,18 @@ bool expand_symtabs_matching
|
||||
void map_symbol_filenames (gdb::function_view<symbol_filename_ftype> fun,
|
||||
bool need_fullname);
|
||||
|
||||
@@ -1797,7 +1804,7 @@ diff --git a/gdb/symfile.h b/gdb/symfile.h
|
||||
diff --git a/gdb/testsuite/gdb.base/corefile.exp b/gdb/testsuite/gdb.base/corefile.exp
|
||||
--- a/gdb/testsuite/gdb.base/corefile.exp
|
||||
+++ b/gdb/testsuite/gdb.base/corefile.exp
|
||||
@@ -343,3 +343,33 @@ gdb_test_multiple "core-file $corefile" $test {
|
||||
@@ -349,3 +349,33 @@ gdb_test_multiple "core-file $corefile" $test {
|
||||
pass $test
|
||||
}
|
||||
}
|
||||
@@ -1858,17 +1865,17 @@ diff --git a/gdb/testsuite/gdb.base/new-ui-pending-input.exp b/gdb/testsuite/gdb
|
||||
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
|
||||
--- a/gdb/testsuite/lib/gdb.exp
|
||||
+++ b/gdb/testsuite/lib/gdb.exp
|
||||
@@ -141,7 +141,8 @@ if ![info exists INTERNAL_GDBFLAGS] {
|
||||
@@ -217,7 +217,8 @@ if ![info exists INTERNAL_GDBFLAGS] {
|
||||
"-nw" \
|
||||
"-nx" \
|
||||
"-data-directory $BUILD_DATA_DIRECTORY" \
|
||||
{-iex "set height 0"} \
|
||||
- {-iex "set width 0"}]]
|
||||
+ {-iex "set width 0"} \
|
||||
+ {-iex "set build-id-verbose 0"}]]
|
||||
}
|
||||
|
||||
# The variable gdb_prompt is a regexp which matches the gdb prompt.
|
||||
@@ -2200,6 +2201,17 @@ proc default_gdb_start { } {
|
||||
set INTERNAL_GDBFLAGS [append_gdb_data_directory_option $INTERNAL_GDBFLAGS]
|
||||
}
|
||||
@@ -2349,6 +2350,17 @@ proc default_gdb_start { } {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1889,7 +1896,7 @@ diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
|
||||
diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp
|
||||
--- a/gdb/testsuite/lib/mi-support.exp
|
||||
+++ b/gdb/testsuite/lib/mi-support.exp
|
||||
@@ -322,6 +322,16 @@ proc default_mi_gdb_start { args } {
|
||||
@@ -330,6 +330,16 @@ proc default_mi_gdb_start { { flags {} } } {
|
||||
warning "Couldn't set the width to 0."
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user