reverse continue, watch break not triggered as expected

"J. Hart" <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
I reported the following as:
https://sourceware.org/bugzilla/show_bug.cgi?id=21969

I thought I should check with the list to see if I might just be missing
something.  Any thoughts would be most appreciated.

utl1.c : test program with deliberate stack overwrite
int main()
{
    int a[10],i;
    for(i=0;i<20;i++)
    {
       a[i]=i;
    }
}

OS          : Linux DellXPS 4.10.0 #1 SMP Thu Apr 13 09:55:54 EDT 2017 
x86_64 GNU/Linux
gdb version : 8.0

build utl1.c as follows:
gcc -Wall -Wno-unused-but-set-variable -g utl1.c -o0 -o utl1

After the forward continue, the watch break is triggered as expected :

gdb utl1
C-x 2      # ctrl-x 2
b *main    # break on 1st main() instruction
run
record
watch -l *((long *)$sp)
continue


After the reverse continue, the watch break is not triggered as expected :

gdb utl1
C-x 2      # ctrl-x 2
b *main    # break on 1st main() instruction
b *main+41 # break on retq instruction
run
record
continue
watch -l *((long *)$sp)
reverse-continue
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.