| 1 |
/* |
| 2 |
* This file is used to test dsymutil support for call site entries |
| 3 |
* (DW_TAG_call_site / DW_AT_call_return_pc). |
| 4 |
* |
| 5 |
* Instructions for regenerating binaries (on Darwin/x86_64): |
| 6 |
* |
| 7 |
* 1. Copy the source to a top-level directory to work around having absolute |
| 8 |
* paths in the symtab's OSO entries. |
| 9 |
* |
| 10 |
* mkdir -p /Inputs/ && cp call-site-entry.c /Inputs && cd /Inputs |
| 11 |
* |
| 12 |
* 2. Compile with call site info enabled. |
| 13 |
* |
| 14 |
* clang -g -O1 -Xclang -disable-llvm-passes call-site-entry.c -c -o call-site-entry.macho.x86_64.o |
| 15 |
* clang call-site-entry.macho.x86_64.o -o call-site-entry.macho.x86_64 |
| 16 |
* |
| 17 |
* 3. Copy the binaries back into the repo's Inputs directory. You'll need |
| 18 |
* -oso-prepend-path=%p to link. |
| 19 |
*/ |
| 20 |
|
| 21 |
__attribute__((optnone)) int f() {} |
| 22 |
|
| 23 |
int main() { |
| 24 |
f(); |
| 25 |
} |