public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Migrate THIS->__retvalue to STAP_RETVALUE in tapset
@ 2018-08-22  9:08 Zexuan Luo
  2018-08-28 19:34 ` Frank Ch. Eigler
  0 siblings, 1 reply; 2+ messages in thread
From: Zexuan Luo @ 2018-08-22  9:08 UTC (permalink / raw)
  To: systemtap

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(&regs->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(&regs->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) {

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Migrate THIS->__retvalue to STAP_RETVALUE in tapset
  2018-08-22  9:08 [PATCH] Migrate THIS->__retvalue to STAP_RETVALUE in tapset Zexuan Luo
@ 2018-08-28 19:34 ` Frank Ch. Eigler
  0 siblings, 0 replies; 2+ messages in thread
From: Frank Ch. Eigler @ 2018-08-28 19:34 UTC (permalink / raw)
  To: Zexuan Luo; +Cc: systemtap

Zexuan Luo <spacewanderlzx@gmail.com> writes:

> Some tapset functions (without /* unmangled */ mark) still use
> old-style 'THIS->'
> syntax. Let's migrate them to the new style.

Merged, thanks.  Next time, please try to use a mailer that doesn't
word-wrap, making manual patching necessary.

- FChe

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-08-28 19:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-22  9:08 [PATCH] Migrate THIS->__retvalue to STAP_RETVALUE in tapset Zexuan Luo
2018-08-28 19:34 ` Frank Ch. Eigler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).