binutils-gdb/gdb/testsuite/gdb.fortran
Andrew Burgess 179aed7fdc gdb/fortran: Allow for matching symbols with missing scope
This commit allows symbol matching within Fortran code without having
to specify all of the symbol's scope.  For example, given this Fortran
code:

    module aaa
    contains
      subroutine foo
        print *, "hello."
      end subroutine foo
    end module aaa

    subroutine foo
      print *, "hello."
    end subroutine foo

    program test
      call foo
    contains
      subroutine foo
        print *, "hello."
      end subroutine foo

      subroutine bar
        use aaa
        call foo
      end subroutine bar
    end program test

The user can now do this:

    (gdb) b foo
    Breakpoint 1 at 0x4006c2: foo. (3 locations)
    (gdb) info breakpoints
    Num     Type           Disp Enb Address            What
    1       breakpoint     keep y   <MULTIPLE>
    1.1                         y   0x00000000004006c2 in aaa::foo at nest.f90:4
    1.2                         y   0x0000000000400730 in foo at nest.f90:9
    1.3                         y   0x00000000004007c3 in test::foo at nest.f90:16

The user asks for a breakpoint on 'foo' and is given a breakpoint on
all three possible 'foo' locations.  The user is, of course, still
able to specify the scope in order to place a single breakpoint on
just one of the foo functions (or use 'break -qualified foo' to break
on just the global foo).

gdb/ChangeLog:

	* f-lang.c (f_language_defn): Use cp_get_symbol_name_matcher and
	cp_search_name_hash.
	* NEWS: Add entry about nested function support.

gdb/testsuite/ChangeLog:

	* gdb.fortran/nested-funcs-2.exp: Run tests with and without the
	nested function prefix.
2019-10-03 21:25:22 +01:00
..
array-bounds.exp Allow really large fortran array bounds: fortran type/value printers 2019-03-29 10:35:19 -07:00
array-bounds.f90 Allow really large fortran array bounds: fortran type/value printers 2019-03-29 10:35:19 -07:00
array-element.exp
array-element.f
block-data.exp Dwarf: Don't add nameless modules to partial symbol table 2019-06-11 19:20:09 +01:00
block-data.f Dwarf: Don't add nameless modules to partial symbol table 2019-06-11 19:20:09 +01:00
charset.exp
charset.f90
common-block.exp
common-block.f90
complex.exp gdb/fortran: Use floatformats_ia64_quad for fortran 16-byte floats 2019-05-18 09:49:02 +01:00
complex.f90 gdb/fortran: better types for components of complex numbers 2019-04-30 10:10:31 +01:00
derived-type-function.exp
derived-type-function.f90
derived-type.exp
derived-type.f90
dot-ops.exp gdb/fortran: Simplify handling of Fortran dot operations and keywords 2019-03-06 18:11:31 +00:00
exprs.exp gdb/fortran: Print 'void' type in lower case 2019-04-30 10:17:01 +01:00
function-calls.exp Fortran function calls with arguments 2019-03-06 08:24:12 +00:00
function-calls.f90 Fortran function calls with arguments 2019-03-06 08:24:12 +00:00
info-types.exp [gdb/testsuite] Fix gdb.fortran/info-types.exp regexp 2019-08-29 14:43:11 +02:00
info-types.f90 gdb/fortran: Don't include module symbols when searching for types 2019-08-28 13:33:55 +01:00
intrinsics.exp gdb/fortran: Additional builtin procedures 2019-04-30 10:10:24 +01:00
intrinsics.f90 gdb/fortran: Add Fortran 'kind' intrinsic and keyword 2019-03-06 18:11:31 +00:00
library-module-lib.f90
library-module-main.f90
library-module.exp
logical.exp
logical.f90
max-depth.exp gdb: Introduce 'print max-depth' feature 2019-04-29 22:01:09 +01:00
max-depth.f90 gdb: Introduce 'print max-depth' feature 2019-04-29 22:01:09 +01:00
module.exp
module.f90
multi-dim.exp
multi-dim.f90
nested-funcs-2.exp gdb/fortran: Allow for matching symbols with missing scope 2019-10-03 21:25:22 +01:00
nested-funcs-2.f90 gdb/fortran: Nested subroutine support 2019-10-03 21:25:22 +01:00
nested-funcs.exp gdb/fortran: Nested subroutine support 2019-10-03 21:25:22 +01:00
nested-funcs.f90 gdb/fortran: Nested subroutine support 2019-10-03 21:25:22 +01:00
pointers.f90 gdb/fortran: Show the type for non allocated / associated types 2019-06-16 00:29:35 +01:00
print-formatted.exp
print-formatted.f90
print_type.exp gdb/fortran: Show the type for non allocated / associated types 2019-06-16 00:29:35 +01:00
printing-types.exp gdb/fortran: Use floatformats_ia64_quad for fortran 16-byte floats 2019-05-18 09:49:02 +01:00
printing-types.f90 gdb/fortran: Use floatformats_ia64_quad for fortran 16-byte floats 2019-05-18 09:49:02 +01:00
ptr-indentation.exp gdb/fortran: Update rules for printing whitespace in types 2019-04-30 10:36:56 +01:00
ptr-indentation.f90
ptype-on-functions.exp gdb/fortran: Update rules for printing whitespace in types 2019-04-30 10:36:56 +01:00
ptype-on-functions.f90 gdb/fortran: print function arguments when printing function type 2019-04-30 10:34:26 +01:00
short-circuit-argument-list.exp
short-circuit-argument-list.f90
subarray.exp
subarray.f
type-kinds.exp gdb/fortran: Use floatformats_ia64_quad for fortran 16-byte floats 2019-05-18 09:49:02 +01:00
type.f90
types.exp gdb/fortran: Cleanup code for parsing logical constants 2019-03-06 18:11:30 +00:00
vla-alloc-assoc.exp
vla-datatypes.exp gdb/fortran: Add allocatable type qualifier 2019-04-30 10:36:57 +01:00
vla-datatypes.f90
vla-history.exp
vla-ptr-info.exp gdb/fortran: Update rules for printing whitespace in types 2019-04-30 10:36:56 +01:00
vla-ptype-sub.exp
vla-ptype.exp gdb: Better support for dynamic properties with negative values 2019-07-12 12:09:55 +01:00
vla-sizeof.exp gdb: Better support for dynamic properties with negative values 2019-07-12 12:09:55 +01:00
vla-sub.f90
vla-type.exp gdb/fortran: Show the type for non allocated / associated types 2019-06-16 00:29:35 +01:00
vla-type.f90
vla-value-sub-arbitrary.exp
vla-value-sub-finish.exp
vla-value-sub.exp
vla-value.exp gdb: Better support for dynamic properties with negative values 2019-07-12 12:09:55 +01:00
vla.f90 gdb: Better support for dynamic properties with negative values 2019-07-12 12:09:55 +01:00
whatis_type.exp