gdb/elfread.c: Use bfd filename instead of objfile->original_name
authorAaron Merey <amerey@redhat.com>
Wed, 31 Aug 2022 00:18:11 +0000 (20:18 -0400)
committerAaron Merey <amerey@redhat.com>
Wed, 31 Aug 2022 00:20:28 +0000 (20:20 -0400)
commit803584b96d97e1f6ea50b0a0064d2a03ab0baa60
treea6f13695e3196fa6fbb69560271ba8b7e0b5bed6
parent649cd1d8df4d927b21b8178dcad1041ad674d672
gdb/elfread.c: Use bfd filename instead of objfile->original_name

The call to debuginfod_debuginfo_query in elf_symfile_read is given
objfile->original_name as the filename to print when downloading the
objfile's debuginfo.

In some cases original_name is prefixed with gdb's working directory
even though the objfile is not located in the working directory. This
causes debuginfod to display the wrong path of the objfile during a download.

Fix this by using the objfile's bfd filename instead.
gdb/elfread.c