Python enabled GDB (Archer) -Help

Sreejith sreejithsmadhavan@gmail.com
Sat May 16 16:19:00 GMT 2009


2009/5/16 Sreejith <sreejithsmadhavan@gmail.com>
>
> Hi,
>           I could successfully install gdb-archer in cygwin as explained in link: http://tromey.com/blog/?p=494 , but not able to inspect STL container object. It looks like the python scripting is not enabled in newly installed gdb. The following log explains more:
>
> $ gdb a.exe
> GNU gdb (GDB) 6.8.50.20090106-cvs
> Copyright (C) 2009 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
> and "show warranty" for details.
> This GDB was configured as "i686-pc-cygwin".
> For bug reporting instructions, please see:
> <http://www.gnu.org/software/gdb/bugs/>...
> (gdb) l
> 1       #include <list>
> 2
> 3       using namespace std;
> 4
> 5       int main ()
> 6       {
> 7               list<int> myList;
> 8
> 9               for(int i=0; i<10; i++)
> 10              {
> (gdb) l
> 11                      myList.push_back(i);
> 12              }
> 13              return 0;
> 14      }
> (gdb) break 13
> Breakpoint 1 at 0x401139: file list.cpp, line 13.
> (gdb) run
> Starting program: /home/sreejith/archer/a.exe
> [New Thread 3132.0x9bc]
> [New Thread 3132.0x7b4]
>
> Breakpoint 1, main () at list.cpp:13
> 13              return 0;
> (gdb) print myList
> $1 = {<_List_base<int, std::allocator<int> >> = {
>     _M_impl = {<allocator<std::_List_node<int> >> = {<new_allocator<std::_List_n
> ode<int> >> = {<No data fields>}, <No data fields>}, _M_node = {
>         _M_next = 0x681850, _M_prev = 0x6818e0}}}, <No data fields>}
> (gdb)
>
> When I try 'python print 10' in gdb prompt I am getting error:
>
> (gdb) python print 90
> Python scripting is not supported in this copy of GDB.
>
> The archer installation went currectly and I have python installed in my cygwin. Please help me to resolve this issue.

I further investigated and found in config log that gdb build is not
detecting python in cygwin. The following log from config.log:

configure:11376: checking for python2.4
configure:11396: gcc -o conftest.exe -g -O2    conftest.c -lncurses
-lz -lm   -lpython2.4 >&5
conftest.c:49:30: python2.4/Python.h: No such file or directory
...
configure:11240: checking for python2.6
configure:11260: gcc -o conftest.exe -g -O2    conftest.c -lncurses
-lz -lm   -lpython2.6 >&5
conftest.c:49:30: python2.6/Python.h: No such file or directory
...
configure:11308: checking for python2.5
configure:11328: gcc -o conftest.exe -g -O2    conftest.c -lncurses
-lz -lm   -lpython2.5 >&5
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/ld:
cannot find -lpython2.5

'make all install' log gives:
checking whether to use python... auto
checking for python2.6... no
checking for python2.5... no
checking for python2.4... no

This is probably because python development packages (Equivalent to
python2.5-dev deb package) are not installed. Unfortunately it is not
available for cygwin. Is there any other way to solve this issue?

Thanks,
Sreejith

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list