aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.dwarf2/intbits.exp
AgeCommit message (Collapse)AuthorFilesLines
2023-01-13Use require dwarf2_supportTom Tromey1-3/+1
This changes some tests to use "require dwarf2_support".
2023-01-01Update copyright year range in header of all files managed by GDBJoel Brobecker1-1/+1
This commit is the result of running the gdb/copyright.py script, which automated the update of the copyright year range for all source files managed by the GDB project to be updated to include year 2023.
2022-01-01Automatic Copyright Year update after running gdb/copyright.pyJoel Brobecker1-1/+1
This commit brings all the changes made by running gdb/copyright.py as per GDB's Start of New Year Procedure. For the avoidance of doubt, all changes in this commits were performed by the script.
2021-01-01Update copyright year range in all GDB filesJoel Brobecker1-1/+1
This commits the result of running gdb/copyright.py as per our Start of New Year procedure... gdb/ChangeLog Update copyright year range in copyright header of all GDB files.
2020-09-23Handle bit offset and bit size in base typesTom Tromey1-0/+201
PR symtab/25470 points out that the Zig programming language allows integers of various bit sizes (including zero), not just sizes that are a multiple of 8. This is supported in DWARF by applying both a byte size and a DW_AT_bit_size. This patch adds support for this feature to integer and boolean types. Other base types are not handled -- for floating-point types, this didn't seem to make sense, and for character types I didn't see much need. (These can be added later if desired.) I've also added support for DW_AT_data_bit_offset at the same time. I don't know whether the Zig compiler requires this, but it was described in the same section in the DWARF standard and was easy to add. A new test case is supplied, using the DWARF assembler. gdb/ChangeLog 2020-09-23 Tom Tromey <tom@tromey.com> PR symtab/25470: * value.c (unpack_long, pack_long, pack_unsigned_long): Handle bit offset and bit size. * printcmd.c (print_scalar_formatted): Handle zero-length integer. (print_scalar_formatted): Use bit_size_differs_p. * gdbtypes.h (enum type_specific_kind) <TYPE_SPECIFIC_INT>: New constant. (union type_specific): <int_stuff>: New member. (struct type) <bit_size_differs_p, bit_size, bit_offset>: New methods. * gdbtypes.c (init_integer_type, init_boolean_type): Initialize TYPE_SPECIFIC_FIELD. (recursive_dump_type, copy_type_recursive): Update. * dwarf2/read.c (read_base_type): Handle DW_AT_bit_size and DW_AT_data_bit_offset. gdb/testsuite/ChangeLog 2020-09-23 Tom Tromey <tom@tromey.com> * gdb.dwarf2/intbits.exp: New file. * gdb.dwarf2/intbits.c: New file.