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]

varargs in define'd functions?


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.

Thanks.

-- 
Kevin Hilman               ---  Equator Technologies Inc.
khilman@equator.com        ---  Seattle, WA USA

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