]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Introduce attribute::signed_constant
authorTom Tromey <tromey@adacore.com>
Mon, 24 Feb 2025 19:26:36 +0000 (12:26 -0700)
committerTom Tromey <tromey@adacore.com>
Thu, 24 Apr 2025 19:25:08 +0000 (13:25 -0600)
commit3d0e5b99929b0192abfd8dc12b37ac6eaf7fdfd1
tree4f87b0210331b4adfa93776eff74aa43d71174c5
parent5f90d44355bdd441cd77db00f414872088952f85
Introduce attribute::signed_constant

This introduces a new method, attribute::signed_constant.  This should
be used wherever DWARF specifies a signed integer constant, or where
this is implied by the context.  It properly handles sign-extension
for DW_FORM_data*.

To my surprise, there doesn't seem to be a pre-existing sign-extension
function.  I've added one to common-utils.h alongside the align
functions.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32680
gdb/dwarf2/attribute.c
gdb/dwarf2/attribute.h
gdbsupport/common-utils.h