diff options
author | Antoine Tremblay <antoine.tremblay@ericsson.com> | 2015-02-25 11:00:01 -0500 |
---|---|---|
committer | Antoine Tremblay <antoine.tremblay@ericsson.com> | 2015-02-26 10:58:00 -0500 |
commit | 2f41223f62de5d893bd6a4bd832293c2c3e80d91 (patch) | |
tree | 9dd38cfeca5afe5e6e6a85f264699254947feaa5 /gdb/testsuite/gdb.base/structs.exp | |
parent | c8071705c69a13d237aeca4709bf91deaff7e5cb (diff) | |
download | fsf-binutils-gdb-2f41223f62de5d893bd6a4bd832293c2c3e80d91.zip fsf-binutils-gdb-2f41223f62de5d893bd6a4bd832293c2c3e80d91.tar.gz fsf-binutils-gdb-2f41223f62de5d893bd6a4bd832293c2c3e80d91.tar.bz2 |
Fix print of value type in a corner case of finish
When doing finish in a function, if gdb fails to return a value, gdb
also fails at printing the value type if this type is a struct.
For example :
(gdb) fin
....
Value returned has type: . Cannot determine contents
This patch fixes this by calling type_to_string to print the type
so that we can support these types.
This patch returns the following example output :
(gdb) fin
....
Value returned has type: struct test. Cannot determine contents
Also, this patch modifies structs.exp to check that we return the
correct type.
gdb/ChangeLog:
* gdb/infcmd.c (print_return_value): use type_to_string to print type.
gdb/testsuite/ChangeLog:
* gdb.base/structs.exp: Check for correct struct on finish.
Diffstat (limited to 'gdb/testsuite/gdb.base/structs.exp')
-rw-r--r-- | gdb/testsuite/gdb.base/structs.exp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.base/structs.exp b/gdb/testsuite/gdb.base/structs.exp index 927e3b8..5d94a41 100644 --- a/gdb/testsuite/gdb.base/structs.exp +++ b/gdb/testsuite/gdb.base/structs.exp @@ -428,7 +428,7 @@ proc test_struct_returns { n } { -re "Value returned is .*${gdb_prompt} $" { pass "${test}" } - -re "Cannot determine contents.*${gdb_prompt} $" { + -re "Value returned has type: struct struct$n. Cannot determine contents.*${gdb_prompt} $" { # Expected bad value. For the moment this is ok. set finish_value_known 0 pass "${test}" |