From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 119886 invoked by alias); 31 Jan 2020 11:20:19 -0000 Mailing-List: contact gdb-testers-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-testers-owner@sourceware.org Received: (qmail 119878 invoked by uid 89); 31 Jan 2020 11:20:18 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-15.0 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: kwanyin.sergiodj.net Received: from kwanyin.sergiodj.net (HELO kwanyin.sergiodj.net) (158.69.185.54) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 31 Jan 2020 11:20:17 +0000 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [binutils-gdb] Fix ravenscar-thread.c for multi-target From: gdb-buildbot@sergiodj.net To: gdb-testers@sourceware.org Message-Id: Date: Fri, 31 Jan 2020 11:27:00 -0000 X-SW-Source: 2020-q1/txt/msg02884.txt *** TEST RESULTS FOR COMMIT fd9faca826e6ee9178cf0b1c2486e3c662d6375a *** commit fd9faca826e6ee9178cf0b1c2486e3c662d6375a Author: Tom Tromey AuthorDate: Wed Jan 22 12:30:40 2020 -0700 Commit: Tom Tromey CommitDate: Fri Jan 31 11:38:37 2020 +0100 Fix ravenscar-thread.c for multi-target ravenscar-thread.c needed a change to adapt to multi-target: ravenscar_thread_target::mourn_inferior called the mourn_inferior method on the target beneat -- but when the target beneath was the remote target, this resulted in the ravenscar target being deleted. Switching the order of the calls to unpush_target and the beneath's mourn_inferior fixes this problem. gdb/ChangeLog 2020-01-31 Tom Tromey * ravenscar-thread.c (ravenscar_thread_target::mourn_inferior): Call beneath target's mourn_inferior after unpushing. Change-Id: Ia80380515c403adc40505a6b3420c9cb35754370 diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 5bdca27efc..ea8ef82c38 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2020-01-31 Tom Tromey + + * ravenscar-thread.c (ravenscar_thread_target::mourn_inferior): + Call beneath target's mourn_inferior after unpushing. + 2020-01-31 Andrew Burgess PR tui/9765 diff --git a/gdb/ravenscar-thread.c b/gdb/ravenscar-thread.c index 5d24c59e99..fd3beb03ec 100644 --- a/gdb/ravenscar-thread.c +++ b/gdb/ravenscar-thread.c @@ -515,8 +515,9 @@ void ravenscar_thread_target::mourn_inferior () { m_base_ptid = null_ptid; - beneath ()->mourn_inferior (); + target_ops *beneath = this->beneath (); unpush_target (this); + beneath->mourn_inferior (); } /* Implement the to_core_of_thread target_ops "method". */