This is the mail archive of the
mailing list for the elfutils project.
[PATCH 0/5] libdwfl: expand stack frame interface
- From: Omar Sandoval <osandov at osandov dot com>
- To: elfutils-devel at sourceware dot org
- Date: Mon, 7 Oct 2019 02:05:34 -0700
- Subject: [PATCH 0/5] libdwfl: expand stack frame interface
From: Omar Sandoval <email@example.com>
While using the libdwfl stack unwinding interface for my debugger , I
found that it works great for getting the program counter at each stack
frame, but it's hard to do anything beyond that. This is an attempt to
expand the functionality by adding two main features: attaching
to/detaching from threads at will, and evaluating DWARF expressions.
This functionality already exists within libdwfl, so it's just a matter
of defining the interface.
Patches 1 and 2 are cleanups in preparation for the rest of the series.
Patch 3 adds dwfl_attach_thread and dwfl_detach_thread so that it's
possible to attach to threads at will and save stack frames so that they
can be inspected later. Patch 4 adds dwfl_frame_module and
dwfl_frame_dwarf_frame to avoid redundant lookups internally and in
clients of libdwfl. Patch 5 adds dwfl_frame_eval_expr for evaluating
DWARF expressions in the context of a stack frame.
Please let me know what you think.
Omar Sandoval (5):
libdwfl: don't bother freeing frames outside of dwfl_thread_getframes
libdwfl: only use thread->unwound for initial frame
libdwfl: add interface for attaching to/detaching from threads
libdwfl: cache Dwfl_Module and Dwarf_Frame for Dwfl_Frame
libdwfl: add interface for evaluating DWARF expressions in a frame
libdw/ChangeLog | 9 ++
libdw/libdw.map | 8 ++
libdwfl/ChangeLog | 31 +++++++
libdwfl/dwfl_frame.c | 190 ++++++++++++++++++++++++-----------------
libdwfl/frame_unwind.c | 37 +++++++-
libdwfl/libdwfl.h | 28 ++++++
libdwfl/libdwflP.h | 9 +-
7 files changed, 228 insertions(+), 84 deletions(-)