This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: hints on debugging memory corruption...
- From: Laurynas Biveinis <laurynas dot biveinis at gmail dot com>
- To: Basile Starynkevitch <basile at starynkevitch dot net>
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 4 Feb 2011 19:11:28 +0200
- Subject: Re: hints on debugging memory corruption...
- References: <20110204154203.GA19472@ours.starynkevitch.net>
2011/2/4 Basile Starynkevitch <basile@starynkevitch.net>:
> An obvious strategy is to use the hardware watchpoint feature of GDB.
> However, one cannot nicely put a watchpoint on an address which is not
> mmap-ed yet.
Actually, you can do this with a recent enough GDB (7.1 AFAIK). It
will keep watchpoint disabled until the page is mapped in, then
enables it automatically (perhaps might have false hits if the page is
cleared etc.) However I still like the method described by Ian and rth
better.
--
Laurynas