This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: hints on debugging memory corruption...
- From: Richard Henderson <rth at redhat dot com>
- To: Basile Starynkevitch <basile at starynkevitch dot net>
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 04 Feb 2011 08:17:45 -0800
- Subject: Re: hints on debugging memory corruption...
- References: <20110204154203.GA19472@ours.starynkevitch.net>
On 02/04/2011 07:42 AM, Basile Starynkevitch wrote:
> 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.
I typically find the location at which the object containing the address
is allocated. E.g. in alloc_block on the return statement. Make this
bp conditional on the object you're looking for.
r~