This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[review] Introduce fetch_pending_stop
- From: "Pedro Alves (Code Review)" <gerrit at gnutoolchain-gerrit dot osci dot io>
- To: Tom Tromey <tromey at sourceware dot org>, gdb-patches at sourceware dot org
- Date: Thu, 21 Nov 2019 13:40:59 -0500
- Subject: [review] Introduce fetch_pending_stop
- Auto-submitted: auto-generated
- References: <gerrit.1572371871000.I330cb8bda61ff9460f22d9e0eaaa96740d256202@gnutoolchain-gerrit.osci.io>
- Reply-to: gnutoolchain-gerrit at osci dot io
Pedro Alves has posted comments on this change.
Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/427
......................................................................
Patch Set 1: Code-Review+2
(1 comment)
LGTM.
| --- gdb/nat/windows-nat.c
| +++ gdb/nat/windows-nat.c
| @@ -315,10 +315,21 @@ matching_pending_stop (bool debug_events)
| desired_stop_thread_id, item.thread_id));
| return true;
| }
| }
|
| return false;
| }
|
| /* See nat/windows-nat.h. */
|
| +bool
| +fetch_pending_stop (bool debug_events, pending_stop *result)
PS1, Line 326:
I guess this could also be
gdb::optional<pending_stop> fetch_pending_stop (bool debug_events, pending_stop *result)
Just mentioning it for completeness, what you have is fine.
| +{
| + for (auto iter = pending_stops.begin ();
| + iter != pending_stops.end ();
| + ++iter)
| + {
| + if (desired_stop_thread_id == -1
| + || desired_stop_thread_id == iter->thread_id)
| + {
| + *result = *iter;
--
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I330cb8bda61ff9460f22d9e0eaaa96740d256202
Gerrit-Change-Number: 427
Gerrit-PatchSet: 1
Gerrit-Owner: Tom Tromey <tromey@sourceware.org>
Gerrit-Reviewer: Pedro Alves <palves@redhat.com>
Gerrit-Comment-Date: Thu, 21 Nov 2019 18:40:59 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment