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]

Re: [PATCH 2/3] gdbserver: Remove gdb_id_to_thread_id


On 2017-09-15 12:55, Pedro Alves wrote:

-	  if (ptid_equal (gdb_id, null_ptid)
-	      || ptid_equal (gdb_id, minus_one_ptid))
+	  if (thread_id == null_ptid || thread_id == minus_one_ptid)
 	    thread_id = null_ptid;

This can be just:

	  if (thread_id == minus_one_ptid)
 	    thread_id = null_ptid;

I thought that too at first, but actually if thread_id == null_ptid, execution will take the "else" branch and things will break after.

Simon


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