diff options
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/ravenscar-thread.c | 6 |
2 files changed, 10 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 640fb39..6ae8d7b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,9 @@ 2020-08-07 Tom Tromey <tromey@adacore.com> + * ravenscar-thread.c (update_thread_list): Set inferior_ptid. + +2020-08-07 Tom Tromey <tromey@adacore.com> + * ravenscar-thread.c (ravenscar_thread_target::wait): Call update_inferior_ptid before update_thread_list. (temporarily_change_regcache_ptid): New class. diff --git a/gdb/ravenscar-thread.c b/gdb/ravenscar-thread.c index 459e5ea..37df218 100644 --- a/gdb/ravenscar-thread.c +++ b/gdb/ravenscar-thread.c @@ -419,6 +419,12 @@ ravenscar_thread_target::add_thread (struct ada_task_info *task) void ravenscar_thread_target::update_thread_list () { + /* iterate_over_live_ada_tasks requires that inferior_ptid be set, + but this isn't always the case in target methods. So, we ensure + it here. */ + scoped_restore save_ptid = make_scoped_restore (&inferior_ptid, + m_base_ptid); + /* Do not clear the thread list before adding the Ada task, to keep the thread that the process stratum has included into it (m_base_ptid) and the running thread, that may not have been included |