From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id C608C3858C60 for ; Tue, 2 Nov 2021 17:13:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C608C3858C60 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-186-smuMo-A-PqeTwJhWas-_1w-1; Tue, 02 Nov 2021 13:13:31 -0400 X-MC-Unique: smuMo-A-PqeTwJhWas-_1w-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6DC5691283; Tue, 2 Nov 2021 17:13:30 +0000 (UTC) Received: from f35-m1 (ovpn-114-255.phx2.redhat.com [10.3.114.255]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5239F100E12C; Tue, 2 Nov 2021 17:13:30 +0000 (UTC) Date: Tue, 2 Nov 2021 10:13:29 -0700 From: Kevin Buettner To: Tom de Vries via Gdb-patches Subject: Re: [PATCH][gdb/testsuite] Work around skip_prologue problems in gdb.threads/process-dies-while-detaching.exp Message-ID: <20211102101329.565a324b@f35-m1> In-Reply-To: <2cc5e63d-5be1-a5c7-b1cd-6058223a5a19@suse.de> References: <20211029192419.GA26416@delia> <2cc5e63d-5be1-a5c7-b1cd-6058223a5a19@suse.de> Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.6 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: Tue, 02 Nov 2021 17:13:36 -0000 On Tue, 2 Nov 2021 12:38:26 +0100 Tom de Vries via Gdb-patches wrote: > On 10/29/21 9:24 PM, Tom de Vries via Gdb-patches wrote: > > Hi, > > > > On powerpc64le-linux, I run into: > > ... > > [Inferior 1 (process 5156) exited normally]^M > > (gdb) FAIL: gdb.threads/process-dies-while-detaching.exp: single-process: \ > > detach: detach: continue to breakpoint: _exit (the program exited) > > ... > > > > What happens is the following: > > - a breakpoint is set on _exit, > > - a continue is issued > > - the continue is supposed to hit the breakpoint, but instead > > the program exits. > > > > I traced this down to the breakpoint on _exit being set too far from function > > entry. This is caused by the skip_prologue function (in rs6000-tdep.c) > > optimistically ignoring insns it doesn't recognize. In particular, it walks > > past the system call instruction "sc" which initiates the actual exit. > > > > While this needs fixing, > > Filed here: https://sourceware.org/bugzilla/show_bug.cgi?id=28527 . > > Submitted patch here: > https://sourceware.org/pipermail/gdb-patches/2021-November/183016.html . > > Thanks, > - Tom > > > we don't want to be testing this behaviour in this > > test-case. Since you've fixed the problem in skip_prologue(), I'd prefer that this testsuite patch not go in. Kevin