[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Libunwind-devel] src/os-linux.h:maps_init and threads
From: |
Philippe De Muyter |
Subject: |
[Libunwind-devel] src/os-linux.h:maps_init and threads |
Date: |
Thu, 31 Aug 2017 11:54:15 +0200 |
User-agent: |
Mutt/1.5.16 (2007-06-09) |
Hi all
I try to use libunwind (on arm linux) and I need a clarification.
I use libunwind to get call stacks of a running multithreaded process.
Do I need to call 'UPT_create' for each thread pid, as the documentation
of unw_init_remote() seems to imply, or only once for the process pid ?
I looked at libunwind sources and /proc on my current linux machine,
and see that 'maps_init' in src/os-linux.h opens /proc/pid/maps,
while on my machine that file exists only with the pid of a process,
but not for any of its threads, so _UPT_get_proc_info, as called by
unw_step often fails, IIRC.
Do I need to create my own find_proc_info accessor that will call
_UPT_find_proc_info replacing the thread (void *arg) by one
created for the process ?
Is there a remote-multithreaded version of the show_backtrace example
in libunwind(3) man page ?
TIA
--
Philippe De Muyter +32 2 6101532 Macq SA rue de l'Aeronef 2 B-1140 Bruxelles