public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/12956] New: Watchpoint on invalid memory addressed is too slow, they should be 'pending' until allocated
@ 2011-07-02 20:41 yuri at tsoft dot com
  2011-07-06  1:29 ` [Bug gdb/12956] " qiyao at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: yuri at tsoft dot com @ 2011-07-02 20:41 UTC (permalink / raw)
  To: gdb-prs

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

           Summary: Watchpoint on invalid memory addressed is too slow,
                    they should be 'pending' until allocated
           Product: gdb
           Version: 7.2
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: gdb
        AssignedTo: unassigned@sourceware.org
        ReportedBy: yuri@tsoft.com


I am setting a watchpoint for the memory address that is not yet allocated. I
am interested in what happens when it is allocated and later.

'watch' statement sets a software watchpoint, and program instantly becomes
very slow. My guess is that gdb traces the program and checks if the memory is
valid after each instruction. This is wrong.

Since memory can only become valid after mmap or brk/sbrk calls, gdb should
only trace those calls in such situation, which is a 'pending' state for a
watchpoint. Once the memory address becomes valid, gdb should change status to
hardware watchpoint. If the memory is deallocated again (with munmap or
brk/sbrk calls) gdb should change state back to 'pending' and wait for the
possible other allocations.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-07-31 19:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-02 20:41 [Bug gdb/12956] New: Watchpoint on invalid memory addressed is too slow, they should be 'pending' until allocated yuri at tsoft dot com
2011-07-06  1:29 ` [Bug gdb/12956] " qiyao at gcc dot gnu.org
2011-07-06  1:38 ` yuri at tsoft dot com
2011-07-31 19:10 ` ppluzhnikov at google dot com

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