This is the mail archive of the
gdb@sourceware.cygnus.com
mailing list for the GDB project.
automatic adding of memory access breakpoints
- To: gdb at sourceware dot cygnus dot com
- Subject: automatic adding of memory access breakpoints
- From: Erik Thiele <erikyyy at erikyyy dot de>
- Date: Wed, 7 Jun 2000 14:54:09 +0200
hi.
am programming in C.
i have program that automatically creates blocks in memory
where the debugger shall break once someone accesses the block
both reading or writing.
yes this is a malloc debugger.
the idea:
if you do void *pt = malloc (1000);
you get:
KILLERBLOCK data KILLERBLOCK
^
\_ pt
if you do free(pt);
he will check if one of the killerblocks has changed.
but then i cannot say anymore when they were changed.
to quit once they are changed i need debugger help.
how can my program automatically add such blocks into gdb???
or is there some way to do this linux level?
i.e. any mmap tricks ?
all i need is a segfault or buserror or whatsoever
right in the moment someone accesses the KILLERBLOCKs.
thanks & cu
erik
--
Name: Erik Thiele \\\\
Email: erikyyy@erikyyy.de o `QQ'_
IRC: erikyyy / __8
WWW: http://www.erikyyy.de/ ' `