aboutsummaryrefslogtreecommitdiff
path: root/gdb/NEWS
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2019-09-02 23:31:10 +0100
committerAndrew Burgess <andrew.burgess@embecosm.com>2019-10-03 21:25:22 +0100
commit179aed7fdc7864ad3623a680b371a98baadb7705 (patch)
tree880688ca6f543acc9afb09ccf88d89ecd563ae8c /gdb/NEWS
parent0a4b09130aa8c2d2e1c1605a69962fe0a2499479 (diff)
downloadbinutils-179aed7fdc7864ad3623a680b371a98baadb7705.zip
binutils-179aed7fdc7864ad3623a680b371a98baadb7705.tar.gz
binutils-179aed7fdc7864ad3623a680b371a98baadb7705.tar.bz2
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.
Diffstat (limited to 'gdb/NEWS')
-rw-r--r--gdb/NEWS9
1 files changed, 9 insertions, 0 deletions
diff --git a/gdb/NEWS b/gdb/NEWS
index 3211ec9..25e67e4 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -37,6 +37,15 @@
* New convenience variable $_ada_exception holds the address of the
Ada exception being thrown. This is set by Ada-related catchpoints.
+* GDB can now place breakpoints on nested functions and subroutines in
+ Fortran code. The '::' operator can be used between parent and
+ child scopes when placing breakpoints, for example:
+
+ (gdb) break outer_function::inner_function
+
+ The 'outer_function::' prefix is only needed if 'inner_function' is
+ not visible in the current scope.
+
* Python API
** The gdb.Value type has a new method 'format_string' which returns a