aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCary Coutant <ccoutant@google.com>2014-05-02 13:37:32 -0700
committerCary Coutant <ccoutant@google.com>2014-05-05 15:23:14 -0700
commit6b97515d17b48e92f61d53fd5f2e8b092660ba52 (patch)
treea2e551c3d18fae517dc4bedf1616f9a2fe65385b
parent5e49ba5736ccaabaa3f11e9db491ca3554bf2a5b (diff)
downloadgdb-6b97515d17b48e92f61d53fd5f2e8b092660ba52.zip
gdb-6b97515d17b48e92f61d53fd5f2e8b092660ba52.tar.gz
gdb-6b97515d17b48e92f61d53fd5f2e8b092660ba52.tar.bz2
Don't complain about the source language when we have pubnames/pubtypes info.
gold/ * gdb-index.cc (Gdb_index_info_reader): Don't complain about language if we have pubnames/pubtypes.
-rw-r--r--gold/ChangeLog5
-rw-r--r--gold/gdb-index.cc29
2 files changed, 19 insertions, 15 deletions
diff --git a/gold/ChangeLog b/gold/ChangeLog
index bad2270..52934f4 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -1,3 +1,8 @@
+2014-05-05 Cary Coutant <ccoutant@google.com>
+
+ * gdb-index.cc (Gdb_index_info_reader): Don't complain about language
+ if we have pubnames/pubtypes.
+
2014-05-02 Cary Coutant <ccoutant@google.com>
* defstd.cc (in_segment): Define __ehdr_start here...
diff --git a/gold/gdb-index.cc b/gold/gdb-index.cc
index 5f1125f..f768827 100644
--- a/gold/gdb-index.cc
+++ b/gold/gdb-index.cc
@@ -357,20 +357,6 @@ Gdb_index_info_reader::visit_top_die(Dwarf_die* die)
case elfcpp::DW_TAG_compile_unit:
case elfcpp::DW_TAG_type_unit:
this->cu_language_ = die->int_attribute(elfcpp::DW_AT_language);
- // Check for languages that require specialized knowledge to
- // construct fully-qualified names, that we don't yet support.
- if (this->cu_language_ == elfcpp::DW_LANG_Ada83
- || this->cu_language_ == elfcpp::DW_LANG_Fortran77
- || this->cu_language_ == elfcpp::DW_LANG_Fortran90
- || this->cu_language_ == elfcpp::DW_LANG_Java
- || this->cu_language_ == elfcpp::DW_LANG_Ada95
- || this->cu_language_ == elfcpp::DW_LANG_Fortran95)
- {
- gold_warning(_("%s: --gdb-index currently supports "
- "only C and C++ languages"),
- this->object()->name().c_str());
- return;
- }
if (die->tag() == elfcpp::DW_TAG_compile_unit)
this->record_cu_ranges(die);
// If there is a pubnames and/or pubtypes section for this
@@ -378,6 +364,20 @@ Gdb_index_info_reader::visit_top_die(Dwarf_die* die)
// info to extract the names.
if (!this->read_pubnames_and_pubtypes(die))
{
+ // Check for languages that require specialized knowledge to
+ // construct fully-qualified names, that we don't yet support.
+ if (this->cu_language_ == elfcpp::DW_LANG_Ada83
+ || this->cu_language_ == elfcpp::DW_LANG_Fortran77
+ || this->cu_language_ == elfcpp::DW_LANG_Fortran90
+ || this->cu_language_ == elfcpp::DW_LANG_Java
+ || this->cu_language_ == elfcpp::DW_LANG_Ada95
+ || this->cu_language_ == elfcpp::DW_LANG_Fortran95)
+ {
+ gold_warning(_("%s: --gdb-index currently supports "
+ "only C and C++ languages"),
+ this->object()->name().c_str());
+ return;
+ }
if (die->tag() == elfcpp::DW_TAG_compile_unit)
++Gdb_index_info_reader::dwarf_cu_nopubnames_count;
else
@@ -392,7 +392,6 @@ Gdb_index_info_reader::visit_top_die(Dwarf_die* die)
this->object()->name().c_str());
return;
}
-
}
// Visit the children of PARENT, looking for symbols to add to the index.