Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@false.org>
To: Arvid Brodin <arvid.brodin@enea.com>
Cc: gdb@sourceware.org
Subject: Re: Problem debugging multi-threaded application
Date: Mon, 21 Jan 2008 18:35:00 -0000	[thread overview]
Message-ID: <20080121183517.GA28048@caradoc.them.org> (raw)
In-Reply-To: <4794E3DD.2030909@enea.com>

On Mon, Jan 21, 2008 at 07:26:37PM +0100, Arvid Brodin wrote:
> If I invoke gdb under strace, i.e. 'strace -f -o strace-out.txt gdb
> <my-program>'

Don't do that :-)  strace and gdb both use the ptrace interface; if
you tell strace to follow children with -f, then it will win and
gdb will not be able to debug the program it started.

> The problem exists on these platforms: 

Since the problem exists on older platforms and not on newer ones, it
may be a bug in the Linux kernel or glibc which has since been fixed.
GDB is very sensitive to such bugs.

> I have no idea if this is a bug in gdb, if we do something bad in
> our program, if it is a bug in nptl, or ...

It sounds sort of like a problem with job control and terminal groups,
but I'm not sure I have enough to guess... can you run it and use the
gdb "attach" command?

-- 
Daniel Jacobowitz
CodeSourcery


  reply	other threads:[~2008-01-21 18:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-21 18:27 Arvid Brodin
2008-01-21 18:35 ` Daniel Jacobowitz [this message]
2008-01-22 11:56   ` Arvid Brodin
2008-01-29 15:36 ` Arvid Brodin

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=20080121183517.GA28048@caradoc.them.org \
    --to=drow@false.org \
    --cc=arvid.brodin@enea.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