This is the mail archive of the gdb-patches@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: Regression for --batch [Re: [RFC] Make python/lib/gdb and submodules proper Python modules]


Hi Jan,

On Sep 14, 2012, at 1:47 AM, Jan Kratochvil wrote:

> Hi Yit,
> 
> On Thu, 13 Sep 2012 23:51:08 +0200, Khoo Yit Phang wrote:
>> Thanks, I've checked in the patch.
> 
> $ ./gdb --batch
> 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.

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.

Yit
September 14, 2012


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