diff options
author | Tom Tromey <tom@tromey.com> | 2025-02-25 11:59:22 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2025-03-11 08:40:06 -0600 |
commit | 054f8e32fe9c4bd4155af145727ba64c9b00ec86 (patch) | |
tree | c39fd080a2bb75e7ca901b1b05a89a5a7fd19585 | |
parent | 8c830ad96ebafc2890ed6d61e6bffb412801f696 (diff) | |
download | binutils-054f8e32fe9c4bd4155af145727ba64c9b00ec86.zip binutils-054f8e32fe9c4bd4155af145727ba64c9b00ec86.tar.gz binutils-054f8e32fe9c4bd4155af145727ba64c9b00ec86.tar.bz2 |
Use gdb set in all_non_exited_process_targets
This changes all_non_exited_process_targets to return
gdb::unordered_set.
Approved-By: Simon Marchi <simon.marchi@efficios.com>
-rw-r--r-- | gdb/process-stratum-target.c | 4 | ||||
-rw-r--r-- | gdb/process-stratum-target.h | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/gdb/process-stratum-target.c b/gdb/process-stratum-target.c index ce8ff28..e827f74 100644 --- a/gdb/process-stratum-target.c +++ b/gdb/process-stratum-target.c @@ -195,11 +195,11 @@ process_stratum_target::find_thread (ptid_t ptid) /* See process-stratum-target.h. */ -std::set<process_stratum_target *> +gdb::unordered_set<process_stratum_target *> all_non_exited_process_targets () { /* Inferiors may share targets. To eliminate duplicates, use a set. */ - std::set<process_stratum_target *> targets; + gdb::unordered_set<process_stratum_target *> targets; for (inferior *inf : all_non_exited_inferiors ()) targets.insert (inf->process_target ()); diff --git a/gdb/process-stratum-target.h b/gdb/process-stratum-target.h index 8a0e139..5a9b1d3 100644 --- a/gdb/process-stratum-target.h +++ b/gdb/process-stratum-target.h @@ -21,9 +21,9 @@ #define GDB_PROCESS_STRATUM_TARGET_H #include "target.h" -#include <set> #include "gdbsupport/intrusive_list.h" #include "gdbsupport/gdb-checked-static-cast.h" +#include "gdbsupport/unordered_set.h" #include "gdbthread.h" /* Abstract base class inherited by all process_stratum targets. */ @@ -166,7 +166,8 @@ as_process_stratum_target (target_ops *target) /* Return a collection of targets that have non-exited inferiors. */ -extern std::set<process_stratum_target *> all_non_exited_process_targets (); +extern gdb::unordered_set<process_stratum_target *> + all_non_exited_process_targets (); /* Switch to the first inferior (and program space) of TARGET, and switch to no thread selected. */ |