This is the mail archive of the
gdb-testers@sourceware.org
mailing list for the GDB project.
[binutils-gdb] Fix language of compilation unit with unknown file extension
- From: sergiodj+buildbot at redhat dot com
- To: gdb-testers at sourceware dot org
- Date: Thu, 20 Aug 2015 07:45:19 -0400
- Subject: [binutils-gdb] Fix language of compilation unit with unknown file extension
- Authentication-results: sourceware.org; auth=none
*** TEST RESULTS FOR COMMIT 40e3ad0ebb0c71008b928d6d350e9258dc1dcf2a ***
Author: Pedro Alves <palves@redhat.com>
Branch: master
Commit: 40e3ad0ebb0c71008b928d6d350e9258dc1dcf2a
Fix language of compilation unit with unknown file extension
Here, in dwarfread.c:process_full_comp_unit:
/* Set symtab language to language from DW_AT_language. If the
compilation is from a C file generated by language preprocessors, do
not set the language if it was already deduced by start_subfile. */
if (!(cu->language == language_c
&& COMPUNIT_FILETABS (cust)->language != language_c))
COMPUNIT_FILETABS (cust)->language = cu->language;
in case start_subfile doesn't manage to deduce a language
COMPUNIT_FILETABS(cust)->language ends up as language_unknown, not
language_c. So the condition above evals false and we never set the
language from the cu's language.
gdb/ChangeLog:
2015-08-20 Pedro Alves <palves@redhat.com>
* dwarf2read.c (process_full_comp_unit): To tell whether
start_subfile managed to deduce a language, test for
language_unknown instead of language_c.
gdb/testsuite/ChangeLog:
2015-08-20 Pedro Alves <palves@redhat.com>
* gdb.dwarf2/comp-unit-lang.exp: New file.
* gdb.dwarf2/comp-unit-lang.c: New file.
- Follow-Ups:
- Failures on Debian-s390x-native-gdbserver-m64, branch master
- Failures on Fedora-x86_64-m32, branch master
- Failures on Fedora-x86_64-cc-with-index, branch master
- Failures on Fedora-x86_64-native-extended-gdbserver-m32, branch master
- Failures on Fedora-ppc64be-cc-with-index, branch master
- Failures on AIX-POWER7-plain, branch master
- Failures on Fedora-x86_64-native-gdbserver-m64, branch master
- Failures on Fedora-s390x-m64, branch master
- Failures on Fedora-x86_64-native-extended-gdbserver-m64, branch master
- Failures on Debian-i686, branch master
- Failures on Fedora-x86_64-native-gdbserver-m32, branch master
- Failures on Fedora-ppc64be-m64, branch master
- Failures on Fedora-ppc64le-native-extended-gdbserver-m64, branch master
- Failures on Debian-i686-native-gdbserver, branch master
- Failures on Fedora-ppc64be-native-gdbserver-m64, branch master
- Failures on Fedora-ppc64le-cc-with-index, branch master
- Failures on Debian-s390x-m64, branch master
- Failures on Fedora-ppc64le-native-gdbserver-m64, branch master
- Failures on Debian-s390x-native-extended-gdbserver-m64, branch master
- Failures on Debian-i686-native-extended-gdbserver, branch master
- Failures on Fedora-ppc64le-m64, branch master
- Failures on Debian-x86_64-m64, branch master
- Failures on Debian-x86_64-native-gdbserver-m64, branch master