This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[PATCH] Migrate THIS->__retvalue to STAP_RETVALUE in tapset
- From: Zexuan Luo <spacewanderlzx at gmail dot com>
- To: systemtap at sourceware dot org
- Date: Wed, 22 Aug 2018 17:07:56 +0800
- Subject: [PATCH] Migrate THIS->__retvalue to STAP_RETVALUE in tapset
Some tapset functions (without /* unmangled */ mark) still use
old-style 'THIS->'
syntax. Let's migrate them to the new style.
---
diff --git a/tapset/linux/aux_syscalls.stp b/tapset/linux/aux_syscalls.stp
index edf9b1757..f29a2fe4b 100644
--- a/tapset/linux/aux_syscalls.stp
+++ b/tapset/linux/aux_syscalls.stp
@@ -3975,9 +3975,9 @@ function _swapon_flags_str:string(flags:long)
#elif defined(__mips__)
unsigned long cp0 = kread(®s->cp0_status);
#if defined(CONFIG_CPU_R3000) || defined(CONFIG_CPU_TX39XX)
- THIS->__retvalue = ((cp0 & 0x08) == 8);
+ STAP_RETVALUE = ((cp0 & 0x08) == 8);
#else
- THIS->__retvalue = ((cp0 & 0x18) == 0x10);
+ STAP_RETVALUE = ((cp0 & 0x18) == 0x10);
#endif
#elif defined(__s390__) || defined(__s390x__)
unsigned long mask = kread(®s->psw.mask);
diff --git a/tapset/mips/registers.stp b/tapset/mips/registers.stp
index 723890ec0..23aa10d37 100644
--- a/tapset/mips/registers.stp
+++ b/tapset/mips/registers.stp
@@ -119,7 +119,7 @@ function _stp_register_regs() {
function probing_app_with_32bit_regs() %{ /* pure */
struct pt_regs *regs;
regs = (CONTEXT->user_mode_p ? CONTEXT->uregs : NULL );
- THIS->__retvalue = _stp_probing_app_with_32bit_regs(regs);
+ STAP_RETVALUE = _stp_probing_app_with_32bit_regs(regs);
%}
function _stp_get_register_by_offset:long (offset:long) %{ /* pure */
@@ -138,7 +138,7 @@ function _stp_get_register_by_offset:long
(offset:long) %{ /* pure */
return;
}
memcpy(&value, ((char *)regs) + STAP_ARG_offset, sizeof(value));
- THIS->__retvalue = value;
+ STAP_RETVALUE = value;
%}
function _stp_sign_extend32:long (value:long) {