From: Arvid Brodin <arvid.brodin@enea.com>
To: gdb@sourceware.org
Cc: drow@false.org
Subject: Re: Problem debugging multi-threaded application
Date: Tue, 22 Jan 2008 11:56:00 -0000 [thread overview]
Message-ID: <4795D9E7.9000101@enea.com> (raw)
In-Reply-To: <20080121183517.GA28048@caradoc.them.org>
On 2008-01-21 19:35, Daniel Jacobowitz wrote:
> 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.
That explains a lot. Thanks for the info!
>> 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?
Actually, that was one of the first things I tried, and yes, that works fine. Sorry for not mentioning it before. I also found this old message regarding a similar symptom and foregrounding/backgrounding and SIGTTOU, which suggests commenting out the [New Thread ...] message. I tried that but it made no difference. I suspect that particular bug has been long fixed:
http://sourceware.org/ml/gdb/2004-03/msg00251.html
--
Arvid Brodin
Enea LCC
next prev parent reply other threads:[~2008-01-22 11:56 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
2008-01-22 11:56 ` Arvid Brodin [this message]
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=4795D9E7.9000101@enea.com \
--to=arvid.brodin@enea.com \
--cc=drow@false.org \
--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