Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@is.elta.co.il>
To: Fredrik Tolf <fredrik@dolda2000.cjb.net>
Cc: Daniel Jacobowitz <drow@mvista.com>, gdb@sources.redhat.com
Subject: Re: malloc() debugging
Date: Wed, 30 Oct 2002 22:05:00 -0000	[thread overview]
Message-ID: <Pine.SUN.3.91.1021031080248.20657D@is> (raw)
In-Reply-To: <006e01c28051$58125d20$8400a8c0@dolda2000.com>


On Wed, 30 Oct 2002, Fredrik Tolf wrote:

> Shouldn't gdb be enabled to do this in that case?

You cannot do that in a general manner; see below.

> Speaking of which, can't gdb create watchpoints to these structuress 
> every time malloc is called with conditions of $pc outside the malloc 
> functions and delete them when free is called?

That might work (barring the problem with limited watchpoint resources), 
but the showstopper is that you need an intimate knowledge about the C 
library's implementation of malloc, and you need to make sure the program 
was linked against a version of the library where debug info wasn't 
stripped.


      parent reply	other threads:[~2002-10-31  6:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-30 12:07 Fredrik Tolf
2002-10-30 12:11 ` Daniel Jacobowitz
2002-10-30 12:17   ` Fredrik Tolf
2002-10-30 12:26     ` Daniel Jacobowitz
2002-10-30 22:06       ` Eli Zaretskii
2002-10-30 22:05     ` Eli Zaretskii [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.SUN.3.91.1021031080248.20657D@is \
    --to=eliz@is.elta.co.il \
    --cc=drow@mvista.com \
    --cc=fredrik@dolda2000.cjb.net \
    --cc=gdb@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox