public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@mvista.com>
To: Andrew Cagney <ac131313@redhat.com>
Cc: Klaus Zeitler <kzeitler@lucent.com>, gdb@sources.redhat.com
Subject: Re: calling functions in gdb sometimes doesn't work
Date: Thu, 22 May 2003 15:46:00 -0000	[thread overview]
Message-ID: <20030522153835.GA25965@nevyn.them.org> (raw)
In-Reply-To: <3ECCD616.3040108@redhat.com>

On Thu, May 22, 2003 at 09:52:22AM -0400, Andrew Cagney wrote:
> >Hi,
> >
> >with gdb 5.2 (Solaris 5.8) sometimes calling a function,
> >e.g. hello(){printf("hello\n");}, results in the following message:
> >
> >(gdb) p hello()
> >
> >The program being debugged stopped while in a function called from GDB.
> >When the function (hello) is done executing, GDB will silently
> >stop (instead of continuing to evaluate the expression containing
> >the function call).
> >
> >When I try to continue my program it appears as if this function didn't get
> >call at all.
> >Unfortunately this doesn't happen with simple example programs.
> >The program I'm debugging is threaded (maybe this has something
> >to do with it).
> 
> Check which thread has stopped.
> 
> I'm not sure that GDB's behavior, when trying to do an inferior function 
> call on a threaded program is, er, very well defined :-(

In fact, it really doesn't work right.  Jim discovered a few months ago
that other threads will be resumed.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer

  reply	other threads:[~2003-05-22 15:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-22 12:41 Klaus Zeitler
2003-05-22 13:52 ` Andrew Cagney
2003-05-22 15:46   ` Daniel Jacobowitz [this message]
2003-05-23 14:03     ` Klaus Zeitler
2003-05-23 13:13 Klaus Zeitler

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=20030522153835.GA25965@nevyn.them.org \
    --to=drow@mvista.com \
    --cc=ac131313@redhat.com \
    --cc=gdb@sources.redhat.com \
    --cc=kzeitler@lucent.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).