This is the mail archive of the
gdb@sourceware.cygnus.com
mailing list for the GDB project.
Re: varargs in define'd functions?
- To: Kevin Hilman <khilman at equator dot com>
- Subject: Re: varargs in define'd functions?
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Sat, 12 Feb 2000 17:03:56 +1100
- CC: gdb at sourceware dot cygnus dot com
- Organization: Cygnus Solutions
- References: <r2ya9wo4jp.fsf@bobdog.equator.com>
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