From: Vinay Sridhar <vinay@linux.vnet.ibm.com>
To: Daniel Jacobowitz <drow@false.org>
Cc: gdb-patches@sourceware.org, luisgpm@linux.vnet.ibm.com
Subject: Re: [RFC][Patch] Fix gdb failure to access tls data for parent thread
Date: Mon, 16 Feb 2009 15:04:00 -0000 [thread overview]
Message-ID: <1234779868.4861.7.camel@localhost.localdomain> (raw)
In-Reply-To: <20090215182233.GA24660@caradoc.them.org>
On Sun, 2009-02-15 at 13:22 -0500, Daniel Jacobowitz wrote:
> On Thu, Feb 12, 2009 at 11:13:26AM +0530, Vinay Sridhar wrote:
> > On Wed, 2009-02-11 at 10:53 -0500, Daniel Jacobowitz wrote:
> > > On Wed, Feb 11, 2009 at 02:01:08PM +0530, Vinay Sridhar wrote:
> > > > Daniel,
> > > >
> > > > Sorry for the late response. I can confirm that attach_thread is not
> > > > called on the parent thread. The test case I had listed in my earlier
> > > > mail uses OMP for thread creation. Could that have something to do with
> > > > this?
> > >
> > > Well, it shouldn't; libgomp uses the normal POSIX thread interfaces.
> > > I assume you're using GCC -fopenmp, right? Or is this another OpenMP
> > > implementation?
> > >
> >
> > I used IBM's XLC compiler which has an inbuilt OpenMP implementation.
>
> Sorry for the delay, I missed your message.
>
> In that case, you need to determine whether it is using POSIX threads
> or whether it is using clone directly and ignoring the thread library.
> If it is not using the POSIX threads library, how is it handling TLS
> inside the threads? If it is using pthread_create, why didn't we get
> a notification about it?
>
I was able to recreate this against a gcc compiled binary, so I guess
the omp implementation isnt an issue here.
Just to recap what I've been trying:
$ cat tlsdbg01.c
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <omp.h>
__thread int thr;
void initTlsData() {
printf("Initialising thread %d\n",thread);
}
int main(int argc, char *argv[]) {
#pragma omp parallel
{
thr = omp_get_thread_num();
initTlsData();
}
return(0);
}
1. gcc -g tlsdbg01.c -fopenmp -o tlsdbg
2. gdb ./tlsdbg
3. break initTlsData
4. thread 1
5. print thr
*Cannot find thread-local storage for LWP 29455, executable
*file /home/tmp/tlsdbg:
*TLS not supported on this target
Regards,
Vinay
--
Vinay Sridhar,
IBM Linux Technology Center
next prev parent reply other threads:[~2009-02-16 10:26 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-09 8:47 Vinay Sridhar
2009-02-04 13:29 ` Daniel Jacobowitz
2009-02-11 8:33 ` Vinay Sridhar
2009-02-11 15:53 ` Daniel Jacobowitz
2009-02-12 5:45 ` Vinay Sridhar
2009-02-16 3:19 ` Daniel Jacobowitz
2009-02-16 15:04 ` Vinay Sridhar [this message]
2009-02-16 15:20 ` Daniel Jacobowitz
2009-02-17 7:01 ` Vinay Sridhar
2009-02-17 16:20 ` Daniel Jacobowitz
2009-02-20 8:31 ` Vinay Sridhar
2009-02-23 0:17 ` Daniel Jacobowitz
2009-02-23 9:20 ` Vinay Sridhar
2009-02-23 16:10 ` Daniel Jacobowitz
2009-02-24 7:11 ` Pedro Alves
2009-02-24 13:33 ` Vinay Sridhar
2009-02-24 13:39 ` Vinay Sridhar
2009-02-24 17:16 ` Daniel Jacobowitz
2009-02-24 18:52 ` Pedro Alves
2009-02-24 18:58 ` Pedro Alves
2009-02-25 18:28 ` Vinay Sridhar
2009-02-27 21:49 ` Pedro Alves
2009-02-24 10:57 ` Vinay Sridhar
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=1234779868.4861.7.camel@localhost.localdomain \
--to=vinay@linux.vnet.ibm.com \
--cc=drow@false.org \
--cc=gdb-patches@sourceware.org \
--cc=luisgpm@linux.vnet.ibm.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