This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: varargs in TUI defined functions ?
- From: Tom Tromey <tromey at redhat dot com>
- To: "Martin Oberhuber" <Martin dot Oberhuber at gmx dot at>
- Cc: gdb at sourceware dot org
- Date: Tue, 08 Jun 2010 15:00:55 -0600
- Subject: Re: varargs in TUI defined functions ?
- References: <20100526083119.38220@gmx.net> <m3fx1eofaw.fsf@fleche.redhat.com> <20100528164217.79840@gmx.net>
- Reply-to: tromey at redhat dot com
>>>>> "Martin" == Martin Oberhuber <Martin.Oberhuber@gmx.at> writes:
Martin> many thanks for your answer!
No problem... and I'm sorry for the long delay in this response.
Tom> You can do it quite easily using Python.
Martin> Well I know Python but I don't really know how gdb makes use of
Martin> it, so I'm kinda lost with this suggestion... can you give any
Martin> more pointers or an example?
You can write a new command in Python, see the gdb.Command class in the
gdb documentation.
Martin> Also, what minimum version of gdb would I have to use for Python
Martin> to be available for doing this? My Linux distro seems not to be
Martin> fully up-to-date.
7.0.
Martin> At the moment, I'm most interested what kind of naming
Martin> convention for such a "varargs argument" the gdb community would
Martin> like best:
Martin> $argv (like in C main(), and related to $argc)
Martin> $args (like in C va_args)
Martin> $* (like in Shellscripts)
Martin> $arg* (mixture of $arg and *)
Martin> ... anything else?
I would say $argv, but really I would be ok with any of the first 3.
Tom