forked from llvm-mirror/llvm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add DIContext::getLineInfoForAddressRange() function and test. This f…
…unction allows a caller to obtain a table of line information for a function using the function's address and size. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173537 91177308-0d34-0410-b5e6-96231b3b80d8
- Loading branch information
Andrew Kaylor
committed
Jan 26, 2013
1 parent
32a5795
commit e27a787
Showing
8 changed files
with
191 additions
and
8 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
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
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 |
---|---|---|
@@ -1,15 +1,49 @@ | ||
RUN: llvm-rtdyld -printline %p/Inputs/test-inline.o \ | ||
RUN: | FileCheck %s -check-prefix TEST_INLINE | ||
RUN: llvm-rtdyld -printline %p/Inputs/test-parameters.o \ | ||
RUN: | FileCheck %s -check-prefix TEST_PARAMETERS | ||
|
||
; This test verifies that relocations are correctly applied to the | ||
; .debug_line section. If relocations are not applied the first two | ||
; functions will be reported as both starting at address zero in the | ||
; line number table. | ||
; .debug_line section and exercises DIContext::getLineInfoForAddressRange(). | ||
; If relocations are not applied the first two functions will be reported as | ||
; both starting at address zero in the; line number table. | ||
TEST_INLINE: Function: _Z15test_parametersPfPA2_dR11char_structPPitm, Size = 170 | ||
TEST_INLINE-NEXT: Line info:test-inline.cpp, line:33 | ||
TEST_INLINE-NEXT: Line info @ 0: test-inline.cpp, line:33 | ||
TEST_INLINE-NEXT: Line info @ 35: test-inline.cpp, line:34 | ||
TEST_INLINE-NEXT: Line info @ 165: test-inline.cpp, line:35 | ||
TEST_INLINE-NEXT: Function: _Z3foov, Size = 3 | ||
TEST_INLINE-NEXT: Line info:test-inline.cpp, line:28 | ||
TEST_INLINE-NEXT: Line info @ 0: test-inline.cpp, line:28 | ||
TEST_INLINE-NEXT: Line info @ 2: test-inline.cpp, line:29 | ||
TEST_INLINE-NEXT: Line info @ 3: test-inline.cpp, line:29 | ||
TEST_INLINE-NEXT: Function: main, Size = 146 | ||
TEST_INLINE-NEXT: Line info:test-inline.cpp, line:39 | ||
TEST_INLINE-NEXT: Line info @ 0: test-inline.cpp, line:39 | ||
TEST_INLINE-NEXT: Line info @ 21: test-inline.cpp, line:41 | ||
TEST_INLINE-NEXT: Line info @ 39: test-inline.cpp, line:42 | ||
TEST_INLINE-NEXT: Line info @ 60: test-inline.cpp, line:44 | ||
TEST_INLINE-NEXT: Line info @ 80: test-inline.cpp, line:48 | ||
TEST_INLINE-NEXT: Line info @ 90: test-inline.cpp, line:45 | ||
TEST_INLINE-NEXT: Line info @ 95: test-inline.cpp, line:46 | ||
TEST_INLINE-NEXT: Line info @ 114: test-inline.cpp, line:48 | ||
TEST_INLINE-NEXT: Line info @ 141: test-inline.cpp, line:49 | ||
TEST_INLINE-NEXT: Line info @ 146: test-inline.cpp, line:49 | ||
|
||
; This test checks the case where all code is in a single section. | ||
TEST_PARAMETERS: Function: _Z15test_parametersPfPA2_dR11char_structPPitm, Size = 170 | ||
TEST_PARAMETERS-NEXT: Line info @ 0: test-parameters.cpp, line:33 | ||
TEST_PARAMETERS-NEXT: Line info @ 35: test-parameters.cpp, line:34 | ||
TEST_PARAMETERS-NEXT: Line info @ 165: test-parameters.cpp, line:35 | ||
TEST_PARAMETERS-NEXT: Function: _Z3foov, Size = 3 | ||
TEST_PARAMETERS-NEXT: Line info @ 0: test-parameters.cpp, line:28 | ||
TEST_PARAMETERS-NEXT: Line info @ 2: test-parameters.cpp, line:29 | ||
TEST_PARAMETERS-NEXT: Function: main, Size = 146 | ||
TEST_PARAMETERS-NEXT: Line info @ 0: test-parameters.cpp, line:39 | ||
TEST_PARAMETERS-NEXT: Line info @ 21: test-parameters.cpp, line:41 | ||
TEST_PARAMETERS-NEXT: Line info @ 39: test-parameters.cpp, line:42 | ||
TEST_PARAMETERS-NEXT: Line info @ 60: test-parameters.cpp, line:44 | ||
TEST_PARAMETERS-NEXT: Line info @ 80: test-parameters.cpp, line:48 | ||
TEST_PARAMETERS-NEXT: Line info @ 90: test-parameters.cpp, line:45 | ||
TEST_PARAMETERS-NEXT: Line info @ 95: test-parameters.cpp, line:46 | ||
TEST_PARAMETERS-NEXT: Line info @ 114: test-parameters.cpp, line:48 | ||
TEST_PARAMETERS-NEXT: Line info @ 141: test-parameters.cpp, line:49 | ||
TEST_PARAMETERS-NEXT: Line info @ 146: test-parameters.cpp, line:49 | ||
|
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