diff options
author | Yao Qi <yao@codesourcery.com> | 2012-11-02 00:14:39 +0000 |
---|---|---|
committer | Yao Qi <yao@codesourcery.com> | 2012-11-02 00:14:39 +0000 |
commit | f0559fff600165f5cbdf546737217e1da3f737b8 (patch) | |
tree | 1489559436bf24a052db270aba603d65763d5bcc /gdb/testsuite | |
parent | 9ad9e68c611405111d62bb68d2b24ebbfcc307bd (diff) | |
download | fsf-binutils-gdb-f0559fff600165f5cbdf546737217e1da3f737b8.zip fsf-binutils-gdb-f0559fff600165f5cbdf546737217e1da3f737b8.tar.gz fsf-binutils-gdb-f0559fff600165f5cbdf546737217e1da3f737b8.tar.bz2 |
gdb:
2012-11-02 Yao Qi <yao@codesourcery.com>
* std-operator.def: Remove OP_LABELED.
* eval.c: Remove the declaration of 'get_label'.
(get_label): Remove.
(evaluate_struct_tuple): Remove code handling OP_LABELED.
Update comment.
Remove local variable 'variantno' and related code.
Replace 'substruct_type' with 'struct_type'. Replace 'subfieldno'
with 'fieldno'.
* expprint.c (print_subexp_standard): Likewise.
(dump_subexp_body_standard): Likewise.
* parse.c (operator_length_standard): Likewise.
gdb/testsuite:
2012-11-02 Yao Qi <yao@codesourcery.com>
* gdb.base/setvar.exp: Test setting nested struct.
* gdb.base/setvar.c (v_struct3): New.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/setvar.c | 7 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/setvar.exp | 8 |
3 files changed, 20 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index ccd4994..650c193 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2012-11-02 Yao Qi <yao@codesourcery.com> + + * gdb.base/setvar.exp: Test setting nested struct. + * gdb.base/setvar.c (v_struct3): New. + 2012-11-01 Doug Evans <dje@google.com> * gdb.arch/amd64-pseudo.c (main): Mark registers that the testsuite diff --git a/gdb/testsuite/gdb.base/setvar.c b/gdb/testsuite/gdb.base/setvar.c index 83509cd..3a80b22 100644 --- a/gdb/testsuite/gdb.base/setvar.c +++ b/gdb/testsuite/gdb.base/setvar.c @@ -115,6 +115,13 @@ struct { double v_double_member; } v_struct2; +struct +{ + long v_long_member; + struct t_struct t; + char v_char_member; +} v_struct3; + /**** unions *******/ union t_union { diff --git a/gdb/testsuite/gdb.base/setvar.exp b/gdb/testsuite/gdb.base/setvar.exp index 7faa10a..3c5251f 100644 --- a/gdb/testsuite/gdb.base/setvar.exp +++ b/gdb/testsuite/gdb.base/setvar.exp @@ -383,6 +383,14 @@ test_set "set variable v_struct1 = {'h', 1, 2, 3, 4.0, 5.0}" \ v_long_member = 3,.*v_float_member = 4,.*v_double_member = 5.*\\}" \ "set print structure #3" +# +# test "set variable" for nested struct +# +test_set "set variable v_struct3 = {1, {'h', 1, 2, 3, 4.0, 5.0}, 37}" \ + "print v_struct3" \ + ".*.\[0-9\]* = \\{.*v_long_member = 1,.*t = \\{.*v_char_member = 104 \'h\',.*v_short_member = 1,.*v_int_member = 2,.*v_long_member = 3,.*v_float_member = 4,.*v_double_member = 5.*\\},.*v_char_member = 37 \'%\'\\}" \ + "set print structure #4" + set timeout $prev_timeout # Test printing of enumeration bitfields. |