mirror of
https://github.com/openharmony/third_party_elfutils.git
synced 2026-07-21 07:45:27 -04:00
libdwfl: linux-pid-attach.c (pid_next_thread): Use rewinddir on first call.
dwfl_getthreads would otherwise fail to report any threads after it was called once. Reported-by: Masatake YAMATO <yamato@redhat.com> Signed-off-by: Mark Wielaard <mjw@redhat.com>
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
2013-12-17 Mark Wielaard <mjw@redhat.com>
|
||||
|
||||
* linux-pid-attach.c (pid_next_thread): Call rewinddir on first
|
||||
traversal.
|
||||
|
||||
2013-12-16 Mark Wielaard <mjw@redhat.com>
|
||||
|
||||
* libdwfl.h (dwfl_module_getsymtab_first_global): New function
|
||||
|
||||
@@ -164,6 +164,9 @@ pid_next_thread (Dwfl *dwfl __attribute__ ((unused)), void *dwfl_arg,
|
||||
{
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user