Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Currently llvm-dwp only handled DW_FORM_string and DW_FORM_GNU_str_index; with this patch it also starts to handle DW_FORM_strx[1-4]? Reviewed By: dblaikie Differential Revision: https://reviews.llvm.org/D75485
- Loading branch information
Showing
8 changed files
with
206 additions
and
46 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
RUN: llvm-dwp %p/../Inputs/handle_strx/dw5.dwo -o %t 2>/dev/null | ||
RUN: llvm-dwarfdump --verbose %t 2>/dev/null | FileCheck --check-prefix=READ_STRX %s | ||
|
||
RUN: not llvm-dwp %p/../Inputs/handle_strx/dw5.dwo %p/../Inputs/handle_strx/dw5.dwo -o %t 2>&1 \ | ||
RUN: | FileCheck --check-prefix=PARSE_STRX %s | ||
|
||
|
||
dw5.o is compiled from a file that contains a single empty void function, | ||
with options -gdwarf-5 and -gsplit-dwarf. | ||
|
||
READ_STRX: DW_AT_name [DW_FORM_strx1]{{.*}}dw5.cc | ||
|
||
PARSE_STRX: error: duplicate DWO ID ({{.*}}) in 'dw5.cc' and 'dw5.cc' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# RUN: llvm-mc -triple x86_64-unknown-linux %s -filetype=obj -o %t.o \ | ||
# RUN: -split-dwarf-file=%t.dwo -dwarf-version=5 | ||
# RUN: not llvm-dwp %t.dwo -o %t.dwp 2>&1 | FileCheck %s | ||
|
||
# CHECK: error: compile unit exceeds .debug_info section range: 20 >= 6 | ||
.section .debug_info.dwo,"e",@progbits | ||
.long 16 # Length of Unit | ||
.short 5 # Version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# RUN: llvm-mc -triple x86_64-unknown-linux %s -filetype=obj -o %t.o \ | ||
# RUN: -split-dwarf-file=%t.dwo -dwarf-version=5 | ||
# RUN: not llvm-dwp %t.dwo -o %t.dwp 2>&1 | FileCheck %s | ||
|
||
# CHECK: error: cannot parse compile unit length: unexpected end of data at offset 0x2 while reading [0x0, 0x4 | ||
.section .debug_info.dwo,"e",@progbits | ||
.short 0 # Length of Unit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# RUN: llvm-mc -triple x86_64-unknown-linux %s -filetype=obj -o %t.o \ | ||
# RUN: -split-dwarf-file=%t.dwo -dwarf-version=5 | ||
# RUN: not llvm-dwp %t.dwo -o %t.dwp 2>&1 | FileCheck %s | ||
|
||
# CHECK: error: cannot parse compile unit version: unexpected end of data at offset 0x4 while reading [0x4, 0x6) | ||
.section .debug_info.dwo,"e",@progbits | ||
.long 0 # Length of Unit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
RUN: not llvm-dwp %p/../Inputs/invalid_string_form.dwo -o %t 2>&1 | FileCheck %s | ||
|
||
CHECK: error: {{.*}}invalid_string_form.dwo': string field encoded without DW_FORM_string or DW_FORM_GNU_str_index | ||
CHECK: error: {{.*}}: string field must be encoded with one of the following: | ||
CHECK: DW_FORM_string, DW_FORM_strx, DW_FORM_strx1, DW_FORM_strx2, DW_FORM_strx3, DW_FORM_strx4, or DW_FORM_GNU_str_index. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters