This is the mail archive of the gdb@sourceware.cygnus.com mailing list for the GDB project.


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

Re: varargs in define'd functions?


Kevin Hilman wrote:
> 
> using gdb's 'define' command to define a function/macro.  Is there a
> way to have these functions work with variable number of arguments.
> 
> For example, if I use $arg0 inside a define'd function, I have to give
> that function an argument.  What I'd like is some way for the function
> to work even when no argument is given (other than creating a separate
> function to handle no args).
> 
> On a related note, is there a way to _use_ environment variables in
> these functions?  I know of 'show environment' but then I can't seem
> to figure out how to use the result of the 'show environment' command.

Does anyone have answers to these questions?

	Andrew

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