public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug gdb/29927] reverse-finish requires two reverse next instructions to reach previous source line
Date: Tue, 17 Jan 2023 16:47:57 +0000	[thread overview]
Message-ID: <bug-29927-4717-NOlkvCMkrL@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-29927-4717@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=29927

--- Comment #4 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Carl Love <carll@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=92e07580db6a5572573d5177ca23933064158f89

commit 92e07580db6a5572573d5177ca23933064158f89
Author: Carl Love <cel@us.ibm.com>
Date:   Fri Jan 13 17:59:33 2023 -0500

    PowerPC: fix for gdb.reverse/finish-precsave.exp and
gdb.reverse/finish-reverse.exp

    PR record/29927 - reverse-finish requires two reverse next instructions to
    reach previous source line

    PowerPC uses two entry points called the local entry point (LEP) and the
    global entry point (GEP).  Normally the LEP is used when calling a
    function.  However, if the table of contents (TOC) value in register 2 is
    not valid the GEP is called to setup the TOC before execution continues at
    the LEP.  When executing in reverse, the function finish_backward sets the
    break point at the alternate entry point (GEP).  However if the forward
    execution enters via the normal entry point (LEP), the reverse execution
    never sees the break point at the GEP of the function.  Reverse execution
    continues until the next break point is encountered or the end of the
    recorded log is reached causing gdb to stop at the wrong place.

    This patch adds a new address to struct execution_control_state to hold the
    address of the alternate function start address, known as the GEP on
    PowerPC.  The finish_backwards function is updated.  If the stopping point
    is between the two entry points (the LEP and GEP on PowerPC), the stepping
    range is set to execute back to the alternate entry point (GEP on PowerPC).
    Otherwise, a breakpoint is inserted at the normal entry point (LEP on
    PowerPC).

    Function process_event_stop_test checks uses a stepping range to stop
    execution in the caller at the first instruction of the source code line.
    Note, on systems that only support one entry point, the address of the two
    entry points are the same.

    Test finish-reverse-next.exp is updated to include tests for the
    reverse-finish command when the function is entered via the normal entry
    point (i.e. the LEP) and the alternate entry point (i.e. the GEP).

    The patch has been tested on X86 and PowerPC with no regressions.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2023-01-17 16:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-21 16:56 [Bug gdb/29927] New: " cel at us dot ibm.com
2023-01-11 19:08 ` [Bug gdb/29927] " cel at us dot ibm.com
2023-01-11 19:12 ` cel at us dot ibm.com
2023-01-17 16:47 ` cvs-commit at gcc dot gnu.org
2023-01-17 16:47 ` cvs-commit at gcc dot gnu.org [this message]
2023-01-17 16:50 ` cel at us dot ibm.com
2023-01-17 16:52 ` cel at us dot ibm.com

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=bug-29927-4717-NOlkvCMkrL@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@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).