This adds the --debug-vars option to llvm-objdump, which prints locations (registers/memory) of source-level variables alongside the disassembly based on DWARF info. A vertical line is printed for each live-range, with a label at the top giving the variable name and location, and the position and length of the line indicating the program counter range in which it is valid. Differential revision: https://reviews.llvm.org/D70720
11 lines
118 B
C
11 lines
118 B
C
int foo(int a, int b, int c) {
|
|
int x = a + b;
|
|
int y = x + c;
|
|
return y;
|
|
}
|
|
|
|
int bar(int a) {
|
|
a++;
|
|
return a;
|
|
}
|