-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for binaries with both .debug_ranges and .debug_rnglists sections. .debug_rnglists was added in DWARF5 to replace .debug_ranges. This change handles cases when the binary has compilation units with DWARF5 info and compilation units with pre-version-5 DWARF info. Fix processing of DW_AT_ranges attributes to allow DW_FORM_data4 and DW_FORM_data8 This affects DWARF pre-version-4 and was broken by dd1395a . This patch also adds a test with a binary from #154 . Fixes #154
- Loading branch information
1 parent
79a581d
commit 4f0fcef
Showing
9 changed files
with
127 additions
and
77 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#include "addr2line.h" | ||
#include "third_party/abseil/absl/strings/str_cat.h" | ||
#include "util/testing/status_matchers.h" | ||
|
||
namespace { | ||
|
||
using ::devtools_crosstool_autofdo::Addr2line; | ||
|
||
TEST(Addr2lineTest, Dwarf2Dwarf5Binary) { | ||
const std::string binary = | ||
absl::StrCat(::testing::SrcDir(), | ||
"/testdata/" | ||
"dwarf2_dwarf5.bin"); | ||
|
||
Addr2line* addr2line = Addr2line::Create(binary); | ||
EXPECT_TRUE(addr2line != NULL); | ||
} | ||
} // namespace |
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
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
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
Oops, something went wrong.