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.
[dsymutil] Fix handling of inlined_subprogram low_pcs
The value of an inlined subprogram low_pc attribute should not get relocated, but it can happen that it matches the enclosing function's start address and thus gets the generic treatment. Special case it to avoid applying the PC offset twice. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246406 91177308-0d34-0410-b5e6-96231b3b80d8
- Loading branch information
Showing
5 changed files
with
47 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# This is a dummy debug map used for some tests where the contents of the | ||
# map are just an implementation detail. The tests wanting to use that file | ||
# should put all there object files in an explicitely named sub-directory | ||
# of Inputs, and they should be named 1.o, 2.o, ... | ||
# As not finding an object file or symbols isn't a fatal error for dsymutil, | ||
# you can extend this file with as much object files and symbols as needed. | ||
|
||
--- | ||
triple: 'arm64-apple-darwin' | ||
objects: | ||
- filename: 1.o | ||
symbols: | ||
- { sym: _bar, objAddr: 0x0, binAddr: 0x10000, size: 0x10 } | ||
... | ||
|
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,15 @@ | ||
/* Compiled with: clang -arch=arm64 -O2 -g -c inlined_low_pc.c */ | ||
|
||
static int foo(int i) { return 42 + i; } | ||
int bar(int a) { return foo(a); } | ||
|
||
// RUN: llvm-dsymutil -f -y %p/dummy-debug-map-amr64.map -oso-prepend-path %p/../Inputs/inlined-low_pc -o - | llvm-dwarfdump - | FileCheck %s | ||
|
||
// CHECK: DW_TAG_subprogram | ||
// CHECK: DW_AT_low_pc{{.*}}0x0000000000010000 | ||
// CHECK: DW_AT_name{{.*}}"bar" | ||
// CHECK-NOT: NULL | ||
// CHECK: DW_TAG_inlined_subroutine | ||
// CHECK-NEXT: DW_AT_abstract_origin{{.*}}"foo" | ||
// CHECK-NEXT: DW_AT_low_pc{{.*}}0x0000000000010000 | ||
|
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