aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2022-07-13 12:20:53 +0200
committerTom de Vries <tdevries@suse.de>2022-07-13 12:20:53 +0200
commit52c0a455466aa437e4b8d6967e44767c8f3fa260 (patch)
tree8bc1c87e84046736a961239650478b4f3b1793f9 /gdb/testsuite
parentdd4c046506cd4da46b439a2b4f8b6d933ecbb961 (diff)
downloadgdb-52c0a455466aa437e4b8d6967e44767c8f3fa260.zip
gdb-52c0a455466aa437e4b8d6967e44767c8f3fa260.tar.gz
gdb-52c0a455466aa437e4b8d6967e44767c8f3fa260.tar.bz2
[gdb/symtab] Make per_cu->set_lang more strict
We have in per_cu->set_lang this comment: ... void set_lang (enum language lang) { /* We'd like to be more strict here, similar to what is done in set_unit_type, but currently a partial unit can go from unknown to minimal to ada to c. */ ... Fix this by not setting m_lang for partial units. This requires us to move the m_unit_type initialization to ensure that m_unit_type is initialized before per_cu->m_lang. Tested on x86_64-linux, with native and target board cc-with-dwz-m.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/gdb.dwarf2/dw2-missing-cu-tag.exp4
1 files changed, 2 insertions, 2 deletions
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-missing-cu-tag.exp b/gdb/testsuite/gdb.dwarf2/dw2-missing-cu-tag.exp
index 3ac94c3..3d2890a 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-missing-cu-tag.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-missing-cu-tag.exp
@@ -54,7 +54,7 @@ clean_restart
set pattern1 \
[multi_line \
"Reading symbols from \[^\r\n\]+" \
- "Dwarf Error: unexpected tag 'DW_TAG_subprogram' at offset $hex \\\[\[^\r\n\]+\\\]"]
+ "Dwarf Error: unexpected tag 'DW_TAG_subprogram' at offset $hex"]
# This pattern is hit when GDB does use -readnow (e.g. running with
# --target_board=readnow).
@@ -62,7 +62,7 @@ set pattern2 \
[multi_line \
"Reading symbols from \[^\r\n\]+" \
"Expanding full symbols from \[^\r\n\]+" \
- "Dwarf Error: unexpected tag 'DW_TAG_subprogram' at offset $hex \\\[\[^\r\n\]+\\\]"]
+ "Dwarf Error: unexpected tag 'DW_TAG_subprogram' at offset $hex"]
# Load the executable, we expect an error from the DWARF parser.
gdb_test_multiple "file $binfile" "file $testfile" {