Re: Python enabled GDB (Archer) -Help

2009-05-20 Thread Sreejith
2009/5/19 Jason Tishler ja...@tishler.net:
 Sreejith,

 On Tue, May 19, 2009 at 04:04:06PM +0530, Sreejith wrote:
 The observation is that python static library (in case of linux-
 libpython2.5.so in /usr/lib/) is missing in cygwin and that is exactly
 what gcc is complaining when building gdb (please refer to the config
 log in my previous post). I dont know whether this is handled
 differently in cygwin. Please give your suggestions.

 Can you get configure to add -L/usr/lib/python2.5/config when linking?
 I think the following should work:

    $ LDFLAGS=-L/usr/lib/python2.5/config configure ...

 Does this solve the problem?


Thanks a lot. It solved the issue partially. I could enable the python
scripting in GDB. But still the STL containers are not printing data.
It worked straight in debian. The following log (Cygwin) explains
more:

(gdb) python print 10
10
Python is
enabled
(gdb) print myList
$1 = {_List_baseint, std::allocatorint  = {
_M_impl = {allocatorstd::_List_nodeint  = {new_allocatorstd::_List_n
odeint  = {No data fields}, No data fields}, _M_node = {
_M_next = 0x681838, _M_prev = 0x6818c8}}}, No data fields}
 libstdc++ printer is not used
(gdb) python print myList
Traceback (most recent call last):
  File string, line 1, in module
NameError: name 'myList' is not defined
Error while executing Python code.
   I will ask in archer list.
(gdb)

But I dont know whether it has some thing to do with Cygwin. I will
ask in archer mailing list too. Mean while if anyone has some clue,
please share.

-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/



Re: Python enabled GDB (Archer) -Help

2009-05-19 Thread Sreejith
2009/5/19 Larry Hall (Cygwin) reply-to-list-only...@cygwin.com:
 On 05/16/2009, Sreejith wrote:

 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?

 http://cygwin.com/cgi-bin2/package-grep.cgi?grep=Python.h

 So, do you have Python installed?

Yes. I have python 2.5 installed using Setup.exe. In debian I had the
same issue with python enabled GDB. But I could solve it by installing
the python2.5-dev development packages. I had a look at the files
included in cygwin package (you mentioned) and the files in
python2.5-dev deb package:
http://packages.debian.org/lenny/i386/python2.5-dev/filelist

The observation is that python static library (in case of linux-
libpython2.5.so in /usr/lib/) is missing in cygwin and that is exactly
what gcc is complaining when building gdb (please refer to the config
log in my previous post). I dont know whether this is handled
differently in cygwin. Please give your suggestions.

-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/



Re: Python enabled GDB (Archer) -Help

2009-05-16 Thread Sreejith
2009/5/16 Sreejith sreejithsmadha...@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   listint myList;
 8
 9   for(int i=0; i10; 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_baseint, std::allocatorint  = {
     _M_impl = {allocatorstd::_List_nodeint  = 
 {new_allocatorstd::_List_n
 odeint  = {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 -O2conftest.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 -O2conftest.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 -O2conftest.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/