diff options
author | Tom de Vries <tdevries@suse.de> | 2018-07-04 00:07:30 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2018-07-04 11:56:51 +0200 |
commit | 1ea5da02629b4bf9c4cea50aee189f94fa7d1a3b (patch) | |
tree | 33ef422b27b891d67e07c3a69d51fe0274c22bfe /gdb/testsuite/gdb.dwarf2 | |
parent | f51e0e20bd303a9b366084ac719db10978402713 (diff) | |
download | gdb-1ea5da02629b4bf9c4cea50aee189f94fa7d1a3b.zip gdb-1ea5da02629b4bf9c4cea50aee189f94fa7d1a3b.tar.gz gdb-1ea5da02629b4bf9c4cea50aee189f94fa7d1a3b.tar.bz2 |
[gdb/symtab] Fix version check in dwarf compilation unit header
The version check of the dwarf compilation unit header in
error_check_comp_unit_head is done too late, and consequently dwarf code with
an unsupported version in the compilation unit header is interpreted as dwarf5
code in read_comp_unit_head.
Fixed by moving the check earlier.
Build and reg-tested on x86_64-linux.
2018-07-04 Tom de Vries <tdevries@suse.de>
* dwarf2read.c (error_check_comp_unit_head): Move dwarf version
check ...
(read_comp_unit_head): ... here.
* gdb.dwarf2/dw2-error.exp: Update expected error message.
Diffstat (limited to 'gdb/testsuite/gdb.dwarf2')
-rw-r--r-- | gdb/testsuite/gdb.dwarf2/dw2-error.exp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-error.exp b/gdb/testsuite/gdb.dwarf2/dw2-error.exp index e22667d..8c162a0 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-error.exp +++ b/gdb/testsuite/gdb.dwarf2/dw2-error.exp @@ -41,7 +41,7 @@ gdb_test_no_output "set breakpoint pending off" # First test that reading symbols fails. gdb_test "file $binfile" \ - {Reading symbols.*Dwarf Error: wrong unit_type in compilation unit header \(is 0, should be 1 or 2\).*} \ + {Reading symbols.*Dwarf Error: wrong version in compilation unit header \(is 153, should be 2, 3, 4 or 5\).*} \ "file $testfile" # Now check that we can still break given the minimal symbol. |