This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/19635] New: gdb.fortran/library-module.exp false regression on GCC upgrade


https://sourceware.org/bugzilla/show_bug.cgi?id=19635

            Bug ID: 19635
           Summary: gdb.fortran/library-module.exp false regression on GCC
                    upgrade
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: fortran
          Assignee: unassigned at sourceware dot org
          Reporter: jan.kratochvil at redhat dot com
  Target Milestone: ---

gcc-4.9.2-6.fc21.x86_64 -> gcc-5.3.1-2.fc23.x86_64
-PASS: gdb.fortran/library-module.exp: print var_i in lib
+FAIL: gdb.fortran/library-module.exp: print var_i in lib
-PASS: gdb.fortran/library-module.exp: print var_i in main
+FAIL: gdb.fortran/library-module.exp: print var_i in main

But that is not a bug in gfortran, it is a bug in GDB.

It can be workarounded by:
        sed -i -e 's/GNU Fortran2008/GNU Fortran 008/' library-module-lib.so

It is due to gdb/dwarf2read.c:
                  /* Workaround gfortran PR debug/40040 - it uses
                     DW_AT_location for variables in -fPIC libraries which may
                     get overriden by other libraries/executable and get
                     a different address.  Resolve it by the minimal symbol
                     which may come from inferior's executable using copy
                     relocation.  Make this workaround only for gfortran as for
                     other compilers GDB cannot guess the minimal symbol
                     Fortran mangling kind.  */
                  if (cu->language == language_fortran && die->parent
                      && die->parent->tag == DW_TAG_module
                      && cu->producer
                      && startswith (cu->producer, "GNU Fortran "))
                                                    ^^^^^^^^^^^^
                    SYMBOL_ACLASS_INDEX (sym) = LOC_UNRESOLVED;

At least I think it is a bug in GDB but I do not have a fix.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]