public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: Jacob Burkholder <jake.burkholder2@gmail.com>
To: elfutils-devel@sourceware.org
Subject: unwind non-PC registers using elfutils
Date: Sun, 3 Oct 2021 09:38:06 -0700	[thread overview]
Message-ID: <CAOE-m4CyL1Tinn0GxZBWxLjsajTSS_qWXVfyZt2y+irivKpp1w@mail.gmail.com> (raw)

Hi, I'm trying to figure out how to unwind registers other than the PC
using elfutils.  I can use dwfl_module_register_names to get the register
names, and then I'm trying to use dwarf_frame_register to get the register
values for a given frame.  I looked at the code in __libdwfl_frame_unwind
and there's another example in addrcfi.c.   dwarf_frame_register seems
quite a low level dwarf API, I'm not sure how to use the ops that are
returned, also the code used by __libdwfl_frame_unwind to evaluate the ops
is all static or internal so not callable.  Any guidance?  Do I need to
basically interpret the dwarf atoms in the ops returned by
dwarf_frame_register?  Any plans to make code like
frame_unwind.c:expr_eval() used by frame_unwind.c:handle_cfi externally
accessible?

             reply	other threads:[~2021-10-03 16:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-03 16:38 Jacob Burkholder [this message]
2021-11-10 14:09 ` Mark Wielaard
2021-11-11  6:23   ` Jacob Burkholder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAOE-m4CyL1Tinn0GxZBWxLjsajTSS_qWXVfyZt2y+irivKpp1w@mail.gmail.com \
    --to=jake.burkholder2@gmail.com \
    --cc=elfutils-devel@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).