OSDN Git Service

gdb/
authorjkratoch <jkratoch>
Thu, 23 Sep 2010 04:22:43 +0000 (04:22 +0000)
committerjkratoch <jkratoch>
Thu, 23 Sep 2010 04:22:43 +0000 (04:22 +0000)
* dwarf2read.c (die_needs_namespace) <DW_TAG_variable>: Add also
DW_TAG_constant.

gdb/testsuite/
* gdb.fortran/module.exp (fully qualified name of DW_TAG_constant):
New test.
* gdb.fortran/module.f90 (mod1) <var_const>: New constant.

gdb/ChangeLog
gdb/dwarf2read.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.fortran/module.exp
gdb/testsuite/gdb.fortran/module.f90

index 0565ad4..d19c709 100644 (file)
@@ -1,3 +1,8 @@
+2010-09-22  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+       * dwarf2read.c (die_needs_namespace) <DW_TAG_variable>: Add also
+       DW_TAG_constant.
+
 2010-09-22  Joel Brobecker  <brobecker@adacore.com>
 
        * dwarf2read.c (scan_partial_symbols): Add handling of
index 082400e..8a87b7b 100644 (file)
@@ -4614,6 +4614,7 @@ die_needs_namespace (struct die_info *die, struct dwarf2_cu *cu)
       return 1;
 
     case DW_TAG_variable:
+    case DW_TAG_constant:
       /* We only need to prefix "globally" visible variables.  These include
         any variable marked with DW_AT_external or any variable that
         lives in a namespace.  [Variables in anonymous namespaces
index 5d04cd9..40a89ff 100644 (file)
@@ -1,3 +1,9 @@
+2010-09-22  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+       * gdb.fortran/module.exp (fully qualified name of DW_TAG_constant):
+       New test.
+       * gdb.fortran/module.f90 (mod1) <var_const>: New constant.
+
 2010-09-22  Joel Brobecker  <brobecker@adacore.com>
 
        * gdb.dwarf2/dw2-const.S: Use .4byte to reference the target
index fabf660..f81d2dc 100644 (file)
@@ -26,6 +26,8 @@ if { [prepare_for_testing $testfile.exp $testfile $srcfile {debug f77}] } {
 # The current source language is "auto; currently fortran".
 gdb_test "p modmany::var_i" " = 14" "stopped language detection"
 
+gdb_test "print mod1::var_const" " = 20" "fully qualified name of DW_TAG_constant"
+
 if ![runto MAIN__] then {
     perror "couldn't run to breakpoint MAIN__"
     continue
index a8428cb..4e014c9 100644 (file)
@@ -15,6 +15,8 @@
 
 module mod1
         integer :: var_i = 1
+        integer :: var_const
+        parameter (var_const = 20)
 end module mod1
 
 module mod2