Optimized-out pointer: New test for error handling
This patch implements a test that ensures that with "set print object
on", -var-create returns "<optimized out>" for an optimized out pointer
to structure, rather than throwing an error, while also ensuring that
any attempt to dereference the pointer *will* throw an error.
It uses the dwarf assembler to construct the appropriate debug info
to represent a pointer-to-struct in the program as optimized out,
and then accesses that pointer in various ways. The test uses both
the console interpreter and the MI interpreter.
gdb/testsuite/ChangeLog:
2016-04-06 Don Breazeal <donb@codesourcery.com>
* gdb.dwarf2/dw2-opt-structptr.c: New test program.
* gdb.dwarf2/dw2-opt-structptr.exp: New test script.