From: Simon Marchi <simon.marchi@polymtl.ca>
To: gdb-patches@sourceware.org
Cc: Simon Marchi <simon.marchi@efficios.com>
Subject: [PATCH 4/8] gdb: use objfile->pspace in auto-load.c
Date: Tue, 3 Oct 2023 22:20:19 -0400 [thread overview]
Message-ID: <20231004022305.298534-5-simon.marchi@polymtl.ca> (raw)
In-Reply-To: <20231004022305.298534-1-simon.marchi@polymtl.ca>
From: Simon Marchi <simon.marchi@efficios.com>
Use objfile->pspace instead of current_program_space in two spots.
Change-Id: Idf94fad486252d1250380f295e71b0fe76dce76c
---
gdb/auto-load.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/gdb/auto-load.c b/gdb/auto-load.c
index 5267cb4e64d7..c6744ca25554 100644
--- a/gdb/auto-load.c
+++ b/gdb/auto-load.c
@@ -788,7 +788,7 @@ auto_load_objfile_script_1 (struct objfile *objfile, const char *realname,
/* Add this script to the hash table too so
"info auto-load ${lang}-scripts" can print it. */
pspace_info
- = get_auto_load_pspace_data_for_loading (current_program_space);
+ = get_auto_load_pspace_data_for_loading (objfile->pspace);
maybe_add_script_file (pspace_info, is_safe, debugfile, debugfile,
language);
@@ -1052,12 +1052,10 @@ static void
source_section_scripts (struct objfile *objfile, const char *section_name,
const char *start, const char *end)
{
- const char *p;
- struct auto_load_pspace_info *pspace_info;
-
- pspace_info = get_auto_load_pspace_data_for_loading (current_program_space);
+ auto_load_pspace_info *pspace_info
+ = get_auto_load_pspace_data_for_loading (objfile->pspace);
- for (p = start; p < end; ++p)
+ for (const char *p = start; p < end; ++p)
{
const char *entry;
const struct extension_language_defn *language;
--
2.42.0
next prev parent reply other threads:[~2023-10-04 2:30 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-04 2:20 [PATCH 0/8] Split new_objfile observable Simon Marchi
2023-10-04 2:20 ` [PATCH 1/8] gdb: add program_space parameter to ada_clear_symbol_cache Simon Marchi
2023-10-04 2:20 ` [PATCH 2/8] gdb: add program_space parameters to some functions in symtab.c Simon Marchi
2023-10-04 2:20 ` [PATCH 3/8] gdb: add program_space parameter to emit_clear_objfiles_event Simon Marchi
2023-10-04 2:20 ` Simon Marchi [this message]
2023-10-04 2:20 ` [PATCH 5/8] gdb: add program_space parameters to some auto-load functions Simon Marchi
2023-10-04 2:20 ` [PATCH 6/8] gdb: add all_objfiles_removed observer Simon Marchi
2023-10-05 16:35 ` Tom Tromey
2023-10-05 17:13 ` Simon Marchi
2023-10-04 2:20 ` [PATCH 7/8] gdb: remove unnecessary nullptr check in free_objfile observers Simon Marchi
2023-10-04 2:20 ` [PATCH 8/8] gdb: use objfile->pspace " Simon Marchi
2023-10-05 16:36 ` [PATCH 0/8] Split new_objfile observable Tom Tromey
2023-10-05 17:23 ` Simon Marchi
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=20231004022305.298534-5-simon.marchi@polymtl.ca \
--to=simon.marchi@polymtl.ca \
--cc=gdb-patches@sourceware.org \
--cc=simon.marchi@efficios.com \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).