Re: [rfa][testsuite] Consolidade Python test functions in lib/gdb.exp.

Tom Tromey
2009-04-20T17:13:23Z

>>>>> "Thiago" == Thiago Jung Bauermann <bauerman@br.ibm.com> writes:

Thiago> This is a cleanup on the testcases in gdb.python. Currently,
Thiago> they define the same test functions in each .exp. I put them
Thiago> in lib/gdb.exp instead.

It looks like the GDB style is to put specific support functions into
a new file, e.g., "mi-support.exp". So perhaps we should add
"python-support.exp"... WDYT?

Thiago> +# Return 1 if Python scripting is supported in GDB, 0 if not.
Thiago> +proc python_supported { } {
Thiago> + global gdb_prompt

I think this proc should do the test only once per runtest invocation,
and just return a cached result in subsequent calls.

Otherwise this looks reasonable to me.

Tom