public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "cel at us dot ibm.com" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug gdb/29927] New: reverse-finish requires two reverse next instructions to reach previous source line Date: Wed, 21 Dec 2022 16:56:05 +0000 [thread overview] Message-ID: <bug-29927-4717@http.sourceware.org/bugzilla/> (raw) https://sourceware.org/bugzilla/show_bug.cgi?id=29927 Bug ID: 29927 Summary: reverse-finish requires two reverse next instructions to reach previous source line Product: gdb Version: HEAD Status: UNCONFIRMED Severity: normal Priority: P2 Component: gdb Assignee: unassigned at sourceware dot org Reporter: cel at us dot ibm.com Target Milestone: --- Currently on X86, when executing the finish command in reverse, gdb does a single step from the first instruction in the callee to get back to the caller. GDB stops on the last instruction in the source code line where the call was made. When stopped at the last instruction of the source code line, a reverse next or step command will stop at the first instruction of the same source code line thus requiring two step/next commands to reach the previous source code line. It should only require one step/next command to reach the previous source code line. By contrast, a reverse next or step command from the first line in a function stops at the first instruction in the source code line where the call was made. The same behavior was observed on PowerPC. Steps to reproduce: gdb ./foo execute into a function call reverse-finish -takes you to the caller reverse-next -gdb is still a the caller source line reverse-next -gdb moves back to the previous source line. FYI, I have a patch to fix the issue. Will post patch shortly. -- You are receiving this mail because: You are on the CC list for the bug.
next reply other threads:[~2022-12-21 16:56 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-12-21 16:56 cel at us dot ibm.com [this message] 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 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@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: linkBe 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).