From: Stefano Sabatini <stefano.sabatini-lala@poste.it>
To: gdb Mailing List <gdb@sources.redhat.com>
Subject: Re: pthread_t ids of threads not showed by "thread info"
Date: Mon, 26 Apr 2010 11:07:00 -0000 [thread overview]
Message-ID: <20100426110718.GA10712@geppetto> (raw)
In-Reply-To: <20100426090357.GA27874@host0.dyn.jankratochvil.net>
On Monday 2010-04-26 11:03:57 +0200, Jan Kratochvil wrote:
> On Mon, 26 Apr 2010 10:38:09 +0200, Stefano Sabatini wrote:
> > $ cd /usr/lib/debug/lib
> > $ cd
> > $ nm -S libpthread-2.10.2.so | grep __stack_user
> > 00017160 00000008 b __GI___stack_user
> > 00017160 00000008 b __stack_user
> > $ nm -S libpthread-2.10.2.so | grep stack_used
> > 0001511c 00000008 d stack_used
>
> You should have DWARFs symbols. The ELF symbols are not enough for structures
> derefencing.
>
> readelf -wi /usr/lib/debug/lib64/libpthread.so.0.debug
> [ formatted a bit ]
> <1><9304>: Abbrev Number: 111 (DW_TAG_variable)
> <9305> DW_AT_name : (indirect string, offset: 0x300b): __stack_user
> <930f> DW_AT_type : <0x461b>
> <9313> DW_AT_external : 1
> <9314> DW_AT_location : 9 byte block: 3 80 b2 21 0 0 0 0 0 (DW_OP_addr: 21b280)
> <1><461b>: Abbrev Number: 3 (DW_TAG_typedef)
> <461c> DW_AT_name : (indirect string, offset: 0x7f8): list_t
> <4622> DW_AT_type : <0x45f0>
> <1><45f0>: Abbrev Number: 14 (DW_TAG_structure_type)
> <45f1> DW_AT_name : (indirect string, offset: 0x2469): list_head
> <45f5> DW_AT_byte_size : 16
> <2><45fc>: Abbrev Number: 11 (DW_TAG_member)
> <45fd> DW_AT_name : (indirect string, offset: 0x169d): next
> <4603> DW_AT_type : <0x4615>
> <4607> DW_AT_data_member_location: 0
> <2><4608>: Abbrev Number: 11 (DW_TAG_member)
> <4609> DW_AT_name : (indirect string, offset: 0x1303): prev
> <460f> DW_AT_type : <0x4615>
> <4613> DW_AT_data_member_location: 8
>
> Anyway these symbols are not required for the right way of traversing this
> list. For that purpose (as being used for native non-core `info threads') GDB
> just calls functions provided by /lib64/libthread_db.so.1 . You can check glibc
> sources for nptl_db/td_ta_thr_iter.c . nptl_db uses simple ELF symbols not
> requiring the debuginfo files, like this one:
> $ gdb -q -ex 'p *(int *)_thread_db_pthread_list' -ex q /lib64/libpthread.so.0
> $1 = 128
>
>
> > I'm currently stucked with this, I really cannot say if it is a
> > problem with what I'm doing or with some debian specific issue.
>
> If Debian GDB cannot find the symbols guessing Debian probably has more light
> (smaller) debug info packages.
Can you suggest a command I can use to check this?
Thanks, regards.
next prev parent reply other threads:[~2010-04-26 11:07 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-22 15:19 Stefano Sabatini
2010-04-22 15:44 ` Stefano Sabatini
2010-04-22 16:59 ` Jan Kratochvil
2010-04-23 7:51 ` Stefano Sabatini
2010-04-23 10:25 ` Jan Kratochvil
2010-04-23 14:21 ` Stefano Sabatini
2010-04-23 14:25 ` Jan Kratochvil
2010-04-23 15:36 ` Stefano Sabatini
2010-04-23 15:46 ` Jan Kratochvil
2010-04-26 8:38 ` Stefano Sabatini
2010-04-26 9:04 ` Jan Kratochvil
2010-04-26 11:07 ` Stefano Sabatini [this message]
2010-04-26 11:25 ` Jan Kratochvil
2010-04-23 14:29 ` Stefano Sabatini
2010-04-23 11:50 ` Pedro Alves
2010-04-23 12:31 ` Mark Kettenis
2010-04-23 12:47 ` Pedro Alves
2010-04-23 15:37 ` Mark Kettenis
2010-04-23 15:51 ` Pedro Alves
2010-08-04 14:36 ` Pedro Alves
2010-08-04 14:57 ` Mark Kettenis
2010-08-04 15:29 ` Pedro Alves
2010-08-04 16:53 ` Ulrich Weigand
2010-08-04 17:14 ` Pedro Alves
2010-08-04 17:40 ` Pedro Alves
2010-08-04 17:44 ` Ulrich Weigand
2010-08-04 18:20 ` Pedro Alves
2010-08-04 18:34 ` Ulrich Weigand
2010-08-04 20:41 ` Pedro Alves
2010-08-04 17:45 ` Ulrich Weigand
2010-04-22 20:52 ` Petr Hluzín
2010-04-22 20:56 ` Daniel Jacobowitz
2010-08-18 14:17 ` Pedro Alves
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=20100426110718.GA10712@geppetto \
--to=stefano.sabatini-lala@poste.it \
--cc=gdb@sources.redhat.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