aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@efficios.com>2024-07-15 15:02:15 +0000
committerSimon Marchi <simon.marchi@efficios.com>2024-07-15 11:07:29 -0400
commit574b77fccb8b7420c2ae4ab758d472c75c396a33 (patch)
tree1d0af341df0d26df72bbfa8644de18c4bed19c1e /gdb
parent25c228409597bcb7114a9a839ac08db0ba995418 (diff)
downloadgdb-574b77fccb8b7420c2ae4ab758d472c75c396a33.zip
gdb-574b77fccb8b7420c2ae4ab758d472c75c396a33.tar.gz
gdb-574b77fccb8b7420c2ae4ab758d472c75c396a33.tar.bz2
gdb: remove some trivial uses of current_program_space
It is obvious that pspace is the same as current_program_space in these cases, due to the set_current_program_space call just above. The rest of the functions probably care about the current program space though, so leave the set_cset_current_program_space calls there. Change-Id: I3c300decbf2c2fe5f25aa7f697ebcb524432394f
Diffstat (limited to 'gdb')
-rw-r--r--gdb/breakpoint.c4
-rw-r--r--gdb/linespec.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index f32883e..84b18ec 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -3710,7 +3710,7 @@ create_longjmp_master_breakpoint (void)
{
set_current_program_space (pspace);
- for (objfile *obj : current_program_space->objfiles ())
+ for (objfile *obj : pspace->objfiles ())
{
/* Skip separate debug object, it's handled in the loop below. */
if (obj->separate_debug_objfile_backlink != nullptr)
@@ -3743,7 +3743,7 @@ create_std_terminate_master_breakpoint (void)
{
set_current_program_space (pspace);
- for (objfile *objfile : current_program_space->objfiles ())
+ for (objfile *objfile : pspace->objfiles ())
{
struct breakpoint *b;
struct breakpoint_objfile_data *bp_objfile_data;
diff --git a/gdb/linespec.c b/gdb/linespec.c
index d24d691..9769f01 100644
--- a/gdb/linespec.c
+++ b/gdb/linespec.c
@@ -1156,7 +1156,7 @@ iterate_over_all_matching_symtabs
set_current_program_space (pspace);
- for (objfile *objfile : current_program_space->objfiles ())
+ for (objfile *objfile : pspace->objfiles ())
{
objfile->expand_symtabs_matching (NULL, &lookup_name, NULL, NULL,
(SEARCH_GLOBAL_BLOCK
@@ -4213,7 +4213,7 @@ search_minsyms_for_name (struct collect_info *info,
set_current_program_space (pspace);
- for (objfile *objfile : current_program_space->objfiles ())
+ for (objfile *objfile : pspace->objfiles ())
{
iterate_over_minimal_symbols (objfile, name,
[&] (struct minimal_symbol *msym)