From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 28C903858286; Fri, 8 Jul 2022 22:41:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 28C903858286 From: "mark at klomp dot 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 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: elfutils X-Bugzilla-Component: libdw X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mark at klomp dot org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: dichen at redhat dot com X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: elfutils-devel@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Elfutils-devel mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jul 2022 22:41:11 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D28579 --- Comment #2 from Mark Wielaard --- 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 registe= r 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 matt= er, but it makes it more clear that the caller is responsible for interpreting = the register value. --=20 You are receiving this mail because: You are on the CC list for the bug.=