delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/05/16/12:19:48

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.4 required=5.0 tests=BAYES_00,J_CHICKENPOX_33,SARE_MSGID_LONG40,SPF_PASS
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
In-Reply-To: <41aa4e6c0905151405t9925f2byb698c817ee786075@mail.gmail.com>
References: <41aa4e6c0905151405t9925f2byb698c817ee786075 AT mail DOT gmail DOT com>
Date: Sat, 16 May 2009 21:49:25 +0530
Message-ID: <41aa4e6c0905160919l57f52d7dx9020fb3d5cae4014@mail.gmail.com>
Subject: Re: Python enabled GDB (Archer) -Help
From: Sreejith <sreejithsmadhavan AT gmail DOT com>
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

2009/5/16 Sreejith <sreejithsmadhavan AT gmail DOT com>
>
> Hi,
> =A0=A0=A0=A0=A0=A0=A0=A0=A0 I could successfully install gdb-archer in cy=
gwin as explained in link: http://tromey.com/blog/?p=3D494 , but not able t=
o inspect STL container object. It looks like the python scripting is not e=
nabled 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.h=
tml>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.=A0 Type "show copyi=
ng"
> 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=A0=A0=A0=A0=A0=A0 #include <list>
> 2
> 3=A0=A0=A0=A0=A0=A0 using namespace std;
> 4
> 5=A0=A0=A0=A0=A0=A0 int main ()
> 6=A0=A0=A0=A0=A0=A0 {
> 7=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 list<int> myList;
> 8
> 9=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 for(int i=3D0; i<10; i++)
> 10=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 {
> (gdb) l
> 11=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 myList.=
push_back(i);
> 12=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 }
> 13=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 return 0;
> 14=A0=A0=A0=A0=A0 }
> (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=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 return 0;
> (gdb) print myList
> $1 =3D {<_List_base<int, std::allocator<int> >> =3D {
> =A0=A0=A0 _M_impl =3D {<allocator<std::_List_node<int> >> =3D {<new_alloc=
ator<std::_List_n
> ode<int> >> =3D {<No data fields>}, <No data fields>}, _M_node =3D {
> =A0=A0=A0=A0=A0=A0=A0 _M_next =3D 0x681850, _M_prev =3D 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019