From c836575a6f0f45b1eddf5eefc6e300420f1b2aec Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Fri, 4 Mar 2022 11:58:27 -0700 Subject: [PATCH] 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. --- gdb/symfile-mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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")); -- 2.30.2