public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug breakpoints/10136] New: rwatch not working when set before run
@ 2009-05-09 18:55 niko dot sams at gmail dot com
  2009-11-17 22:44 ` [Bug breakpoints/10136] " pedro at codesourcery dot com
  0 siblings, 1 reply; 4+ messages in thread
From: niko dot sams at gmail dot com @ 2009-05-09 18:55 UTC (permalink / raw)
  To: gdb-prs

When setting a read watchpoint for a static variable I get the error "Target 
does not support this type of hardware watchpoint." Same problem with awatch. 
watch works correctly.
$ gdb debugee
GNU gdb (GDB) 6.8.50.20090509-cvs
(gdb) l 25
20      void noop() {}
21      void foo() {
22          static int i=0;
23          ++i;
24          noop();
25          noop();
26      }
27      int main(int argc, char **argv) {
28          std::cout << "Hello, world!" << std::endl;
29          foo();
(gdb) rwatch foo::i
Target does not support this type of hardware watchpoint.

Setting the watchpoint after a breakpoint was it works:
$ gdb debugee
GNU gdb (GDB) 6.8.50.20090509-cvs
Copyright (C) 2009 Free Software Foundation, Inc.
(gdb) break main
Breakpoint 1 at 0x400a70: 
file /home/niko/kdesvn/kde-git/kdevelop/debuggers/gdb/unittests/debugee.cpp, 
line 28.
(gdb) r
Starting 
program: /home/niko/kdesvn/build/kde-git/kdevelop/debuggers/gdb/unittests/debugee

Breakpoint 1, main (argc=1, argv=0x7fffffffdbc8) 
at /home/niko/kdesvn/kde-git/kdevelop/debuggers/gdb/unittests/debugee.cpp:28
28          std::cout << "Hello, world!" << std::endl;
(gdb) rwatch foo::i
Hardware read watchpoint 2: foo::i
(gdb)                                                                                     


Gdb 6.8 works:
$ /usr/bin/gdb debugee
GNU gdb 6.8
(gdb) rwatch foo::i
Hardware read watchpoint 1: foo()::i
(gdb)

-- 
           Summary: rwatch not working when set before run
           Product: gdb
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: breakpoints
        AssignedTo: unassigned at sourceware dot org
        ReportedBy: niko dot sams at gmail dot com
                CC: gdb-prs at sourceware dot org
 GCC build triplet: x86_64-pc-linux-gnu
  GCC host triplet: x86_64-pc-linux-gnu
GCC target triplet: x86_64-pc-linux-gnu


http://sourceware.org/bugzilla/show_bug.cgi?id=10136

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 4+ messages in thread
[parent not found: <bug-10136-4717@http.sourceware.org/bugzilla/>]

end of thread, other threads:[~2024-05-22 17:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-09 18:55 [Bug breakpoints/10136] New: rwatch not working when set before run niko dot sams at gmail dot com
2009-11-17 22:44 ` [Bug breakpoints/10136] " pedro at codesourcery dot com
     [not found] <bug-10136-4717@http.sourceware.org/bugzilla/>
2024-05-13 12:28 ` igorkuo at gmail dot com
2024-05-22 17:10 ` tromey at sourceware dot org

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).