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

> 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 :-(

> When I switch back to gdb 5.0, calling functions in the same program
> works just fine.

Now that's a worry.

> Does anybody have an idea what's causing this.


Andrew


  reply	other threads:[~2003-05-22 13:52 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 [this message]
2003-05-22 15:46   ` Daniel Jacobowitz
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=3ECCD616.3040108@redhat.com \
    --to=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).