public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Kevin Buettner <kevinb@redhat.com>
To: Tom de Vries via Gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH][gdb/testsuite] Work around skip_prologue problems in gdb.threads/process-dies-while-detaching.exp
Date: Tue, 2 Nov 2021 10:13:29 -0700	[thread overview]
Message-ID: <20211102101329.565a324b@f35-m1> (raw)
In-Reply-To: <2cc5e63d-5be1-a5c7-b1cd-6058223a5a19@suse.de>

On Tue, 2 Nov 2021 12:38:26 +0100
Tom de Vries via Gdb-patches <gdb-patches@sourceware.org> 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


  reply	other threads:[~2021-11-02 17:13 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-29 19:24 Tom de Vries
2021-11-02 11:38 ` Tom de Vries
2021-11-02 17:13   ` Kevin Buettner [this message]
2021-11-04 11:20     ` [PATCH][gdb/testsuite] Add gdb.opt/break-on-_exit.exp Tom de Vries
2021-11-09 16:35       ` Kevin Buettner
2021-11-09 16:58         ` Tom de Vries
2021-11-09 17:29           ` Kevin Buettner
2021-11-10 10:57             ` [PATCH][gdb/testsuite] Add gdb.arch/ppc64-break-on-_exit.exp Tom de Vries
2021-11-10 23:50               ` Kevin Buettner
2021-11-11  9:51                 ` Tom de Vries
2021-11-10 11:56             ` [PATCH][gdb/testsuite] Add gdb.opt/break-on-_exit.exp Tom de Vries

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211102101329.565a324b@f35-m1 \
    --to=kevinb@redhat.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).