public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/5] libdwfl: expand stack frame interface
@ 2019-10-07  9:05 Omar Sandoval
  2019-10-07  9:05 ` [PATCH 3/5] libdwfl: add interface for attaching to/detaching from threads Omar Sandoval
                   ` (4 more replies)
  0 siblings, 5 replies; 20+ messages in thread
From: Omar Sandoval @ 2019-10-07  9:05 UTC (permalink / raw)
  To: elfutils-devel

From: Omar Sandoval <osandov@fb.com>

Hello,

While using the libdwfl stack unwinding interface for my debugger [1], 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.

Thanks!

1: https://drgn.readthedocs.io/en/latest/

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(-)

-- 
2.23.0

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2019-10-31 17:13 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-07  9:05 [PATCH 0/5] libdwfl: expand stack frame interface Omar Sandoval
2019-10-07  9:05 ` [PATCH 3/5] libdwfl: add interface for attaching to/detaching from threads Omar Sandoval
2019-10-30 12:47   ` Mark Wielaard
2019-10-30 23:49     ` Omar Sandoval
2019-10-31 16:21       ` Mark Wielaard
2019-10-31 17:13         ` Omar Sandoval
2019-10-07  9:05 ` [PATCH 1/5] libdwfl: don't bother freeing frames outside of dwfl_thread_getframes Omar Sandoval
2019-10-29 15:55   ` Mark Wielaard
2019-10-29 16:17     ` Omar Sandoval
2019-10-29 16:52       ` Mark Wielaard
2019-10-07  9:05 ` [PATCH 4/5] libdwfl: cache Dwfl_Module and Dwarf_Frame for Dwfl_Frame Omar Sandoval
2019-10-30 13:04   ` Mark Wielaard
2019-10-30 23:55     ` Omar Sandoval
2019-10-31 16:29       ` Mark Wielaard
2019-10-07  9:05 ` [PATCH 5/5] libdwfl: add interface for evaluating DWARF expressions in a frame Omar Sandoval
2019-10-30 13:23   ` Mark Wielaard
2019-10-30 23:59     ` Omar Sandoval
2019-10-31 16:40       ` Mark Wielaard
2019-10-07  9:05 ` [PATCH 2/5] libdwfl: only use thread->unwound for initial frame Omar Sandoval
2019-10-29 22:20   ` Mark Wielaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).