Fix print of value type in a corner case of finish
authorAntoine Tremblay <antoine.tremblay@ericsson.com>
Wed, 25 Feb 2015 16:00:01 +0000 (11:00 -0500)
committerAntoine Tremblay <antoine.tremblay@ericsson.com>
Thu, 26 Feb 2015 15:58:00 +0000 (10:58 -0500)
commit2f41223f62de5d893bd6a4bd832293c2c3e80d91
tree9dd38cfeca5afe5e6e6a85f264699254947feaa5
parentc8071705c69a13d237aeca4709bf91deaff7e5cb
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.
gdb/ChangeLog
gdb/infcmd.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/structs.exp
This page took 0.040228 seconds and 4 git commands to generate.