This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug tapsets/20136] Use the @const() operator across the tapset scripts.
- From: "mcermak at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sourceware dot org
- Date: Tue, 24 May 2016 11:30:13 +0000
- Subject: [Bug tapsets/20136] Use the @const() operator across the tapset scripts.
- Auto-submitted: auto-generated
- References: <bug-20136-6586 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=20136
--- Comment #2 from Martin Cermak <mcermak at redhat dot com> ---
(In reply to Martin Cermak from comment #0)
> =======
> diff --git a/tapset/macros.stpm b/tapset/macros.stpm
> index fc86cff..6f8cfec 100644
> --- a/tapset/macros.stpm
> +++ b/tapset/macros.stpm
> @@ -1,7 +1,7 @@
> // Return MAXSTRINGLEN
> @define MAXSTRINGLEN
> %(
> - %{ /* pure */ /* unprivileged */ MAXSTRINGLEN %}
> + @const("MAXSTRINGLEN")
> %)
>
> @define __compat_task
> =======
>
> But such update makes semok/autocast07.stp unhappy
The key thing appears to be the pretty printer included in autocast07.stp:
=======
# stap -p4 -e 'probe oneshot{ sun = & @cast(0, "sockaddr_un", "<sys/un.h>")
println(sun->sun_path) }'
/root/.systemtap/cache/92/stap_920b3af0d4444bef6872b0b5f686f9db_2347.ko
# stap -p4 -e 'probe oneshot{ sun = & @cast(0, "sockaddr_un", "<sys/un.h>")
println(sun->sun_path$) }'
semantic error: while processing function user_string
semantic error: unexpected @const: operator '@const' at
/usr/local/share/systemtap/tapset/macros.stpm:4:2
source: @const("MAXSTRINGLEN")
^
in expansion of macro: operator '@MAXSTRINGLEN' at
/usr/local/share/systemtap/tapset/uconversions.stp:44:29
source: return user_string_n(addr, @MAXSTRINGLEN)
^
Pass 2: analysis failed. [man error::pass2]
#
=======
Hmm, pretty surprising relationship between the pretty printer and seemingly
unrelated @const() operator!
--
You are receiving this mail because:
You are the assignee for the bug.