[gdb/symtab] Fix handling of DW_TAG_unspecified_type
Currently, the test-case contained in this patch fails:
...
(gdb) p (int) foo ()^M
Invalid cast.^M
(gdb) FAIL: gdb.dwarf2/dw2-unspecified-type.exp: p (int) foo ()
...
because DW_TAG_unspecified_type is translated as void.
There's some code in read_unspecified_type that marks the type as stub, but
that's only active for ada:
...
if (cu->lang () == language_ada)
type->set_is_stub (true);
...
Fix this by:
- marking the type as a stub for all languages, and
- handling the stub return type case in call_function_by_hand_dummy.
Tested on x86_64-linux.
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29558