pmuldoon at redhat dot com
2018-10-31 08:11:28 UTC
https://sourceware.org/bugzilla/show_bug.cgi?id=23845
Bug ID: 23845
Summary: Watchpoints (and watchpoint tests) are failing
Product: gdb
Version: HEAD
Status: NEW
Severity: critical
Priority: P2
Component: breakpoints
Assignee: unassigned at sourceware dot org
Reporter: pmuldoon at redhat dot com
Target Milestone: ---
To replicate simply run the gdb.base/watchpoint.exp test.
Some analysis:
Breakpoint 5, func2 () at
/home/pmuldoon/fedora_gdb_patches/upstream/obj/gdb/testsuite/../../../binutils-gdb/gdb/testsuite/gdb.base/watchpoint.c:100
100 ival5++;
(gdb) PASS: gdb.base/watchpoint.exp: continue to breakpoint: func2 breakpoint
here, first time
watch local_a
Hardware watchpoint 6: local_a
(gdb) PASS: gdb.base/watchpoint.exp: set local watch
cont
Continuing.
Couldn't write debug register: Invalid argument.
Later, and more seriously, the inferior dies (it shouldn't)
Watchpoint 6 deleted because the program has left the block
in which its expression is valid.
Program received signal SIGSEGV, Segmentation fault.
0x000000000040059b in func2 () at
/home/pmuldoon/fedora_gdb_patches/upstream/obj/gdb/testsuite/../../../binutils-gdb/gdb/testsuite/gdb.base/watchpoint.c:100
100 ival5++;
If you attempt to replicate the test manually, it won't trigger:
***@UNKNOWN ~/fedora_gdb_patches/upstream/obj/gdb/testsuite ] ../gdb
outputs/gdb.base/watchpoint/watchpoint
GNU gdb (GDB) 8.2.50.20181031-git
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from outputs/gdb.base/watchpoint/watchpoint...
(gdb) b marker6
Breakpoint 1 at 0x400556: file
/home/pmuldoon/fedora_gdb_patches/upstream/obj/gdb/testsuite/../../../binutils-gdb/gdb/testsuite/gdb.base/watchpoint.c,
line 82.
(gdb) r
Starting program:
/home/pmuldoon/fedora_gdb_patches/upstream/obj/gdb/testsuite/outputs/gdb.base/watchpoint/watchpoint
marker6 () at
/home/pmuldoon/fedora_gdb_patches/upstream/obj/gdb/testsuite/../../../binutils-gdb/gdb/testsuite/gdb.base/watchpoint.c:82
82 }
(gdb) b 99
Breakpoint 2 at 0x400592: file
/home/pmuldoon/fedora_gdb_patches/upstream/obj/gdb/testsuite/../../../binutils-gdb/gdb/testsuite/gdb.base/watchpoint.c,
line 100.
(gdb) c
Continuing.
Breakpoint 2
func2 () at
/home/pmuldoon/fedora_gdb_patches/upstream/obj/gdb/testsuite/../../../binutils-gdb/gdb/testsuite/gdb.base/watchpoint.c:100
100 ival5++;
(gdb) watch local_a
Hardware watchpoint 3: local_a
(gdb) c
Continuing.
Hardware watchpoint 3: local_a
Old value = 0
New value = 1
func2 () at
/home/pmuldoon/fedora_gdb_patches/upstream/obj/gdb/testsuite/../../../binutils-gdb/gdb/testsuite/gdb.base/watchpoint.c:102
102 static_b = local_a;
(gdb) bt
#0 func2 () at
/home/pmuldoon/fedora_gdb_patches/upstream/obj/gdb/testsuite/../../../binutils-gdb/gdb/testsuite/gdb.base/watchpoint.c:102
#1 0x000000000040082f in main () at
/home/pmuldoon/fedora_gdb_patches/upstream/obj/gdb/testsuite/../../../binutils-gdb/gdb/testsuite/gdb.base/watchpoint.c:234
(gdb) list 100
95 {
96 int local_a = 0;
97 static int static_b;
98
99 /* func2 breakpoint here */
100 ival5++;
101 local_a = ival5;
102 static_b = local_a;
103 }
104
I am trying to replicate a simpler fail case. Simply replicating the conditions
in the func2() function won't work. I suspect the tests run before, in
test_simple_watchpoint, in watchpoint.exp are priming the conditions for the
failure.
Bug ID: 23845
Summary: Watchpoints (and watchpoint tests) are failing
Product: gdb
Version: HEAD
Status: NEW
Severity: critical
Priority: P2
Component: breakpoints
Assignee: unassigned at sourceware dot org
Reporter: pmuldoon at redhat dot com
Target Milestone: ---
To replicate simply run the gdb.base/watchpoint.exp test.
Some analysis:
Breakpoint 5, func2 () at
/home/pmuldoon/fedora_gdb_patches/upstream/obj/gdb/testsuite/../../../binutils-gdb/gdb/testsuite/gdb.base/watchpoint.c:100
100 ival5++;
(gdb) PASS: gdb.base/watchpoint.exp: continue to breakpoint: func2 breakpoint
here, first time
watch local_a
Hardware watchpoint 6: local_a
(gdb) PASS: gdb.base/watchpoint.exp: set local watch
cont
Continuing.
Couldn't write debug register: Invalid argument.
Later, and more seriously, the inferior dies (it shouldn't)
Watchpoint 6 deleted because the program has left the block
in which its expression is valid.
Program received signal SIGSEGV, Segmentation fault.
0x000000000040059b in func2 () at
/home/pmuldoon/fedora_gdb_patches/upstream/obj/gdb/testsuite/../../../binutils-gdb/gdb/testsuite/gdb.base/watchpoint.c:100
100 ival5++;
If you attempt to replicate the test manually, it won't trigger:
***@UNKNOWN ~/fedora_gdb_patches/upstream/obj/gdb/testsuite ] ../gdb
outputs/gdb.base/watchpoint/watchpoint
GNU gdb (GDB) 8.2.50.20181031-git
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from outputs/gdb.base/watchpoint/watchpoint...
(gdb) b marker6
Breakpoint 1 at 0x400556: file
/home/pmuldoon/fedora_gdb_patches/upstream/obj/gdb/testsuite/../../../binutils-gdb/gdb/testsuite/gdb.base/watchpoint.c,
line 82.
(gdb) r
Starting program:
/home/pmuldoon/fedora_gdb_patches/upstream/obj/gdb/testsuite/outputs/gdb.base/watchpoint/watchpoint
marker6 () at
/home/pmuldoon/fedora_gdb_patches/upstream/obj/gdb/testsuite/../../../binutils-gdb/gdb/testsuite/gdb.base/watchpoint.c:82
82 }
(gdb) b 99
Breakpoint 2 at 0x400592: file
/home/pmuldoon/fedora_gdb_patches/upstream/obj/gdb/testsuite/../../../binutils-gdb/gdb/testsuite/gdb.base/watchpoint.c,
line 100.
(gdb) c
Continuing.
Breakpoint 2
func2 () at
/home/pmuldoon/fedora_gdb_patches/upstream/obj/gdb/testsuite/../../../binutils-gdb/gdb/testsuite/gdb.base/watchpoint.c:100
100 ival5++;
(gdb) watch local_a
Hardware watchpoint 3: local_a
(gdb) c
Continuing.
Hardware watchpoint 3: local_a
Old value = 0
New value = 1
func2 () at
/home/pmuldoon/fedora_gdb_patches/upstream/obj/gdb/testsuite/../../../binutils-gdb/gdb/testsuite/gdb.base/watchpoint.c:102
102 static_b = local_a;
(gdb) bt
#0 func2 () at
/home/pmuldoon/fedora_gdb_patches/upstream/obj/gdb/testsuite/../../../binutils-gdb/gdb/testsuite/gdb.base/watchpoint.c:102
#1 0x000000000040082f in main () at
/home/pmuldoon/fedora_gdb_patches/upstream/obj/gdb/testsuite/../../../binutils-gdb/gdb/testsuite/gdb.base/watchpoint.c:234
(gdb) list 100
95 {
96 int local_a = 0;
97 static int static_b;
98
99 /* func2 breakpoint here */
100 ival5++;
101 local_a = ival5;
102 static_b = local_a;
103 }
104
I am trying to replicate a simpler fail case. Simply replicating the conditions
in the func2() function won't work. I suspect the tests run before, in
test_simple_watchpoint, in watchpoint.exp are priming the conditions for the
failure.
--
You are receiving this mail because:
You are on the CC list for the bug.
You are receiving this mail because:
You are on the CC list for the bug.