[PATCH] Introduce tids cache for dwfl_getthreads

Mark Wielaard mjw at redhat.com
Tue Dec 17 09:41:51 UTC 2013


On Mon, 2013-12-16 at 17:01 +0100, Jan Kratochvil wrote:
> On Mon, 16 Dec 2013 16:24:26 +0100, Mark Wielaard wrote:
> > --- a/libdwfl/linux-pid-attach.c
> > +++ b/libdwfl/linux-pid-attach.c
> > @@ -164,6 +164,9 @@ pid_next_thread (Dwfl *dwfl __attribute__
> > ((unused)), void *
> >  {
> >    struct pid_arg *pid_arg = dwfl_arg;
> >    struct dirent *dirent;
> > +  /* Start fresh on first traversal. */
> > +  if (*thread_argp == NULL)
> > +    rewinddir (pid_arg->dir);
> >    do
> >      {
> >        errno = 0;
> 
> I also find this patch somehow more suitable / good enough.

I pushed this variant of the fix as attached.
Thanks for reporting Masatake and sorry we went with the simpler fix.

Cheers,

Mark
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-libdwfl-linux-pid-attach.c-pid_next_thread-Use-rewin.patch
Type: text/x-patch
Size: 1408 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/elfutils-devel/attachments/20131217/83beda77/attachment-0001.bin>


More information about the elfutils-devel mailing list