This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[review] Introduce fetch_pending_stop


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]