Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "André Pönitz" <apoenitz@trolltech.com>
To: gdb@sourceware.org
Subject: Re: How to interpret (encoded?) gdb response
Date: Fri, 15 Aug 2008 15:59:00 -0000	[thread overview]
Message-ID: <200808151009.30158.apoenitz@trolltech.com> (raw)
In-Reply-To: <48A45BED.3080606@vmware.com>

On Thursday 14 August 2008 18:23:09 Michael Snyder  wrote:
> André Pönitz wrote:
> > [...]
> >   - run an inferior containing a tight endless loop
> >   - attach to it with gdb -pid=<id>
> >   - run  'kill <pid>' in shell
> >   - do  -exec-continue
> > 
> > then I get:
> > 
> >   67^running
> >   (gdb)
> >   &"Cannot access memory at address 0x7fff6ca72a4c\n"
> >   &"\240\240\354\003\n"
> >   67^error,msg="\240\240\354\003"
> >  [...]
> 
> Here's the problem, I think ...
> 
> "kill <pid>" without a signal value defaults to SIGKILL,
> which cannot be intercepted or differed.  That means that
> the process goes away "right now".
> 
> GDB, however, is sitting at the user prompt, thinking
> that the process is not running.  We're not expecting
> the process to get signals when it's not running.

I understand that I am doing "something nasty". But that was the
result of stripping down some (largish) real world example. In a 
multitasking environment sometimes "nasty" things like sending
signals to processes happen behind the scenes and I'd like to be
able to handle such cases gracefully ;-}

Of course, gdb cannot do much if the process is gone, and it nicely
flags an error. I was just assuming that the accompanying error 
message would contain some information on what happened, but
Daniel's suspicion of a bad pointer seems to be right...

Regards,
André


  parent reply	other threads:[~2008-08-15  8:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-14 16:31 André Pönitz
2008-08-14 20:30 ` Daniel Jacobowitz
2008-08-14 20:39 ` Michael Snyder
2008-08-15  8:49   ` Daniel Jacobowitz
2008-08-15 15:59   ` André Pönitz [this message]
2008-08-15 23:28     ` Michael Snyder

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=200808151009.30158.apoenitz@trolltech.com \
    --to=apoenitz@trolltech.com \
    --cc=gdb@sourceware.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