public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] gdb: remove unneeded argument in check_multi_target_resumption
@ 2021-01-13  4:44 Simon Marchi
  2021-03-17 13:06 ` Pedro Alves
  0 siblings, 1 reply; 2+ messages in thread
From: Simon Marchi @ 2021-01-13  4:44 UTC (permalink / raw)
  To: gdb-patches

If we reach the modified line, resume_target is necessarily nullptr,
because of the check at the beginning of the function.  So we'll
necessarily iterate on all non-exited inferiors (across all targets),
which is what we want, I believe.  So the code seems to be correct, just
remove the unnecessary argument.

gdb/ChangeLog:

	* infrun.c (check_multi_target_resumption): Remove argument to
	all_non_exited_inferiors.

Change-Id: If95704915dca19599d5f7f4732bbd6ccd20bf6b4
---
 gdb/infrun.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb/infrun.c b/gdb/infrun.c
index 940f575e22a2..fc2a8becf724 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -2809,7 +2809,7 @@ check_multi_target_resumption (process_stratum_target *resume_target)
 	 always-non-stop mode.  */
       inferior *first_not_non_stop = nullptr;
 
-      for (inferior *inf : all_non_exited_inferiors (resume_target))
+      for (inferior *inf : all_non_exited_inferiors ())
 	{
 	  switch_to_inferior_no_thread (inf);
 
-- 
2.29.2


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] gdb: remove unneeded argument in check_multi_target_resumption
  2021-01-13  4:44 [PATCH] gdb: remove unneeded argument in check_multi_target_resumption Simon Marchi
@ 2021-03-17 13:06 ` Pedro Alves
  0 siblings, 0 replies; 2+ messages in thread
From: Pedro Alves @ 2021-03-17 13:06 UTC (permalink / raw)
  To: Simon Marchi, gdb-patches

On 13/01/21 04:44, Simon Marchi via Gdb-patches wrote:
> If we reach the modified line, resume_target is necessarily nullptr,
> because of the check at the beginning of the function.  So we'll
> necessarily iterate on all non-exited inferiors (across all targets),
> which is what we want, I believe.  So the code seems to be correct, just
> remove the unnecessary argument.
> 
> gdb/ChangeLog:
> 
> 	* infrun.c (check_multi_target_resumption): Remove argument to
> 	all_non_exited_inferiors.
> 
> Change-Id: If95704915dca19599d5f7f4732bbd6ccd20bf6b4

Agreed.  I went ahead and merged it, with a slightly modified commit log.

Thanks,
Pedro Alves

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-03-17 13:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-13  4:44 [PATCH] gdb: remove unneeded argument in check_multi_target_resumption Simon Marchi
2021-03-17 13:06 ` Pedro Alves

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).