This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: tcp_connects script redux
- From: Martin Hunt <hunt at redhat dot com>
- To: Hien Nguyen <hien at us dot ibm dot com>
- Cc: SystemTAP <systemtap at sources dot redhat dot com>
- Date: Fri, 09 Sep 2005 11:09:40 -0700
- Subject: Re: tcp_connects script redux
- Organization: Red Hat Inc.
- References: <4321C39E.9050608@us.ibm.com>
On Fri, 2005-09-09 at 10:17 -0700, Hien Nguyen wrote:
> Here's a more completed version of tcp_connects script. This version has
> been tested with RHEL4 i386 and FC4 i386. The output would look like this
Very nice.
>
> function _get_eax () %{
> if (CONTEXT && CONTEXT->regs)
> THIS->__retvalue = CONTEXT->regs->eax;
> else
> THIS->__retvalue = -1;
> %}
>
>
> function get_eax() {
> return _get_eax() + 0
> }
>
This second function is no longer necessary. You just declare the first
to return a long.
function get_eax:long () %{
...
%}
BTW on x86_64, you need to return CONTEXT->regs->rax
Of course that is all just a workaround.
Martin