From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org
Cc: John Spencer <maillist-gdbpatches@barfooze.de>
Subject: Re: wrong assumptions about pthread_t being numeric
Date: Fri, 16 Sep 2011 23:16:00 -0000 [thread overview]
Message-ID: <201109170000.43306.pedro@codesourcery.com> (raw)
In-Reply-To: <4E73D06F.603@barfooze.de>
On Friday 16 September 2011 23:40:47, John Spencer wrote:
> i basically wanted to fix my compile error and send a patch, but i think
> this should be discussed first.
> $ grep ti_tid `find gdb-7.3.1 -name '*.c'`
> gdb-7.3.1/gdb/sol-thread.c: return BUILD_THREAD (ti.ti_tid, PIDGET (lwp));
> gdb-7.3.1/gdb/sol-thread.c: ptid = BUILD_THREAD (ti.ti_tid, PIDGET
> (inferior_ptid));
> gdb-7.3.1/gdb/sol-thread.c: ti.ti_tid, ti.ti_lid);
> gdb-7.3.1/gdb/aix-thread.c: return thrinf.ti_tid;
These are only built natively on solaris and aix respectively, so
let's just leave them alone.
> thread-db.c: In function 'find_one_thread':
> thread-db.c:295:7: error: format '%ld' expects type 'long int', but
> argument 3 has type 'thread_t'
> thread-db.c: In function 'attach_thread':
> thread-db.c:335:7: error: format '%ld' expects type 'long int', but
> argument 3 has type 'thread_t'
> thread-db.c:341:9: error: format '%ld' expects type 'long int', but
> argument 2 has type 'thread_t'
So just cast it to long, and you're done.
> gdb-7.3.1/gdb/linux-thread-db.c: gdb_assert (ti_p->ti_tid != 0);
> gdb-7.3.1/gdb/linux-thread-db.c: private->tid = ti_p->ti_tid;
> gdb-7.3.1/gdb/linux-thread-db.c: if (ti.ti_tid == 0 &&
> target_has_execution)
> gdb-7.3.1/gdb/gdbserver/thread-db.c: ti.ti_tid, ti.ti_lid);
> gdb-7.3.1/gdb/gdbserver/thread-db.c: if (ti.ti_tid == 0)
> gdb-7.3.1/gdb/gdbserver/thread-db.c: ti_p->ti_tid, ti_p->ti_lid);
> gdb-7.3.1/gdb/gdbserver/thread-db.c: ti_p->ti_tid, ti_p->ti_lid);
Does your libc actually have a libthread_db.so?
--
Pedro Alves
next prev parent reply other threads:[~2011-09-16 23:01 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 [this message]
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
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=201109170000.43306.pedro@codesourcery.com \
--to=pedro@codesourcery.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