[v2,03/12] Return event_ptid from ravenscar_thread_target::wait

Message ID 20200805190841.2506771-4-tromey@adacore.com
State New
Headers show
Series
  • Fix Ravenscar regressions
Related show

Commit Message

Tom Tromey Aug. 5, 2020, 7:08 p.m.
ravenscar_thread_target::wait should return the event ptid from the
wrapped "wait" call in the situation where returning the Ravenscar
thread ptid is not appropriate.  This probably does not really make a
difference in practice, but it seemed like a reasonable cleanup.

gdb/ChangeLog
2020-08-05  Tom Tromey  <tromey@adacore.com>

	* ravenscar-thread.c (ravenscar_thread_target::wait): Return
	event_ptid.
---
 gdb/ChangeLog          | 5 +++++
 gdb/ravenscar-thread.c | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

-- 
2.26.2

Patch

diff --git a/gdb/ravenscar-thread.c b/gdb/ravenscar-thread.c
index 47001de42d3..b89b5f62e5a 100644
--- a/gdb/ravenscar-thread.c
+++ b/gdb/ravenscar-thread.c
@@ -361,7 +361,7 @@  ravenscar_thread_target::wait (ptid_t ptid,
       this->update_thread_list ();
       return this->add_active_thread ()->ptid;
     }
-  return m_base_ptid;
+  return event_ptid;
 }
 
 /* Add the thread associated to the given TASK to the thread list