* [PATCH] Mark vDSO as not a file
@ 2022-03-04 19:26 Tom Tromey
2022-03-04 19:27 ` Simon Marchi
0 siblings, 1 reply; 3+ messages in thread
From: Tom Tromey @ 2022-03-04 19:26 UTC (permalink / raw)
To: gdb-patches; +Cc: Tom Tromey
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.
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.34.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Mark vDSO as not a file
2022-03-04 19:26 [PATCH] Mark vDSO as not a file Tom Tromey
@ 2022-03-04 19:27 ` Simon Marchi
2022-03-04 19:34 ` Tom Tromey
0 siblings, 1 reply; 3+ messages in thread
From: Simon Marchi @ 2022-03-04 19:27 UTC (permalink / raw)
To: Tom Tromey, gdb-patches
On 2022-03-04 14:26, Tom Tromey via Gdb-patches wrote:
> 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
The patch LGTM, just one question.
What's the output with that fixed, the same thing without the "/tmp/"?
Simon
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Mark vDSO as not a file
2022-03-04 19:27 ` Simon Marchi
@ 2022-03-04 19:34 ` Tom Tromey
0 siblings, 0 replies; 3+ messages in thread
From: Tom Tromey @ 2022-03-04 19:34 UTC (permalink / raw)
To: Simon Marchi; +Cc: Tom Tromey, gdb-patches
Simon> What's the output with that fixed, the same thing without the "/tmp/"?
Yes, exactly.
I suspect there are still spots in gdb that use the objfile name as a
filename even when OBJF_NOT_FILENAME is set. I haven't audited
this... probably worth doing.
Tom
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-03-04 19:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-04 19:26 [PATCH] Mark vDSO as not a file Tom Tromey
2022-03-04 19:27 ` Simon Marchi
2022-03-04 19:34 ` Tom Tromey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).