This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: pthread_t ids of threads not showed by "thread info"


On Fri, 23 Apr 2010 17:35:54 +0200, Stefano Sabatini wrote:
> On date Friday 2010-04-23 16:25:11 +0200, Jan Kratochvil wrote:
> > You must have debug symbols from glibc.  On Fedora `debuginfo-install glibc',
> > some similar command on other distros.
> 
> OK now I have this problem:
> 
> (gdb) threads __stack_user
> Attempt to extract a component of a value that is not a structure.
> (gdb) threads stack_used

> (gdb) p __stack_user
> $1 = -1221236944
$1 = {next = 0x7ffff7fd19c0, prev = 0x7ffff7fd19c0}

> (gdb) p &__stack_user
> $4 = (<data variable, no debug info> *) 0xb7970160
$4 = (list_t *) 0x379501b280

> (gdb) p (void *)&__stack_user
> $5 = (void *) 0xb7970160
$5 = (void *) 0x379501b280

> (gdb) p (void *)&__stack_user.next
> Attempt to extract a component of a value that is not a structure.
$6 = (void *) 0x379501b280


> I have debug symbols installed (installed libc6-dbg on Debian).

You should bugreport it to libc6-dbg, __stack_user must have its type.


One could hack it more using just offsets without any struct definitions but
it was just a proof-of-concept hack the info is in the core file.  One should
just apply libthread_db even on the core files.


Regards,
Jan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]