fortran: enable ptype/whatis for user defined types.

	(gdb) ptype type
	old> No symbol "type" in current context.
	new> type = Type type
	     integer(kind=4) :: t_i
	     End Type type

2013-11-19  Sanimir Agovic  <sanimir.agovic@intel.com>
            Keven Boell  <keven.boell@intel.com>

	* f-exp.y (yylex): Add domain array to enable lookup
	in multiple domains. Loop over lookup domains and try
	to find requested symbol. Add STRUCT_DOMAIN to lookup
	domains to be able to query for user defined types.

testsuite/
	* gdb.fortran/type.f90: New file.
	* gdb.fortran/whatis_type.f90: New file.

Change-Id: I61c8451a3de0f3dce08ad40607fc74eed62a7bd5
fortran: enable ptype/whatis for modules.

Added new domain MODULE_DOMAIN for fortran modules to avoid
issues with sharing namespaces (e.g. when a variable currently
in scope has the same name as a module).

	(gdb) ptype modname
	old> No symbol "modname" in current context.
	new> type = module modname

This fixes PR 15209 and also addresses the issue
with sharing namespaces:
https://sourceware.org/ml/gdb-patches/2013-02/msg00643.html

2013-11-19  Keven Boell  <keven.boell@intel.com>
            Sanimir Agovic  <sanimir.agovic@intel.com>

	* cp-namespace.c (cp_lookup_nested_symbol): Enable
	nested lookups for fortran modules.
	* dwarf2read.c (read_module): Add fortran module to
	the symbol table.
	(add_partial_symbol, add_partial_module): Add fortran
	module to the partial symbol table.
	(new_symbol_full): Create full symbol for fortran module.
	* f-exp.y (yylex): Add new module domain to be parsed.
	* symtab.h: New domain for fortran modules.

testsuite/

	* gdb.fortran/module.exp: Completion matches fortran module
	names as well. ptype/whatis on modules return a proper type.
	Add new check for having the correct scope.

Change-Id: Ia3b22516b0d759ed2b045a3e03c0ae6023fb3bfc
Signed-off-by: Keven Boell <keven.boell@intel.com>
fortran: enable detailed whatis/ptype of modules.

This patch will enable detailed output of the contents
of fortran modules.

2013-11-22  Keven Boell  <keven.boell@intel.com>

	* dwarf2read.c (read_module): Extend module
	dwarf parsing to store module contents into
	new created module type.
	* f-typeprint.c (f_type_print_base): Enable
	printing of module inline functions.

gdb/testsuite/:

	* gdb.fortran/module.exp: Extend regular expression
	to cover module contents.

Change-Id: Iafb35e46f365728f06ae470320b757417bfdc00c
Signed-off-by: Keven Boell <keven.boell@intel.com>