This is the mail archive of the
gdb@sourceware.cygnus.com
mailing list for the GDB project.
varargs in define'd functions?
- To: gdb at sourceware dot cygnus dot com
- Subject: varargs in define'd functions?
- From: Kevin Hilman <khilman at equator dot com>
- Date: 11 Jan 2000 10:18:34 -0800
- Organization: None to speak of.
- Reply-To: Kevin Hilman <khilman at equator dot com>
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