This is the mail archive of the gdb@sourceware.org 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]
Other format: [Raw text]

Re: varargs in TUI defined functions ?


>>>>> "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


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