aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.ada/pckd_neg.exp
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-13Rename to allow_ada_testsTom Tromey1-1/+1
This changes skip_ada_tests to invert the sense, and renames it to allow_ada_tests.
2023-01-13Use require !skip_ada_testsTom Tromey1-1/+1
This changes some tests to use "require !skip_ada_tests".
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-01-01Update copyright year range in all GDB files.Joel Brobecker1-1/+1
gdb/ChangeLog: Update copyright year range in all GDB files.
2019-01-01Update copyright year range in all GDB files.Joel Brobecker1-1/+1
This commit applies all changes made after running the gdb/copyright.py script. Note that one file was flagged by the script, due to an invalid copyright header (gdb/unittests/basic_string_view/element_access/char/empty.cc). As the file was copied from GCC's libstdc++-v3 testsuite, this commit leaves this file untouched for the time being; a patch to fix the header was sent to gcc-patches first. gdb/ChangeLog: Update copyright year range in all GDB files.
2018-01-02Update copyright year range in all GDB filesJoel Brobecker1-1/+1
gdb/ChangeLog: Update copyright year range in all GDB files
2017-01-01update copyright year range in GDB filesJoel Brobecker1-1/+1
This applies the second part of GDB's End of Year Procedure, which updates the copyright year range in all of GDB's files. gdb/ChangeLog: Update copyright year range in all GDB files.
2016-01-01GDB copyright headers update after running GDB's copyright.py script.Joel Brobecker1-1/+1
gdb/ChangeLog: Update year range in copyright notice of all files.
2015-05-15[Ada] problem printing negative integer values in packed arrays.Joel Brobecker1-0/+44
Consider the following declarations: type Signed_Small is new Integer range - (2 ** 5) .. (2 ** 5 - 1); type Signed_Simple_Array is array (1 .. 4) of Signed_Small; pragma Pack (Signed_Simple_Array); SSA : Signed_Simple_Array := (-1, 2, -3, 4); GDB currently print its value incorrectly for the elements that are negative: (gdb) print ssa $1 = (65535, 2, 1048573, 4) (gdb) print ssa(1) $2 = 65535 (gdb) print ssa(2) $3 = 2 (gdb) print ssa(3) $4 = 1048573 (gdb) print ssa(4) $5 = 4 What happens is that the sign-extension is not working because we're trying to do left shift with a negative count. In ada_value_primitive_packed_val, we have a loop which populates the extra bits of the target (unpacked) value, after extraction of the data from the original (packed) value: while (ntarg > 0) { accum |= sign << accumSize; unpacked[targ] = accum & ~(~0L << HOST_CHAR_BIT); !!! -> accumSize -= HOST_CHAR_BIT; accum >>= HOST_CHAR_BIT; ntarg -= 1; targ += delta; } At each iteration, accumSize gets decremented by HOST_CHAR_BIT, which can easily cause it to become negative, particularly on little endian targets, where accumSize is at most HOST_CHAR_BIT - 1. This causes us to perform a left-shift operation with a negative accumSize at the next loop iteration, which is undefined, and acutally does not produce the effect we wanted (value left untouched) when the code is compiled with GCC. This patch fixes the issue by simply setting accumSize to zero if negative. gdb/ChangeLog: * ada-lang.c (ada_value_primitive_packed_val): Make sure accumSize is never negative. gdb/testsuite/ChangeLog: * gdb.ada/pckd_neg: New testcase.