Handle base type without DW_AT_byte_size

DWARF says that a base type can have DW_AT_bit_size, without
DW_AT_byte_size.  However, gdb does not correctly handle this; in
fact, it crashes, as pointed out in this LLVM merge request:

    https://github.com/llvm/llvm-project/pull/137123

This patch reworks the base type size logic a bit to handle this
situation.

Tested-by: Kevin Buettner <kevinb@redhat.com>
Approved-by: Kevin Buettner <kevinb@redhat.com>


3 files changed