A new search routine has been added to be used when "set language fortran" is on. The new code fails to fall through to the default searches when the new search lists are empty. Note that this bug was introduced between gdb 6.8 and 6.8-37. As a result the following fails (notice though that is I reset the language to C it succeeds): -------- program array2a integer, dimension(3,5) :: arr integer i,j do i=1,3 do j=1,5 arr(i,j) = i*10+j; enddo enddo print *, arr end ----------- ... gdb array2a gdb array2a.exe GNU gdb Fedora (6.8-37.el5) Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "ia64-redhat-linux-gnu"... (gdb) set language fortran (gdb) b array2a Function "array2a" not defined. Make breakpoint pending on future shared library load? (y or [n]) n (gdb) set language c (gdb) b array2a Breakpoint 1 at 0x4000000000002b71: file array2a.f, line 5. (gdb) Here is a diff to fix the problem. It just puts the test around the new search rather than returning prematurely. Note that this routine is new to 6.8-39. In 6.8 the language config is simply bound to basic_lookup_symbol_nonlocal. *** f-lang.c 2010-01-27 11:45:30.000000000 -0500 --- f-lang.c.new 2010-01-27 11:24:46.000000000 -0500 *************** *** 320,351 **** { struct fortran_using *use; ! if (!block) ! return NULL; ! ! for (use = BLOCK_FORTRAN_USE (block); use; use = use->next) ! { ! struct symbol *sym; ! struct type *type; ! struct symbol *retval; ! ! sym = lookup_symbol_global (use->module_name, NULL, block, MODULE_DOMAIN, ! symtab); ! ! /* Module name lookup should not fail with correct debug info. */ ! if (sym == NULL) ! continue; ! ! type = SYMBOL_TYPE (sym); ! gdb_assert (TYPE_CODE (type) == TYPE_CODE_MODULE); ! gdb_assert (TYPE_MODULE_BLOCK (type) != NULL); ! ! retval = lookup_block_symbol (TYPE_MODULE_BLOCK (type), name, ! linkage_name, domain); ! if (retval) ! return retval; } - return basic_lookup_symbol_nonlocal (name, linkage_name, block, domain, symtab); } --- 320,349 ---- { struct fortran_using *use; ! if (block) { ! for (use = BLOCK_FORTRAN_USE (block); use; use = use->next) ! { ! struct symbol *sym; ! struct type *type; ! struct symbol *retval; ! ! sym = lookup_symbol_global (use->module_name, NULL, block, MODULE_DOMAIN, ! symtab); ! ! /* Module name lookup should not fail with correct debug info. */ ! if (sym == NULL) ! continue; ! ! type = SYMBOL_TYPE (sym); ! gdb_assert (TYPE_CODE (type) == TYPE_CODE_MODULE); ! gdb_assert (TYPE_MODULE_BLOCK (type) != NULL); ! ! retval = lookup_block_symbol (TYPE_MODULE_BLOCK (type), name, ! linkage_name, domain); ! if (retval) ! return retval; ! } } return basic_lookup_symbol_nonlocal (name, linkage_name, block, domain, symtab); }
Thanks, checked-in archer-jankratochvil-fortran-module and going to be pushed for RHEL: http://sourceware.org/ml/archer/2010-q1/msg00047.html
gdb-6.8.50.20090302-40.fc11 has been submitted as an update for Fedora 11. http://admin.fedoraproject.org/updates/gdb-6.8.50.20090302-40.fc11
gdb-7.0.1-31.fc12 has been submitted as an update for Fedora 12. http://admin.fedoraproject.org/updates/gdb-7.0.1-31.fc12
gdb-6.8.50.20090302-40.fc11 has been pushed to the Fedora 11 stable repository. If problems still persist, please make note of it in this bug report.
gdb-7.0.1-31.fc12 has been pushed to the Fedora 12 stable repository. If problems still persist, please make note of it in this bug report.
* Mon Feb 8 2010 Jan Kratochvil <jan.kratochvil> - 7.0.1-21.el5 - Fortran: Fix regression on setting breakpoint at toplevel symbols (BZ 559291; David Moore, Intel). - Resolves: rhbz#559291
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2010-0285.html