public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
From: "vries at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org> To: gdb-prs@sourceware.org Subject: [Bug gdb/28426] Step reverse over line with multiple executable statements Date: Wed, 26 Oct 2022 14:00:26 +0000 [thread overview] Message-ID: <bug-28426-4717-yjfCdDzqSc@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-28426-4717@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=28426 Tom de Vries <vries at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |vries at gcc dot gnu.org --- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> --- Created attachment 14415 --> https://sourceware.org/bugzilla/attachment.cgi?id=14415&action=edit reproduce.sh I've written a reproducer script reproducer.sh (generating test.c and gdb.in) based on comment #0. I first tried with gcc 7.5.0, but that one does not emit column info by default, so I added -gcolumn-info: ... $ gcc -g test.c ; readelf -wl a.out | grep -i column $ $ gcc -g test.c -gcolumn-info ; readelf -wl a.out | grep -i column [0x0000010f] Set column to 1 [0x0000011d] Set column to 7 [0x00000120] Set column to 8 [0x00000125] Set column to 20 [0x00000128] Set column to 8 [0x0000012c] Set column to 10 [0x0000012f] Set column to 1 ... Then, I used "b *main" to start at line 2 (otherwise, on x86_64-linux, it starts at line 3). Still, it doesn't reproduce for me with current trunk and x86_64-linux: ... $ ./reproduce.sh ... +b *main Breakpoint 1 at 0x400497: file test.c, line 2. +run Breakpoint 1, main () at test.c:2 2 { +record +target record-full +step 3 int b[2] = {5,8}; +step 5 b[0] = 1; +step 6 b[1] = 2; +step 8 b[0] = 6; b[1] = 9; /* generic statement, end part two */ +step 10 b[1] = 10; +step 11 b[0] = 20; +step 13 return 0; +set exec-dir reverse +step 11 b[0] = 20; +step 10 b[1] = 10; +step 8 b[0] = 6; b[1] = 9; /* generic statement, end part two */ +step 6 b[1] = 2; +step 5 b[0] = 1; +step 3 int b[2] = {5,8}; +step No more reverse-execution history. main () at test.c:2 2 { ... in other words, after 7 steps forward and 7 steps back I end up at the same point where I started: line 2. That's both with gcc 7.5.0 and gcc 12.2.1. -- You are receiving this mail because: You are on the CC list for the bug.
next prev parent reply other threads:[~2022-10-26 14:00 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-10-05 22:12 [Bug gdb/28426] New: Step reverse over line with multiple cel at us dot ibm.com 2021-10-05 23:15 ` [Bug gdb/28426] Step reverse over line with multiple executable statements cel at us dot ibm.com 2022-10-26 14:00 ` vries at gcc dot gnu.org [this message] 2022-10-26 14:29 ` vries at gcc dot gnu.org 2023-01-25 10:04 ` blarsen at redhat dot com 2024-02-09 17:47 ` cel at linux 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-28426-4717-yjfCdDzqSc@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).