aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2read.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2010-10-17 18:49:47 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2010-10-17 18:49:47 +0000
commit01f8c46dda6579913074a1d04eca0ad7fc437f47 (patch)
treea0dfa003d324672c6b0f0cbd95c2d1c27bfc6368 /gdb/dwarf2read.c
parent8aeb23f3648c6ef10c5715e30f04563d1cc28709 (diff)
downloadgdb-01f8c46dda6579913074a1d04eca0ad7fc437f47.zip
gdb-01f8c46dda6579913074a1d04eca0ad7fc437f47.tar.gz
gdb-01f8c46dda6579913074a1d04eca0ad7fc437f47.tar.bz2
gdb/
Fix the `stopped language detection' testcase for gcc-4.5. * dwarf2read.c (read_partial_die): Set also LANGUAGE_OF_MAIN. * symfile.c (set_initial_language): Move variable filename to a more inner block. Prefer LANGUAGE_OF_MAIN. * symtab.c (language_of_main): New variable. (set_main_name): Always reset LANGUAGE_OF_MAIN. * symtab.h (language_of_main): New declaration.
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r--gdb/dwarf2read.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index e92795b..7c78454 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -8880,7 +8880,13 @@ read_partial_die (struct partial_die_info *part_die,
practice. */
if (DW_UNSND (&attr) == DW_CC_program
&& cu->language == language_fortran)
- set_main_name (part_die->name);
+ {
+ set_main_name (part_die->name);
+
+ /* As this DIE has a static linkage the name would be difficult
+ to look up later. */
+ language_of_main = language_fortran;
+ }
break;
default:
break;