This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
reverse continue, watch break not triggered as expected
- From: "J. Hart" <jfhart085 at gmail dot com>
- To: gdb at sourceware dot org
- Date: Mon, 21 Aug 2017 20:13:36 -0400
- Subject: reverse continue, watch break not triggered as expected
- Authentication-results: sourceware.org; auth=none
- Reply-to: jfhart085 at gmail dot com
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