This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug translator/9968] Share global variable between embedded C and script
- From: "fche at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sourceware dot org
- Date: Wed, 17 Jul 2013 17:34:33 +0000
- Subject: [Bug translator/9968] Share global variable between embedded C and script
- Auto-submitted: auto-generated
- References: <bug-9968-6586 at http dot sourceware dot org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=9968
Frank Ch. Eigler <fche at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |fche at redhat dot com
--- Comment #1 from Frank Ch. Eigler <fche at redhat dot com> ---
A possible way of expressing this would be embedded-c pragmas that
synthesize the right kind of locking magic, plus a temporary collection
of STAP_GLOBAL_* macros to get/set identified scalars/maps.
global var
global var2
global var3
probe begin {
var[2] = "hogi"
var3 = 5
foo()
println(var2["hogi"])
exit()
}
function foo () %{
/* pragma:read:var */ /* pragma:write:var2 */ /* pragma:read:var3 */
const char* value = STAP_GLOBAL_var_get_is(2);
STAP_GLOBAL_var2_set_si(value, STAP_GLOBAL_var3_get());
%}
--
You are receiving this mail because:
You are the assignee for the bug.