From: Kevin Pouget <kevin.pouget@gmail.com>
To: maillist-gdbpatches@barfooze.de
Cc: gdb-patches@sourceware.org
Subject: Re: wrong assumptions about pthread_t being numeric
Date: Sat, 01 Oct 2011 09:14:00 -0000 [thread overview]
Message-ID: <CAPftXULPSR1HTaSaCw6Hy3mocT9WPSHspnr+d7POKokW24VaoQ@mail.gmail.com> (raw)
In-Reply-To: <201110010900.p9190Jsm019191@glazunov.sibelius.xs4all.nl>
On Sat, Oct 1, 2011 at 11:00 AM, Mark Kettenis <mark.kettenis@xs4all.nl> wrote:
>> From: Pedro Alves <pedro@codesourcery.com>
>> Date: Sat, 1 Oct 2011 02:59:59 +0100
>>
>> > there
>> > should be at least a explicit function/macro which takes a thread_t and
>> > converts it to long, since it is assumed in a couple of spots that it is
>> > of this type.
>> > that is exactly what my patch does.
>> >
>> > and as you wished, it fixes the current issue with minimal effort.
>>
>> The patch has a number of problems (no biggie, just the usual for
>> someone not used to GNU code). I'll take a look if I still failed
>> to convince you to change musl instead.
>
> No, I think you shouldn't. This whole madness with a zillion Linux
> libc's has to stop. We can't add support for each and every one of
> them. I think we should take the position that if people want thread
> support for their non-standard libc's in GDB they should provide a
> libthread_db.so that is ABI compatible with the one provided by glibc.
> Since pthread_t is part of that ABI, that means pthread_t has to be
> "unsigned long int".
Just my 2 cents here,
but a few years ago, I developped a library named "User-Level
Thread_db" [1], which aims at reducing the burden of thread-library
developpers when it comes to provide debuggers support.
> they should provide a libthread_db.so that is ABI compatible with the one provided by glibc
I took the opposite approach: I developped the `libthread_db.so' and
the thread-target on GDB's side, and then specified a very light API
to link `libthread_db.so' to the threading library.
The appoach was demonstrated efficient on two different libraries,
just a few days requied for the integration.
That was on the 6.8 days, so some adaptations should be necessary for
7.*, but most of the work is already in place.
Cordially,
Kevin
[1] http://mpc.sourceforge.net/files/PouPerCarJou10MTAAP.pdf
next prev parent reply other threads:[~2011-10-01 9:14 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-16 23:01 John Spencer
2011-09-16 23:16 ` Pedro Alves
2011-09-17 0:31 ` John Spencer
2011-09-17 1:05 ` Pedro Alves
2011-09-17 1:23 ` John Spencer
2011-09-17 2:29 ` Matt Rice
2011-09-17 6:47 ` Joel Brobecker
2011-09-18 0:11 ` John Spencer
2011-09-29 2:31 ` John Spencer
2011-09-29 8:39 ` Kai Tietz
2011-10-01 1:08 ` John Spencer
2011-09-29 11:10 ` Pedro Alves
2011-09-17 15:29 ` Pedro Alves
2011-09-17 15:47 ` Pedro Alves
2011-10-01 1:02 ` John Spencer
2011-10-01 2:00 ` Pedro Alves
2011-10-01 9:00 ` Mark Kettenis
2011-10-01 9:14 ` Kevin Pouget [this message]
2011-10-05 8:02 ` John Spencer
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=CAPftXULPSR1HTaSaCw6Hy3mocT9WPSHspnr+d7POKokW24VaoQ@mail.gmail.com \
--to=kevin.pouget@gmail.com \
--cc=gdb-patches@sourceware.org \
--cc=maillist-gdbpatches@barfooze.de \
/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