summaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/printcmds.exp
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2009-07-07 21:33:50 +0000
committerTom Tromey <tromey@redhat.com>2009-07-07 21:33:50 +0000
commit30b66ecc739234c58f8f1aca25a8c068b09f9cc8 (patch)
tree070269a7bacad563ef335cdac2c05c8ab3cca332 /gdb/testsuite/gdb.base/printcmds.exp
parent7ec721f405a1b9bb6598e80f5919ba7a27e997f6 (diff)
downloadbinutils-gdb-30b66ecc739234c58f8f1aca25a8c068b09f9cc8.tar.gz
gdb
* c-lang.c (convert_octal): Only allow 3 octal digits. (print_wchar): Prefer 3-digit octal form. Fall back to hex if needed. * c-exp.y (c_parse_escape): Only allow 3 octal digits. gdb/testsuite * gdb.base/call-rt-st.exp: Update for change to escape output. * gdb.base/callfuncs.exp: Likewise. * gdb.base/charset.exp: Likewise. * gdb.base/constvars.exp: Likewise. * gdb.base/long_long.exp: Likewise. * gdb.base/pointers.exp: Likewise. * gdb.base/printcmds.exp: Likewise. * gdb.base/setvar.exp: Likewise. * gdb.base/store.exp: Likewise. * gdb.cp/ref-types.exp: Likewise. * gdb.mi/mi-var-child.exp: Likewise. * gdb.mi/mi-var-display.exp: Likewise. * gdb.mi/mi2-var-display.exp: Likewise. * gdb.base/charset.exp: Test octal escape sequence length. Update for change to escape output.
Diffstat (limited to 'gdb/testsuite/gdb.base/printcmds.exp')
-rw-r--r--gdb/testsuite/gdb.base/printcmds.exp60
1 files changed, 30 insertions, 30 deletions
diff --git a/gdb/testsuite/gdb.base/printcmds.exp b/gdb/testsuite/gdb.base/printcmds.exp
index 65ab3a45c15..0cbcdfa0526 100644
--- a/gdb/testsuite/gdb.base/printcmds.exp
+++ b/gdb/testsuite/gdb.base/printcmds.exp
@@ -136,13 +136,13 @@ proc test_integer_literals_rejected {} {
proc test_print_all_chars {} {
global gdb_prompt
- gdb_test "p ctable1\[0\]" " = 0 '\\\\0'"
- gdb_test "p ctable1\[1\]" " = 1 '\\\\1'"
- gdb_test "p ctable1\[2\]" " = 2 '\\\\2'"
- gdb_test "p ctable1\[3\]" " = 3 '\\\\3'"
- gdb_test "p ctable1\[4\]" " = 4 '\\\\4'"
- gdb_test "p ctable1\[5\]" " = 5 '\\\\5'"
- gdb_test "p ctable1\[6\]" " = 6 '\\\\6'"
+ gdb_test "p ctable1\[0\]" " = 0 '\\\\000'"
+ gdb_test "p ctable1\[1\]" " = 1 '\\\\001'"
+ gdb_test "p ctable1\[2\]" " = 2 '\\\\002'"
+ gdb_test "p ctable1\[3\]" " = 3 '\\\\003'"
+ gdb_test "p ctable1\[4\]" " = 4 '\\\\004'"
+ gdb_test "p ctable1\[5\]" " = 5 '\\\\005'"
+ gdb_test "p ctable1\[6\]" " = 6 '\\\\006'"
gdb_test "p ctable1\[7\]" " = 7 '\\\\a'"
gdb_test "p ctable1\[8\]" " = 8 '\\\\b'"
gdb_test "p ctable1\[9\]" " = 9 '\\\\t'"
@@ -150,24 +150,24 @@ proc test_print_all_chars {} {
gdb_test "p ctable1\[11\]" " = 11 '\\\\v'"
gdb_test "p ctable1\[12\]" " = 12 '\\\\f'"
gdb_test "p ctable1\[13\]" " = 13 '\\\\r'"
- gdb_test "p ctable1\[14\]" " = 14 '\\\\16'"
- gdb_test "p ctable1\[15\]" " = 15 '\\\\17'"
- gdb_test "p ctable1\[16\]" " = 16 '\\\\20'"
- gdb_test "p ctable1\[17\]" " = 17 '\\\\21'"
- gdb_test "p ctable1\[18\]" " = 18 '\\\\22'"
- gdb_test "p ctable1\[19\]" " = 19 '\\\\23'"
- gdb_test "p ctable1\[20\]" " = 20 '\\\\24'"
- gdb_test "p ctable1\[21\]" " = 21 '\\\\25'"
- gdb_test "p ctable1\[22\]" " = 22 '\\\\26'"
- gdb_test "p ctable1\[23\]" " = 23 '\\\\27'"
- gdb_test "p ctable1\[24\]" " = 24 '\\\\30'"
- gdb_test "p ctable1\[25\]" " = 25 '\\\\31'"
- gdb_test "p ctable1\[26\]" " = 26 '\\\\32'"
- gdb_test "p ctable1\[27\]" " = 27 '\\\\33'"
- gdb_test "p ctable1\[28\]" " = 28 '\\\\34'"
- gdb_test "p ctable1\[29\]" " = 29 '\\\\35'"
- gdb_test "p ctable1\[30\]" " = 30 '\\\\36'"
- gdb_test "p ctable1\[31\]" " = 31 '\\\\37'"
+ gdb_test "p ctable1\[14\]" " = 14 '\\\\016'"
+ gdb_test "p ctable1\[15\]" " = 15 '\\\\017'"
+ gdb_test "p ctable1\[16\]" " = 16 '\\\\020'"
+ gdb_test "p ctable1\[17\]" " = 17 '\\\\021'"
+ gdb_test "p ctable1\[18\]" " = 18 '\\\\022'"
+ gdb_test "p ctable1\[19\]" " = 19 '\\\\023'"
+ gdb_test "p ctable1\[20\]" " = 20 '\\\\024'"
+ gdb_test "p ctable1\[21\]" " = 21 '\\\\025'"
+ gdb_test "p ctable1\[22\]" " = 22 '\\\\026'"
+ gdb_test "p ctable1\[23\]" " = 23 '\\\\027'"
+ gdb_test "p ctable1\[24\]" " = 24 '\\\\030'"
+ gdb_test "p ctable1\[25\]" " = 25 '\\\\031'"
+ gdb_test "p ctable1\[26\]" " = 26 '\\\\032'"
+ gdb_test "p ctable1\[27\]" " = 27 '\\\\033'"
+ gdb_test "p ctable1\[28\]" " = 28 '\\\\034'"
+ gdb_test "p ctable1\[29\]" " = 29 '\\\\035'"
+ gdb_test "p ctable1\[30\]" " = 30 '\\\\036'"
+ gdb_test "p ctable1\[31\]" " = 31 '\\\\037'"
gdb_test "p ctable1\[32\]" " = 32 ' '"
gdb_test "p ctable1\[33\]" " = 33 '!'"
gdb_test "p ctable1\[34\]" " = 34 '\"'"
@@ -475,13 +475,13 @@ proc test_print_strings {} {
gdb_test "p &ctable1\[0\]" \
" = \\(unsigned char \\*\\) \"\""
gdb_test "p &ctable1\[1\]" \
- " = \\(unsigned char \\*\\) \"\\\\1\\\\2\\\\3\\\\4\\\\5\\\\6\\\\a\\\\b\"..."
+ " = \\(unsigned char \\*\\) \"\\\\001\\\\002\\\\003\\\\004\\\\005\\\\006\\\\a\\\\b\"..."
gdb_test "p &ctable1\[1*8\]" \
- " = \\(unsigned char \\*\\) \"\\\\b\\\\t\\\\n\\\\v\\\\f\\\\r\\\\16\\\\17\"..."
+ " = \\(unsigned char \\*\\) \"\\\\b\\\\t\\\\n\\\\v\\\\f\\\\r\\\\016\\\\017\"..."
gdb_test "p &ctable1\[2*8\]" \
- " = \\(unsigned char \\*\\) \"\\\\20\\\\21\\\\22\\\\23\\\\24\\\\25\\\\26\\\\27\"..."
+ " = \\(unsigned char \\*\\) \"\\\\020\\\\021\\\\022\\\\023\\\\024\\\\025\\\\026\\\\027\"..."
gdb_test "p &ctable1\[3*8\]" \
- " = \\(unsigned char \\*\\) \"\\\\30\\\\31\\\\32\\\\33\\\\34\\\\35\\\\36\\\\37\"..."
+ " = \\(unsigned char \\*\\) \"\\\\030\\\\031\\\\032\\\\033\\\\034\\\\035\\\\036\\\\037\"..."
gdb_test "p &ctable1\[4*8\]" \
" = \\(unsigned char \\*\\) \" !\\\\\"#\\\$%&'\"..."
gdb_test "p &ctable1\[5*8\]" \
@@ -622,7 +622,7 @@ proc test_print_string_constants {} {
set timeout 60;
gdb_test "p \"a string\"" " = \"a string\""
- gdb_test "p \"embedded \\000 null\"" " = \"embedded \\\\0 null\""
+ gdb_test "p \"embedded \\000 null\"" " = \"embedded \\\\000 null\""
gdb_test "p \"abcd\"\[2\]" " = 99 'c'"
gdb_test "p sizeof (\"abcdef\")" " = 7"
gdb_test "ptype \"foo\"" " = char \\\[4\\\]"