Print entirely unavailable struct/union values as a single <unavailable>.
authorAndrew Burgess <aburgess@broadcom.com>
Thu, 28 Nov 2013 18:54:20 +0000 (18:54 +0000)
committerPedro Alves <palves@redhat.com>
Thu, 28 Nov 2013 18:54:20 +0000 (18:54 +0000)
commiteebc056c8e1ae9bc015645acf861bde0eff8335a
tree623847ee04e50529556d926c0737c2ea456acc03
parenta7300869806e7586189dc0f46c41c5773fe3ae16
Print entirely unavailable struct/union values as a single <unavailable>.

When printing an entirely optimized out structure/class/union, we
print a single <optimized out> instead of printing <optimized out> for
each field.

This patch makes an entirely unavailable structure/class/union be
likewise displayed with a single "<unavailable>" rather than the whole
object with all fields <unavailable>.

This seems good because this way the user can quickly tell whether the
whole value is unavailable, rather than having to skim all fields.
Consistency with optimized out values also seems to be a good thing to
have.

A few updates to gdb.trace/unavailable.exp where required.

Tested on x86_64 Fedora 17, native gdbserver.

gdb/
2013-11-28  Andrew Burgess  <aburgess@broadcom.com>
    Pedro Alves  <palves@redhat.com>

* valprint.c (value_check_printable): If the value is entirely
unavailable, print a single "<unavailable>" instead of printing
all subfields.

gdb/testsuite/
2013-11-28  Andrew Burgess  <aburgess@broadcom.com>

* gdb.trace/unavailable.exp (gdb_collect_args_test): Update
expected results.
(gdb_collect_locals_test): Likewise.
(gdb_collect_globals_test): Likewise.
gdb/ChangeLog
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.trace/unavailable.exp
gdb/valprint.c
This page took 0.036101 seconds and 4 git commands to generate.