diff options
author | Tom Tromey <tromey@redhat.com> | 2009-06-23 16:26:05 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2009-06-23 16:26:05 +0000 |
commit | 85e306ed0eb2fb5032d459a13cfd345edf1bb2aa (patch) | |
tree | 718a1bbdb8b9c3608901375eb80024b749422ffb /gdb/testsuite | |
parent | 3188b0706d4d68b6cd4df669ca4557fc2f87736a (diff) | |
download | gdb-85e306ed0eb2fb5032d459a13cfd345edf1bb2aa.zip gdb-85e306ed0eb2fb5032d459a13cfd345edf1bb2aa.tar.gz gdb-85e306ed0eb2fb5032d459a13cfd345edf1bb2aa.tar.bz2 |
gdb
PR gdb/10309:
* c-lang.c (classify_type): Iterate over typedefs.
* c-valprint.c (textual_element_type): Iterate over typedefs.
gdb/testsuite
* gdb.base/charset.exp (test_combination): Regression test.
* gdb.base/charset.c (my_wchar_t): New typedef.
(myvar): New global.
(main): Set myvar.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/charset.c | 6 | ||||
-rw-r--r-- | gdb/testsuite/gdb.base/charset.exp | 3 |
3 files changed, 16 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index f7572b3..1a442a5 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2009-06-23 Tom Tromey <tromey@redhat.com> + + * gdb.base/charset.exp (test_combination): Regression test. + * gdb.base/charset.c (my_wchar_t): New typedef. + (myvar): New global. + (main): Set myvar. + 2009-06-18 Pierre Muller <muller@ics.u-strasbg.fr> * lib/gdb.exp (gdb_compile): Also force unbuffered mode for DJGPP diff --git a/gdb/testsuite/gdb.base/charset.c b/gdb/testsuite/gdb.base/charset.c index 55a50ce..b61e047 100644 --- a/gdb/testsuite/gdb.base/charset.c +++ b/gdb/testsuite/gdb.base/charset.c @@ -65,6 +65,10 @@ typedef unsigned int char32_t; char16_t uvar; char32_t Uvar; +/* A typedef to a typedef should also work. */ +typedef wchar_t my_wchar_t; +my_wchar_t myvar; + void init_string (char string[], char x, @@ -169,5 +173,7 @@ int main () init_ucs4 (); + myvar = ucs_4_string[7]; + return 0; /* all strings initialized */ } diff --git a/gdb/testsuite/gdb.base/charset.exp b/gdb/testsuite/gdb.base/charset.exp index 8c23848..85885c8 100644 --- a/gdb/testsuite/gdb.base/charset.exp +++ b/gdb/testsuite/gdb.base/charset.exp @@ -599,6 +599,9 @@ if {$wchar_ok && $ucs2_ok} { } if {$wchar_ok && $ucs4_ok} { test_combination L wide U UCS-4 + # Regression test for a typedef to a typedef. + gdb_test "print myvar" "= \[0-9\]+ L'A'" \ + "typedef to wchar_t" } if {$ucs2_ok && $ucs4_ok} { test_combination u UCS-2 U UCS-4 |