Re: Regression for --batch [Re: [RFC] Make python/lib/gdb and submodules proper Python modules]

Jan Kratochvil
2012-09-14T06:16:13Z

On Fri, 14 Sep 2012 07:59:46 +0200, Khoo Yit Phang wrote:
> Is ./gdb from a GDB build directory? If so, the error is expected; you'd
> need to run with -data-directory build-directory/gdb/data-directory, since
> much of the Python initialization has been moved into
> data-directory/python/gdb/__init__.py, and the old __init__.py is
> incompatible.

In such case there is a need to update gdb/contrib/cc-with-tweaks.sh .

runtest CC_FOR_TARGET=/bin/sh\ $PWD/../contrib/cc-with-tweaks.sh\ -i\ gcc gdb.base/display.exp
[...]
Running ./gdb.base/display.exp ...
gdb compile failed, Python Exception <type 'exceptions.NameError'> name 'os' is not defined:
warning: Could not load the Python gdb module from `/usr/share/gdb/python'.
warning: Limited Python support is available from the _gdb module.
=== gdb Summary ===
# of untested testcases 1

Regards,
Jan