Debian Codegraph @

testsuite/systemtap.printf/pretty-char.stp

raw
1 %{
2 /* I'm not sure of a good way to find the path to the testsuite header,
3 * used in the @cast as @1, so it's just duped here. */
4 struct pretty_chars { char a, b, c, d, e; };
5 %}
6
7 function get_chars_pointer:long() %{
8 static struct pretty_chars chars = { 'A', 0, '\b', 236, 'z' };
9 STAP_RETVALUE = (intptr_t) &chars;
10 %}
11
12 probe begin {
13 chars = get_chars_pointer();
14 println(@cast(chars, "struct pretty_chars", @1)$);
15 exit();
16 }