Re: function call argument count

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 23 May 2004 15:01:04 -0700
don fisher <dfisher@xxxxxxxxxxxxxx> wrote:

> Hello,
> 
> Is there a call that can be made from within a function to determine 
> how many arguments have been passed to it? I feel such a call would be 
> of great assistance when used in conjunction with variable length 
> argument lists. In the "old days", VMS pushed a parameter count as 
> part of the call frame. You could even determine which variables were 
> null, since they always did call by reference and null parameters were 
> indicated by a zero address.
> 
> Sorry if this is well known, or an invalid request for some reason.
> thanks
> don
> -- 
> -------------------------------------------------------------------
> |    Don Fisher				  dfisher@xxxxxxxxxxxxxx  |
> |    Steward Observatory		  			  |
> |    933 N. Cherry Ave.    		  VOICE: (520)621-7647	  |
> |    University of Arizona		  FAX:   (520)621-9843    |
> |    Tucson, AZ  85721                				  |
> -------------------------------------------------------------------
> 

hi, one idea: try to compare esp, a stack pointer(x86, i'm not sure how ir would be on other platforms). Sure, this works when you know the size of variable, and they should be same type...



Justinas.

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux