Fix crash with DW_FORM_implicit_const
authorTom Tromey <tom@tromey.com>
Thu, 20 Jul 2023 21:48:46 +0000 (15:48 -0600)
committerTom Tromey <tom@tromey.com>
Fri, 21 Jul 2023 20:03:23 +0000 (14:03 -0600)
commit4d051f3a4e2839225f7de0ea783e2fdca1c7717e
treefb789b6eacda3b87ba6bae190af22d5246fa9088
parente8fc65713d6e050348d443f9be7b61e6f54c6371
Fix crash with DW_FORM_implicit_const

Jakub pointed out that using DW_FORM_implicit_const with
DW_AT_bit_size would cause gdb to crash.  This happened because
DW_FORM_implicit_const is not an "unsigned" form, causing as_unsigned
to assert.  This patch fixes the problem.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30651
Approved-By: Andrew Burgess <aburgess@redhat.com>
gdb/dwarf2/read.c
gdb/testsuite/gdb.dwarf2/intbits.exp
gdb/testsuite/lib/dwarf.exp