From c2b0a2291a7d54a96c2f7a7b17b917902f5b64e0 Mon Sep 17 00:00:00 2001 From: Jan Kratochvil Date: Wed, 22 Sep 2010 19:22:44 +0000 Subject: [PATCH] gdb/ * dwarf2read.c (die_needs_namespace) : 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) : New constant. --- gdb/ChangeLog | 5 +++++ gdb/dwarf2read.c | 1 + gdb/testsuite/ChangeLog | 6 ++++++ gdb/testsuite/gdb.fortran/module.exp | 2 ++ gdb/testsuite/gdb.fortran/module.f90 | 2 ++ 5 files changed, 16 insertions(+) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 0565ad462d..d19c709916 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2010-09-22 Jan Kratochvil + + * dwarf2read.c (die_needs_namespace) : Add also + DW_TAG_constant. + 2010-09-22 Joel Brobecker * dwarf2read.c (scan_partial_symbols): Add handling of diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 082400e19d..8a87b7b029 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -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 diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 5d04cd95dc..40a89ffa7a 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2010-09-22 Jan Kratochvil + + * gdb.fortran/module.exp (fully qualified name of DW_TAG_constant): + New test. + * gdb.fortran/module.f90 (mod1) : New constant. + 2010-09-22 Joel Brobecker * gdb.dwarf2/dw2-const.S: Use .4byte to reference the target diff --git a/gdb/testsuite/gdb.fortran/module.exp b/gdb/testsuite/gdb.fortran/module.exp index fabf6604f1..f81d2dc057 100644 --- a/gdb/testsuite/gdb.fortran/module.exp +++ b/gdb/testsuite/gdb.fortran/module.exp @@ -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 diff --git a/gdb/testsuite/gdb.fortran/module.f90 b/gdb/testsuite/gdb.fortran/module.f90 index a8428cbc9f..4e014c9bd4 100644 --- a/gdb/testsuite/gdb.fortran/module.f90 +++ b/gdb/testsuite/gdb.fortran/module.f90 @@ -15,6 +15,8 @@ module mod1 integer :: var_i = 1 + integer :: var_const + parameter (var_const = 20) end module mod1 module mod2 -- 2.34.1