From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by sourceware.org (Postfix) with ESMTP id A89A0395CC7A for ; Thu, 18 Jun 2020 14:55:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org A89A0395CC7A Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-43-QsUlfjBCOXKSWeKZ_LndKg-1; Thu, 18 Jun 2020 10:55:36 -0400 X-MC-Unique: QsUlfjBCOXKSWeKZ_LndKg-1 Received: by mail-wm1-f70.google.com with SMTP id v24so2706840wmh.3 for ; Thu, 18 Jun 2020 07:55:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=VWAQNhshc/J1B5RkdqudqWycDp0FKh9rWQM/7ih3fuk=; b=I/Pp5Hh7ARI1yMFYl4ZzAqE+n6Eaw0zYy3zc0HtOuUr+cQWpXuu5XNUElKlkAytdwf pLWjLFUuQPrJg6f9qSeWv1VjbsAJoz6mH+TodVzxVmb2izrYhh2+PkfVKi+VRKI/9WoU +qsuVMzHRQ1ZB5C+6Yrioy8r7iozrRngzKWXcahu0z943NunWXaReUqI84RhkxMVamuT OMO4SxwD785dwia/Gyj3itMbDvC5Cp62RZUS+Fx1U+ela3IzyBNw1xLHi9lN3hoxY0/2 Zg+K6Mg9V+w/kCNzL5n3YA4WZwWnCMuiOTg+Qn+rlkYIFGnbjSTns3DkGFjlve8y//Lg TY6w== X-Gm-Message-State: AOAM532O4bFDPtR+m+2t9StQUcKRCdUKeucoYJYDHudiAkMDZnX7+PRL T58Pzhpv1yqydUmngBnP1xdrYCfmxczn4YXwfmfAPeCSwyPfANLH+6Bkeo7SgudMub7NviZNetC Nd1rWbOMHUNEo64Px9PzVfw== X-Received: by 2002:a5d:55c2:: with SMTP id i2mr5046499wrw.225.1592492135479; Thu, 18 Jun 2020 07:55:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw36PA/kU2/1UzV8JF9qeHLqgbo6maAmrT3ZjetS1ZcCkXBbT1IpGJmQ0YABKqGQInLsIju4A== X-Received: by 2002:a5d:55c2:: with SMTP id i2mr5046488wrw.225.1592492135301; Thu, 18 Jun 2020 07:55:35 -0700 (PDT) Received: from ?IPv6:2001:8a0:f922:c400:56ee:75ff:fe8d:232b? ([2001:8a0:f922:c400:56ee:75ff:fe8d:232b]) by smtp.gmail.com with ESMTPSA id u4sm4253968wmb.48.2020.06.18.07.55.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 18 Jun 2020 07:55:34 -0700 (PDT) Subject: Re: Unbreaking gdb on Solaris post-multitarget [PR 25939] To: Rainer Orth References: <7fb790ae-61a9-a6a3-3b87-74fcac400664@redhat.com> Cc: gdb-patches@sourceware.org From: Pedro Alves Message-ID: <0e3e81a9-a5de-42bc-7d58-094f2adca164@redhat.com> Date: Thu, 18 Jun 2020 15:55:33 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jun 2020 14:55:41 -0000 On 6/17/20 3:45 PM, Rainer Orth wrote: > [Thread debugging using libthread_db enabled] > [New Thread 1 (LWP 1)] > Breakpoint 1 at 0x401036: file hello.c, line 6. > bottom-gdb.gdb:3: Error in sourced command file: > procfs: couldn't find pid 0 in procinfo list. I see what this is. This is procfs_target::wait relying on inferior_ptid. Since the multi-target series, inferior_ptid is null_ptid before we call target_wait: static ptid_t do_target_wait_1 (inferior *inf, ptid_t ptid, target_waitstatus *status, int options) { ptid_t event_ptid; struct thread_info *tp; /* We know that we are looking for an event in the target of inferior INF, but we don't know which thread the event might come from. As such we want to make sure that INFERIOR_PTID is reset so that none of the wait code relies on it - doing so is always a mistake. */ switch_to_inferior_no_thread (inf); I'm working on a patch. Thanks, Pedro Alves