From: Tom Tromey Date: Fri, 4 Mar 2022 18:58:27 +0000 (-0700) Subject: Mark vDSO as not a file X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c836575a6f0f45b1eddf5eefc6e300420f1b2aec;p=binutils-gdb.git Mark vDSO as not a file The vDSO objfile is not a real file, so mark it as such. I noticed this because, when playing with debuginfod, I saw: Downloading 0.01 MB separate debug info for /tmp/system-supplied DSO at 0x7ffff7fc9000 That "/tmp" is wrong -- it's just gdb's cwd. This patch corrects the problem, resulting in: Downloading 0.01 MB separate debug info for system-supplied DSO at 0x7ffff7fc9000 Regression tested on x86-64 Fedora 34. --- diff --git a/gdb/symfile-mem.c b/gdb/symfile-mem.c index b4c359ccd31..73c5ee378b8 100644 --- a/gdb/symfile-mem.c +++ b/gdb/symfile-mem.c @@ -88,7 +88,7 @@ symbol_file_add_from_memory (struct bfd *templ, CORE_ADDR addr, struct bfd *nbfd; struct bfd_section *sec; bfd_vma loadbase; - symfile_add_flags add_flags = 0; + symfile_add_flags add_flags = SYMFILE_NOT_FILENAME; if (bfd_get_flavour (templ) != bfd_target_elf_flavour) error (_("add-symbol-file-from-memory not supported for this target"));