Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Michael Snyder <msnyder@redhat.com>
To: "H . J . Lu" <hjl@lucon.org>
Cc: GDB <gdb@sources.redhat.com>
Subject: Re: break doesn't work with thread on mips
Date: Wed, 06 Mar 2002 17:56:00 -0000	[thread overview]
Message-ID: <3C86C67D.D5D9D9A0@redhat.com> (raw)
In-Reply-To: <20020306174711.A26867@lucon.org>

"H . J . Lu" wrote:
> 
> On Wed, Mar 06, 2002 at 05:26:46PM -0800, Michael Snyder wrote:
> > "H . J . Lu" wrote:
> > >
> > > On Wed, Mar 06, 2002 at 05:20:34PM -0800, Michael Snyder wrote:
> > > > "H . J . Lu" wrote:
> > > > >
> > > > > When I do
> > > > >
> > > > > # gdb a.out
> > > > > (gdb) b main
> > > > > Breakpoint 1 at 0x400910: file x.c, line 25.
> > > > > (gdb) r
> > > > > (gdb) del 1
> > > > > (gdb) b main
> > > > > reading register sp (#29): No such process.
> > > > >
> > > > > That is break no longer works after the program runs if thread is used.
> > > > > Why does gdb want to read sp anyway?
> > > >
> > > > Probably because it has to analyze the prologue of main,
> > > > to place the breakpoint after the prologue.  Many prologue
> > > > analyzers will poke around at the stack.
> > >
> > > Why does gdb do that? The program has stopped.
> >
> > You gave it a symbol, "main".  It knows that you don't really want
> > to set a breakpoint at the address corresponding to that symbol
> > (the label or entry-point of main), but instead you would really
> > like to set a breakpoint at the first instruction after the prologue
> > of main.  It's not really useful to set a breakpoint before that.
> >
> > The fact that you happen to be sitting at that exact address is
> > irrelevant -- gdb doesn't know that.
> 
> My question is why gdb pokes a dead process. There is nothing to
> poke with. FYI, it only happens with thread.

Oh.  Well, from the log you've shown above, I don't see 
any indication that the process is dead.  Why is it dead?
How does gdb know that it's dead?


  reply	other threads:[~2002-03-07  1:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-06  1:05 H . J . Lu
2002-03-06 17:29 ` Michael Snyder
2002-03-06 17:32   ` H . J . Lu
2002-03-06 17:36     ` Michael Snyder
2002-03-06 17:47       ` H . J . Lu
2002-03-06 17:56         ` Michael Snyder [this message]
2002-03-06 19:35 ` Daniel Jacobowitz
2002-03-06 23:02   ` H . J . Lu

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=3C86C67D.D5D9D9A0@redhat.com \
    --to=msnyder@redhat.com \
    --cc=gdb@sources.redhat.com \
    --cc=hjl@lucon.org \
    /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