struct packed: Unit tests and more operators
authorPedro Alves <pedro@palves.net>
Mon, 18 Jul 2022 23:26:33 +0000 (00:26 +0100)
committerPedro Alves <pedro@palves.net>
Mon, 25 Jul 2022 15:04:05 +0000 (16:04 +0100)
commite249e6b8012ea0a14e5768d31becd7b4caff8e77
treeec2b076aae5d31a0c08077cb3ac663ef701f1d09
parent4ca26ad7dec88ab6fa8507ba069e9f1b3c5196da
struct packed: Unit tests and more operators

For PR gdb/29373, I wrote an alternative implementation of struct
packed that uses a gdb_byte array for internal representation, needed
for mingw+clang.  While adding that, I wrote some unit tests to make
sure both implementations behave the same.  While at it, I implemented
all relational operators.  This commit adds said unit tests and
relational operators.  The alternative gdb_byte array implementation
will come next.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29373

Change-Id: I023315ee03622c59c397bf4affc0b68179c32374
gdb/Makefile.in
gdb/unittests/packed-selftests.c [new file with mode: 0644]
gdbsupport/packed.h