From: Pedro Alves <pedro@codesourcery.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA/commit] Add support for DEC threads on alpha-osf
Date: Tue, 07 Oct 2008 15:19:00 -0000 [thread overview]
Message-ID: <200810071619.36274.pedro@codesourcery.com> (raw)
In-Reply-To: <20081007150154.GI28138@adacore.com>
On Tuesday 07 October 2008 16:01:54, Joel Brobecker wrote:
> Thanks for the quick feedback!
>
> > Hmmm, procfs.c. It looks weird that LWP 3 and the main process are
> > the same thing. If they are the same, and I haven't messed something up,
> > you should only see one of them. IIRC, I don't get that on solaris.
>
> How does it work (to determine whether the process and the LWP are
> the same)? I could probably take a look. Not sure whether I could
> help much, though.
Maybe here:
procfs_init_inferior:
...
/* We now have have access to the lwpid of the main thread/lwp. */
lwpid = proc_get_current_thread (pi);
/* Create a procinfo for the main lwp. */
create_procinfo (pid, lwpid);
/* We already have a main thread registered in the thread table at
this point, but it didn't have any lwp info yet. Notify the core
about it. This changes inferior_ptid as well. */
thread_change_ptid (pid_to_ptid (pid),
MERGEPID (pid, lwpid));
... maybe proc_get_current_thread returns 0, and then later on in
procfs_wait we're adding the main thread again, but then with an
lwp id already. But what sounded very strange is that the LWP is
number 3, not 1.
> I don't mind having a quick
> look if it's not too time-consuming. What do you think?
It's certainly fine the way it is to me, just an annoyance. I'm happy
to find out that we don't crash in this situation, so thanks
for that. :-)
--
Pedro Alves
next prev parent reply other threads:[~2008-10-07 15:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-07 13:04 Joel Brobecker
2008-10-07 14:08 ` Pedro Alves
2008-10-07 15:02 ` Joel Brobecker
2008-10-07 15:19 ` Pedro Alves [this message]
2008-10-07 15:24 ` Joel Brobecker
2008-10-07 16:36 ` Pedro Alves
2008-10-07 15:21 ` Nathan Froyd
2008-10-20 15:50 ` Joel Brobecker
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=200810071619.36274.pedro@codesourcery.com \
--to=pedro@codesourcery.com \
--cc=brobecker@adacore.com \
--cc=gdb-patches@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