blob: 4ff8216164b267a5e409b71e8a9a958e3b64f6a0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#include "sdt.h"
struct foo
{
const int i;
const long j;
};
typedef struct foo fooer;
static int
bar (const int i, const long j)
{
return i * j;
}
// Because of PR10726 we don't want to get this function inlined.
// We do need -O2 to get the const_value encodings in dwarf.
static __attribute__((__noinline__)) int
func (int (*f) ())
{
const fooer baz = { .i = 2, .j = 21 };
STAP_PROBE (test, constvalues);
return f(baz.i, baz.j);
}
int
main (int argc, char *argv[], char *envp[])
{
return func (&bar) - 42;
}
|