CTF: handle forward reference type
Added function fetch_tid_type which calls get_tid_type and will set up
the type, associated with a tid, if it is not read in yet. Also implement
function read_forward_type which handles the CTF_K_FORWARD kind.
Expanded gdb.base/ctf-ptype.exp to add cases with forward references.
gdb/ChangeLog:
* ctfread.c (fetch_tid_type): New function, use throughout file.
(read_forward_type): New function.
(read_type_record): Call read_forward_type.
gdb/testsuite/ChangeLog:
* gdb.base/ctf-ptype.c: Add struct link containing a forward
reference type.
* gdb.base/ctf-ptype.exp: Add "ptype struct link".