This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug gdb/12956] New: Watchpoint on invalid memory addressed is tooslow, they should be 'pending' until allocated
- From: "yuri at tsoft dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Sat, 2 Jul 2011 20:41:08 +0000
- Subject: [Bug gdb/12956] New: Watchpoint on invalid memory addressed is tooslow, they should be 'pending' until allocated
- Auto-submitted: auto-generated
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.