Revision tags: llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2 |
|
#
32e10aa6 |
| 26-Sep-2023 |
Alex Langford <alangford@apple.com> |
[DebugInfo] Change return type of DWARFDebugAbbrev::parse (#67191)
To make DWARFDebugAbbrev more amenable to error-handling, I would like
to change the return type of DWARFDebugAbbrev::parse from `
[DebugInfo] Change return type of DWARFDebugAbbrev::parse (#67191)
To make DWARFDebugAbbrev more amenable to error-handling, I would like
to change the return type of DWARFDebugAbbrev::parse from `void` to
`Error`. Users of DWARFDebugAbbrev can consume the error if they want to
use all the valid DWARF that was parsed (without worrying about the
malformed DWARF) or stop when the parse fails if the use case needs to
be strict.
This also will bring the LLVM DWARFDebugAbbrev interface closer to
LLDB's which opens up the opportunity for LLDB adopt the LLVM
implementation with minimal changes.
show more ...
|
Revision tags: llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5 |
|
#
71572642 |
| 24-May-2023 |
Alex Langford <alangford@apple.com> |
[DebugInfo] Add error-handling to DWARFAbbreviationDeclarationSet
This commit aims to improve error handling in the DWARFAbbreviationDeclarationSet class. Specifically, we change the return type of
[DebugInfo] Add error-handling to DWARFAbbreviationDeclarationSet
This commit aims to improve error handling in the DWARFAbbreviationDeclarationSet class. Specifically, we change the return type of DWARFAbbreviationDeclarationSet::extract to an llvm::Error. In doing so, we propagate the error from DWARFAbbreviationDeclaration::extract another layer upward.
I have built on the previous unittest for DWARFDebugAbbrev that I wrote a few days prior. Namely, I am verifying that the following should give an error: - An invalid tag following a non-null code - An invalid attribute with a valid form - A valid attribute with an invalid form - An incorrectly terminated DWARFAbbreviationDeclaration
Additionally, I uncovered some invalid DWARF in an unrelated dsymutil test. Namely the last Abbreviation Decl was missing a code. This test has been updated accordingly. However, this commit does not fix the underlying issue: llvm-dwarfdump does not correctly verify the debug abbreviation section to catch these kinds of mistakes. I have updated DWARFVerifier to not dereference a pointer without first checking it and left a FIXME for future contributors.
Differential Revision: https://reviews.llvm.org/D151353
show more ...
|
#
94935c0d |
| 06-Jun-2023 |
Alex Langford <alangford@apple.com> |
Re-apply "Revert "[DebugInfo] Add error checking around data extraction in DWARFAbbreviationDeclaration::extract""
This reverts commit 11d61c079d4b4927efea42a38a27d4586887b764 to re-apply 6836a47b7e
Re-apply "Revert "[DebugInfo] Add error checking around data extraction in DWARFAbbreviationDeclaration::extract""
This reverts commit 11d61c079d4b4927efea42a38a27d4586887b764 to re-apply 6836a47b7e6b57927664ec6ec750ae37bb951129 with modifications.
Specifically, the errors in DWARFAbbreviationDeclaration::extract needed to be moved as they are returned to ensure the right Error constructor is selected.
show more ...
|
#
11d61c07 |
| 06-Jun-2023 |
Alex Langford <alangford@apple.com> |
Revert "[DebugInfo] Add error checking around data extraction in DWARFAbbreviationDeclaration::extract"
This reverts commit 6836a47b7e6b57927664ec6ec750ae37bb951129. This breaks some bots, need to i
Revert "[DebugInfo] Add error checking around data extraction in DWARFAbbreviationDeclaration::extract"
This reverts commit 6836a47b7e6b57927664ec6ec750ae37bb951129. This breaks some bots, need to investigate.
show more ...
|
#
6836a47b |
| 30-May-2023 |
Alex Langford <alangford@apple.com> |
[DebugInfo] Add error checking around data extraction in DWARFAbbreviationDeclaration::extract
In trying to hoist errors further up this callstack, I discovered that if the data in the debug_abbrev
[DebugInfo] Add error checking around data extraction in DWARFAbbreviationDeclaration::extract
In trying to hoist errors further up this callstack, I discovered that if the data in the debug_abbrev section is invalid entirely, the code that parses the debug_abbrev section may do strange or unpredictable things. The underlying issue is that DataExtractor will return a value of 0 when it encounters an error in extracting a LEB128 value. It's thus difficult to determine if there was an error just by looking at the return value. This patch aims to bail at the first sight of an error in the debug_abbrev parsing code.
Differential Revision: https://reviews.llvm.org/D151755
show more ...
|
#
ad66e9be |
| 23-May-2023 |
Alex Langford <alangford@apple.com> |
[DebugInfo] Follow-up to D151001
I landed D151001 before it had gotten sign-off from all the reviewers. This is a follow-up to address the additional feedback.
Differential Revision: https://review
[DebugInfo] Follow-up to D151001
I landed D151001 before it had gotten sign-off from all the reviewers. This is a follow-up to address the additional feedback.
Differential Revision: https://reviews.llvm.org/D151233
show more ...
|
#
ca1b9943 |
| 19-May-2023 |
Alex Langford <alangford@apple.com> |
[DebugInfo][NFCI] Add unittest for DWARFAbbreviationDeclarationSet
The classes relevant to DWARFDebugAbbrev do not have any unittests verifying their behavior. Seeing as there is not much error hand
[DebugInfo][NFCI] Add unittest for DWARFAbbreviationDeclarationSet
The classes relevant to DWARFDebugAbbrev do not have any unittests verifying their behavior. Seeing as there is not much error handling around these classes right now, I want to add some testing as I plan on making changes to these classes in the near future.
Differential Revision: https://reviews.llvm.org/D151001
show more ...
|