This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug gdb/12956] New: Watchpoint on invalid memory addressed is tooslow, they should be 'pending' until allocated


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]