aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.ada/variant/pkg.adb
AgeCommit message (Collapse)AuthorFilesLines
2024-01-12Update copyright year range in header of all files managed by GDBAndrew Burgess1-1/+1
This commit is the result of the following actions: - Running gdb/copyright.py to update all of the copyright headers to include 2024, - Manually updating a few files the copyright.py script told me to update, these files had copyright headers embedded within the file, - Regenerating gdbsupport/Makefile.in to refresh it's copyright date, - Using grep to find other files that still mentioned 2023. If these files were updated last year from 2022 to 2023 then I've updated them this year to 2024. I'm sure I've probably missed some dates. Feel free to fix them up as you spot them.
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-04-24Add support for variable field offsetsTom Tromey1-0/+11
In Ada, a field can have a variable offset. This patch adds support for this case to gdb, using the existing dynamic type resolution code. Doing just this, though, would break C++ virtual base handling. It turns out that virtual base handling only worked by the ugliest of hacks. In particular, the DWARF reader would call decode_locdesc for a virtual base location. Here's an example of such an expression from gdb's m-static test case: <241> DW_AT_data_member_location: 6 byte block: 12 6 48 1c 6 22 (DW_OP_dup; DW_OP_deref; DW_OP_lit24; DW_OP_minus; DW_OP_deref; DW_OP_plus) When examining this, decode_locdesc would treat DW_OP_deref as a no-op and compute some answer (here, -24). This would be stored as the offset. Later, in gnu-v3-abi.c, the real offset would be computed by digging around in the vtable. This patch cleans up this area. In particular, it now evaluates the location expression on demand. Note there is a new FIXME in gnu-v3-abi.c. I think some of the callers are incorrect here, and have only worked because this member is unused. I will file a bug for this. I didn't fix this problem in this series because I felt it was already too complex. gdb/ChangeLog 2020-04-24 Tom Tromey <tromey@adacore.com> * dwarf2/read.c (handle_data_member_location): New overload. (dwarf2_add_field): Use it. (decode_locdesc): Add "computed" parameter. Update comment. * gdbtypes.c (is_dynamic_type_internal): Also look for FIELD_LOC_KIND_DWARF_BLOCK. (resolve_dynamic_struct): Handle FIELD_LOC_KIND_DWARF_BLOCK. * gdbtypes.c (is_dynamic_type_internal): Add special case for C++ virtual base classes. * gnu-v3-abi.c (gnuv3_baseclass_offset): Handle FIELD_LOC_KIND_DWARF_BLOCK. gdb/testsuite/ChangeLog 2020-04-24 Tom Tromey <tromey@adacore.com> * gdb.ada/variant.exp: Add dynamic field offset tests. * gdb.ada/variant/pck.ads (Nested_And_Variable): New type. * gdb.ada/variant/pkg.adb: Add new variables.
2020-04-24Add support for dynamic type lengthsTom Tromey1-0/+30
In Ada, a type with variant parts can have a variable length. This patch adds support for this to gdb, by integrating the length computation into the dynamic type resolution code. gdb/ChangeLog 2020-04-24 Tom Tromey <tromey@adacore.com> * dwarf2/read.c (read_structure_type): Handle dynamic length. * gdbtypes.c (is_dynamic_type_internal): Check TYPE_HAS_DYNAMIC_LENGTH. (resolve_dynamic_type_internal): Use TYPE_DYNAMIC_LENGTH. * gdbtypes.h (TYPE_HAS_DYNAMIC_LENGTH, TYPE_DYNAMIC_LENGTH): New macros. (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_SIZE>: New constant. gdb/testsuite/ChangeLog 2020-04-24 Tom Tromey <tromey@adacore.com> * gdb.ada/variant.exp: New file * gdb.ada/variant/pkg.adb: New file * gdb.ada/variant/pck.adb: New file