diff options
author | Serhei Makarov <[email protected]> | 2025-02-27 14:38:55 -0500 |
---|---|---|
committer | Serhei Makarov <[email protected]> | 2025-02-27 14:46:01 -0500 |
commit | 71690f364bd414c9a5bb8fd60ec50ed72be0599f (patch) | |
tree | 1d389f89c8fbdbae41321c2a1f122a8f8c17bda1 | |
parent | e05eddd643a46c004795df7a628373f220ea36b2 (diff) |
libdwfl: add dwfl_thread_eblupstream/users/serhei/eu-stacktrace.v1
Exposing the Ebl * here allows libdwfl users to access the
ebl_set_initial_regs_sample callback for a given process.
* libdw/libdw.map: Add dwfl_thread_ebl.
* libdwfl/dwfl_frame.c (dwfl_thread_ebl): New function.
* libdwfl/dwfl_frame.c (dwfl_thread_ebl): New function.
-rw-r--r-- | libdw/libdw.map | 1 | ||||
-rw-r--r-- | libdwfl/dwfl_frame.c | 6 | ||||
-rw-r--r-- | libdwfl/libdwfl.h | 5 |
3 files changed, 12 insertions, 0 deletions
diff --git a/libdw/libdw.map b/libdw/libdw.map index ce990a09..a8241a29 100644 --- a/libdw/libdw.map +++ b/libdw/libdw.map @@ -393,4 +393,5 @@ ELFUTILS_0.193 { dwfl_process_tracker_end; dwfl_process_tracker_find_elf; dwfl_process_tracker_find_pid; + dwfl_thread_ebl; } ELFUTILS_0.192; diff --git a/libdwfl/dwfl_frame.c b/libdwfl/dwfl_frame.c index 1e715346..46b16b3a 100644 --- a/libdwfl/dwfl_frame.c +++ b/libdwfl/dwfl_frame.c @@ -239,6 +239,12 @@ dwfl_thread_dwfl (Dwfl_Thread *thread) } INTDEF(dwfl_thread_dwfl) +Ebl * +dwfl_thread_ebl (Dwfl_Thread *thread) +{ + return thread->process->ebl; +} + pid_t dwfl_thread_tid (Dwfl_Thread *thread) { diff --git a/libdwfl/libdwfl.h b/libdwfl/libdwfl.h index 16b351cf..1092d2e1 100644 --- a/libdwfl/libdwfl.h +++ b/libdwfl/libdwfl.h @@ -30,6 +30,7 @@ #define _LIBDWFL_H 1 #include "libdw.h" +#include "libebl.h" #include <stdio.h> /* Handle for a session using the library to attach to a single target process. */ @@ -786,6 +787,10 @@ pid_t dwfl_pid (Dwfl *dwfl) Dwfl *dwfl_thread_dwfl (Dwfl_Thread *thread) __nonnull_attribute__ (1); +/* Return EBL associated with THREAD. This function never fails. */ +Ebl *dwfl_thread_ebl (Dwfl_Thread *thread) + __nonnull_attribute__ (1); + /* Return positive TID (thread ID) for THREAD. This function never fails. */ pid_t dwfl_thread_tid (Dwfl_Thread *thread) __nonnull_attribute__ (1); |