This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: tcp_connects script redux


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]