From: Tom Tromey <tom@tromey.com>
To: Andrew Burgess <aburgess@redhat.com>
Cc: Tom Tromey <tom@tromey.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH 1/2] gdb: move all bfd_cache_close_all calls in gdb_bfd.c
Date: Sun, 12 Nov 2023 16:38:02 -0700 [thread overview]
Message-ID: <871qcu1r1h.fsf@tromey.com> (raw)
In-Reply-To: <87o7gdvjhi.fsf@redhat.com> (Andrew Burgess's message of "Wed, 01 Nov 2023 10:46:49 +0000")
>>>>> "Andrew" == Andrew Burgess <aburgess@redhat.com> writes:
Andrew> I'm trying to figure out what I should do to move this patch
Andrew> forward?
I think you should probably just check it in.
Andrew> I guess the existing bfd_cache_close_all() calls could cause problems
Andrew> for your background reader if the on-disk file changes between two reads
Andrew> from a BFD, and if GDB's main thread calls bfd_cache_close_all() in
Andrew> between those reads, e.g. one BFD section might indicate an offset into
Andrew> another section, and after the on-disk file changes the section offset
Andrew> is no longer valid...
gdb already isn't really robust if the file changes while gdb is
running, at least not when trust-readonly-sections is enabled.
However, the background reader maps most section data in the main
thread, before launching the indexer tasks. So, I guess maybe it could
happen, but if you are rebuilding your program while invoking "file"
you're already exposed to races.
Tom
next prev parent reply other threads:[~2023-11-12 23:38 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-25 15:08 [PATCH 0/2] BFD cache management And Exec file with target: prefix Andrew Burgess
2023-10-25 15:08 ` [PATCH 1/2] gdb: move all bfd_cache_close_all calls in gdb_bfd.c Andrew Burgess
2023-10-26 9:06 ` Lancelot SIX
2023-10-27 8:49 ` Andrew Burgess
2023-10-27 19:30 ` Tom Tromey
2023-10-30 10:20 ` Andrew Burgess
2023-10-31 18:28 ` Tom Tromey
2023-11-01 10:46 ` Andrew Burgess
2023-11-12 23:38 ` Tom Tromey [this message]
2023-10-25 15:08 ` [PATCH 2/2] gdb: fix reopen_exec_file for files with target: prefix Andrew Burgess
2023-10-27 18:39 ` Tom Tromey
2023-10-30 13:41 ` [PATCH 0/2] BFD cache management And Exec file " Andrew Burgess
2023-10-30 13:41 ` [PATCH 1/2] gdb: move all bfd_cache_close_all calls in gdb_bfd.c Andrew Burgess
2023-10-30 13:41 ` [PATCH 2/2] gdb: fix reopen_exec_file for files with target: prefix Andrew Burgess
2023-11-12 23:40 ` [PATCH 0/2] BFD cache management And Exec file " Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871qcu1r1h.fsf@tromey.com \
--to=tom@tromey.com \
--cc=aburgess@redhat.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox