Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Bob Rossi <bob@brasko.net>
To: GDB <gdb@sources.redhat.com>
Subject: Re: [mi] watchpoint-scope exec async command
Date: Mon, 28 Mar 2005 22:54:00 -0000	[thread overview]
Message-ID: <20050328235310.GA3699@white> (raw)
In-Reply-To: <20050328224101.GA629@nevyn.them.org>

On Mon, Mar 28, 2005 at 05:41:01PM -0500, Daniel Jacobowitz wrote:
> On Mon, Mar 28, 2005 at 05:56:19PM -0500, Bob Rossi wrote:
> >    (gdb) n
> >    Hardware watchpoint 2 deleted because the program has left the block
> >    in which its expression is valid.
> >    Segmentation fault
> > 
> > The crash only happens sometimes. Although when I run it over and over,
> > I will eventually get it.
> > 
> > Here is the problem I found,
> > 
> >    (gdb) n
> >    Hardware watchpoint 2 deleted because the program has left the block
> >    in which its expression is valid.
> >    ==26644== Invalid write of size 4
> >    ==26644==    at 0x80D9B32: insert_bp_location (breakpoint.c:1022)
> >    ==26644==    by 0x80D9EDA: insert_breakpoints (breakpoint.c:1151)
> >    ==26644==    by 0x8119620: proceed (infrun.c:774)
> 
> I envy you.  I can't get valgrind to work with GDB; once I try to run a
> child process, it falls over.

Yeah, I was thinking I could script valgrind through the GDB testsuite,
and report any memory leaks/memory corruption. This would probably be a
big task though ...

> > So, basically, I can't figure out why the breakpoint field
> > 'related_breakpoint' became in valid. I believe it was valid when the
> > breakpoint was created, since the memset is there. However, at some
> > point, it must have become invalid ...
> 
> The related breakpoint is supposed to be the scope breakpoint; I can't
> see how they could become unpaired.  You may want to run a debugger on
> GDB, using a watchpoint to see what changes it?

I've tried this, GDB didn't seem to think anyone access'd
b->related_breakpoint between the time it was set in watch_command_1 to
the time that valgrind gives the error in insert_bp_location.

My hunch is that b->related_breakpoint's memory was free'd and never set
to NULL. Is this possible? I don't think a watchpoint would pick that
up, would it?

Any other ideas? I've been debugging, but since I don't have a high
level overview of the data structures, I'm a little handicapped.

Bob Rossi


  reply	other threads:[~2005-03-28 22:54 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-25 16:12 Bob Rossi
2005-03-25 16:25 ` gdbserver question james osburn
2005-03-25 16:33   ` Daniel Jacobowitz
2005-03-26 13:27 ` [mi] watchpoint-scope exec async command Eli Zaretskii
2005-03-26 13:44   ` Bob Rossi
2005-03-27 14:10   ` Bob Rossi
2005-03-28 21:57   ` Bob Rossi
2005-03-28 22:40     ` Daniel Jacobowitz
2005-03-28 22:54       ` Bob Rossi [this message]
2005-03-28 22:59         ` Daniel Jacobowitz
2005-03-29  0:43           ` Bob Rossi
2005-03-29  1:35             ` Daniel Jacobowitz
2005-03-29  1:51               ` Bob Rossi
2005-03-29  2:00                 ` Daniel Jacobowitz
2005-03-29 21:33                   ` Eli Zaretskii
2005-03-29 21:39                     ` Mark Kettenis
2005-03-29 21:47                       ` Bob Rossi
2005-03-30  5:15                       ` Eli Zaretskii
2005-03-29 21:43                     ` Daniel Jacobowitz
2005-03-30 20:10                       ` Eli Zaretskii
2005-03-31  0:49                         ` Bob Rossi
2005-03-31  4:43                           ` Eli Zaretskii
2005-03-31 19:59                             ` Bob Rossi
2005-04-01  8:10                               ` Eli Zaretskii
2005-04-01 14:09                                 ` Daniel Jacobowitz
2005-04-02  9:54                                   ` Eli Zaretskii
2005-04-06  2:13                                     ` Bob Rossi
2005-04-06  3:51                                       ` Eli Zaretskii
2005-03-31  2:32                         ` Daniel Jacobowitz
2005-03-31  4:48                           ` Eli Zaretskii
2005-03-31  6:00                             ` Daniel Jacobowitz
2005-03-31 19:49                               ` Eli Zaretskii
2005-03-29 23:29                     ` Bob Rossi
2005-03-30  5:12                       ` Eli Zaretskii
2005-03-30  0:29                     ` Bob Rossi

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=20050328235310.GA3699@white \
    --to=bob@brasko.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