]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Introduce and use attribute::unsigned_constant
authorTom Tromey <tromey@adacore.com>
Thu, 6 Feb 2025 16:32:48 +0000 (09:32 -0700)
committerTom Tromey <tromey@adacore.com>
Tue, 18 Mar 2025 18:40:58 +0000 (12:40 -0600)
commite0a55ad42257771a6bed89130d45d0a24d417759
treeb32ebe1a19796bafbdf650d0168a19da792d4cf5
parente4d946a97a67fe692b13e64b541b0e8ddb39e2e9
Introduce and use attribute::unsigned_constant

This introduces a new 'unsigned_constant' method on attribute.  This
method can be used to get the value as an unsigned number.  Unsigned
scalar forms are handled, and signed scalar forms are handled as well
provided that the value is non-negative.

Several spots in the reader that expect small DWARF-defined constants
are updated to use this new method.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32680
Approved-By: Simon Marchi <simon.marchi@efficios.com>
gdb/dwarf2/attribute.c
gdb/dwarf2/attribute.h
gdb/dwarf2/cooked-indexer.c
gdb/dwarf2/read.c
gdb/dwarf2/read.h