public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: "mark at klomp dot org" <sourceware-bugzilla@sourceware.org>
To: elfutils-devel@sourceware.org
Subject: [Bug libdw/28579] libdwfl api for accessing registers for a thread frame (full register unwinding)
Date: Fri, 08 Jul 2022 22:41:10 +0000	[thread overview]
Message-ID: <bug-28579-10460-6IiD5tSBcL@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-28579-10460@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=28579

--- Comment #2 from Mark Wielaard <mark at klomp dot org> ---
Thanks. This looks nice and simple. Few small comments:

- The dwfl_frame_reg should be in a new ELFUTILS_0.188 { global:
dwfl_frame_reg; } ELFUTILS_0.186; section (that is, this symbol is new in
ELFUTILS_0.188 which inherits from ELFUTILS_0.186).

- Technically __libdwfl_frame_reg_get failing can be either invalid register or
unknown value (if state->regs_set is false). It might make sense to set a
different error message if it isn't too much work.

- When using public functions internally we usually use INTUSE
(dwfl_frame_reg). Which is an tiny optimization to avoid a plt call. You'll
need an INTDECL in libdwflP.h.

- In the unwinder we are only really interested in addresses, which is why we
use Dwarf_Addr, but here I think we should use Dwarf_Word as the *val that
dwfl_frame_reg returns. Both are really uint64_t, so it doesn't really matter,
but it makes it more clear that the caller is responsible for interpreting the
register value.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2022-07-08 22:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-10 14:07 [Bug libdw/28579] New: " mark at klomp dot org
2021-11-11 15:19 ` [Bug libdw/28579] " dichen at redhat dot com
2021-11-11 15:20 ` dichen at redhat dot com
2022-07-03 14:58 ` dichen at redhat dot com
2022-07-08 22:41 ` mark at klomp dot org [this message]
2022-07-19 14:23 ` dichen at redhat dot com

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=bug-28579-10460-6IiD5tSBcL@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --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).