* python/py-prettyprint.c (print_string_repr): Clear
	'addressprint' option when calling val_print_string.
	(print_children): Handle Val_pretty_default.  Clear 'addressprint'
	option when calling val_print_string.
gdb/testsuite
	* gdb.python/py-prettyprint.exp (run_lang_tests): Ensure no blank
	space before string output.  Add test for "set print pretty off"
	case.
This commit is contained in:
Tom Tromey 2011-01-26 20:58:49 +00:00
parent 74aedc4602
commit a81766d88f
4 changed files with 34 additions and 4 deletions

View file

@ -92,7 +92,7 @@ proc run_lang_tests {lang} {
gdb_test "print x" " = \"this is x\""
gdb_test "print cstring" " = \"const string\""
gdb_test "print estring" "\"embedded x\\\\201\\\\202\\\\203\\\\204\""
gdb_test "print estring" " = \"embedded x\\\\201\\\\202\\\\203\\\\204\""
gdb_test_no_output "python pp_ls_encoding = 'UTF-8'"
gdb_test "print estring2" "\"embedded \", <incomplete sequence \\\\302>"
@ -100,6 +100,11 @@ proc run_lang_tests {lang} {
gdb_test "print c" " = container \"container\" with 2 elements = {$nl *.0. = 23,$nl *.1. = 72$nl}"
gdb_test "print nstype" " = {$nl *.0. = 7,$nl *.1. = 42$nl}"
gdb_test_no_output "set print pretty off"
gdb_test "print nstype" " = {.0. = 7, .1. = 42}" \
"print nstype on one line"
gdb_test "continue" "Program exited normally\."
remote_file host delete ${remote_python_file}