From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 87322 invoked by alias); 8 Jul 2015 18:17:32 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 87294 invoked by uid 89); 8 Jul 2015 18:17:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 08 Jul 2015 18:17:28 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id AB812C03CE; Wed, 8 Jul 2015 18:17:27 +0000 (UTC) Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t68IHPx3022954; Wed, 8 Jul 2015 14:17:26 -0400 Message-ID: <559D6935.7060103@redhat.com> Date: Wed, 08 Jul 2015 18:17:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Simon Marchi , gdb-patches@sourceware.org Subject: Re: [PATCH] Delete program spaces directly when removing inferiors References: <1412022790-21931-1-git-send-email-simon.marchi@ericsson.com> <559D1220.1060708@redhat.com> <559D4314.2000906@ericsson.com> <559D44FF.60705@ericsson.com> <559D48CE.5030700@redhat.com> <559D6784.9080408@ericsson.com> In-Reply-To: <559D6784.9080408@ericsson.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2015-07/txt/msg00245.txt.bz2 On 07/08/2015 07:10 PM, Simon Marchi wrote: > On 15-07-08 11:59 AM, Pedro Alves wrote: >> >> Yeah, it's only built if you build support for a target that pulls it in. >> See configure.tgt, look for monitor.o. The buildbot uses --enable-targets=all, >> you probably didn't. > > Oh right, I'll build with --enable-targets=all consistently from now on. > >> We can probably just make monitor.c call discard_all_inferiors. > > This doesn't have the same effect though. discard_all_inferiors > does not delete the inferior, it just makes them exit. I am not > sure what difference it will make. Hmm, I think it'll fix a bug, actually. There should always be an inferior. And that deletes it. So I assume that after closing the monitor target, GDB crashes as soon as it refers to the current inferior... In the original multi-process support (~7.0), that was not the case -- if you were not debugging a process, there's be no inferior. Seems like this code has bit rotten. I guess this suggests that no one's been using these monitor targets for a long while? > > Is there any way to test that code path relatively easily on x86? > Don't think so. You could stick a: delete_inferior_silent (ptid_get_pid (monitor_ptid)); call in remote.c:remote_close and see what happens there though. Thanks, Pedro Alves