aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/bitfields.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2009-08-28 18:50:49 +0000
committerDaniel Jacobowitz <drow@false.org>2009-08-28 18:50:49 +0000
commit4a76eae5946577891a09412077a5bbd3ea532885 (patch)
tree072a437dc31f2c364206b6e61bb53ae2a3d844e0 /gdb/testsuite/gdb.base/bitfields.c
parentd4b96c9a787ed13b0b9367b5fedb96a4746a5c9d (diff)
downloadgdb-4a76eae5946577891a09412077a5bbd3ea532885.zip
gdb-4a76eae5946577891a09412077a5bbd3ea532885.tar.gz
gdb-4a76eae5946577891a09412077a5bbd3ea532885.tar.bz2
PR gdb/10565
* value.c (value_primitive_field): Do not save value_offset for bitfields. (unpack_bits_as_long): Do not read an entire ULONGEST. testsuite/ PR gdb/10565 * gdb.base/bitfields.c (struct container, container): New. (main): Initialize it and call break5. * gdb.base/bitfields.exp (bitfield_at_offset): New test.
Diffstat (limited to 'gdb/testsuite/gdb.base/bitfields.c')
-rw-r--r--gdb/testsuite/gdb.base/bitfields.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.base/bitfields.c b/gdb/testsuite/gdb.base/bitfields.c
index bd411f7..3b5e42c 100644
--- a/gdb/testsuite/gdb.base/bitfields.c
+++ b/gdb/testsuite/gdb.base/bitfields.c
@@ -63,6 +63,12 @@ void break10 ()
{
}
+struct container
+{
+ struct fields one;
+ struct fields two;
+} container;
+
/* This is used by bitfields.exp to determine if the target understands
signed bitfields. */
int i;
@@ -190,5 +196,10 @@ int main ()
flags.s3 = 0;
flags.s9 = 0;
+ /* Bitfields at a non-zero offset in a containing structure. */
+ container.one.u3 = 5;
+ container.two.u3 = 3;
+ break5 ();
+
return 0;
}