mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-27 01:28:46 +00:00
Support .dwp with the name of symlinked binary file
gdb/ 2013-09-24 Jan Kratochvil <jan.kratochvil@redhat.com> * dwarf2read.c (open_and_init_dwp_file): Try open_dwp_file also with objfile->original_name. gdb/testsuite/ 2013-09-24 Jan Kratochvil <jan.kratochvil@redhat.com> * gdb.dwarf2/dwp-symlink.c: New file. * gdb.dwarf2/dwp-symlink.exp: New file.
This commit is contained in:
@@ -9648,10 +9648,21 @@ open_and_init_dwp_file (void)
|
||||
bfd *dbfd;
|
||||
struct cleanup *cleanups;
|
||||
|
||||
dwp_name = xstrprintf ("%s.dwp", objfile_name (dwarf2_per_objfile->objfile));
|
||||
/* Try to find first .dwp for the binary file before any symbolic links
|
||||
resolving. */
|
||||
dwp_name = xstrprintf ("%s.dwp", objfile->original_name);
|
||||
cleanups = make_cleanup (xfree, dwp_name);
|
||||
|
||||
dbfd = open_dwp_file (dwp_name);
|
||||
if (dbfd == NULL
|
||||
&& strcmp (objfile->original_name, objfile_name (objfile)) != 0)
|
||||
{
|
||||
/* Try to find .dwp for the binary file after gdb_realpath resolving. */
|
||||
dwp_name = xstrprintf ("%s.dwp", objfile_name (objfile));
|
||||
make_cleanup (xfree, dwp_name);
|
||||
dbfd = open_dwp_file (dwp_name);
|
||||
}
|
||||
|
||||
if (dbfd == NULL)
|
||||
{
|
||||
if (dwarf2_read_debug)
|
||||
|
||||
Reference in New Issue
Block a user