X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdb%2Fprogspace-and-thread.c;h=698661d43fbff2f6fe073d48179a636ca05f922d;hb=refs%2Fheads%2Fconcurrent-displaced-stepping-2020-04-01;hp=3c92b5c8e045e33bd032a152684910eedf7afd65;hpb=42a4f53d2bf8938c2aeda9f52be7a20534b214a9;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/progspace-and-thread.c b/gdb/progspace-and-thread.c index 3c92b5c8e0..698661d43f 100644 --- a/gdb/progspace-and-thread.c +++ b/gdb/progspace-and-thread.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2009-2019 Free Software Foundation, Inc. +/* Copyright (C) 2009-2020 Free Software Foundation, Inc. This file is part of GDB. @@ -25,8 +25,9 @@ void switch_to_program_space_and_thread (program_space *pspace) { inferior *inf = find_inferior_for_program_space (pspace); + gdb_assert (inf != nullptr); - if (inf != NULL && inf->pid != 0) + if (inf->pid != 0) { thread_info *tp = any_live_thread_of_inferior (inf); @@ -39,6 +40,5 @@ switch_to_program_space_and_thread (program_space *pspace) } } - switch_to_no_thread (); - set_current_program_space (pspace); + switch_to_inferior_no_thread (inf); }