comp.lang.ada
 help / color / mirror / Atom feed
From: Rick Newbie <nuttin@nuttn.nowhere>
Subject: Ada Community and GDB/Python problems
Date: Thu, 6 Feb 2020 11:49:40 -0800
Date: 2020-02-06T11:49:40-08:00	[thread overview]
Message-ID: <o5__F.230163$Zw7.160063@fx34.iad> (raw)

Hi all,

I'm trying to get going with Ada community edition. So far so good but I 
had major problems with Python. I always get error messages when trying 
to debug, messages that show that the wrong number of parameters are 
provided to Python calls. It is as if the community pack contains the 
wrong version of Python.
For instance I compiled my hello world program with debug info etc, then 
tried to start gdb from the commandline. At first it tells me it can't 
find the pyton libraries. Then I follow the suggestions and supply the 
python path like so:

gdb --data-directory=D:\GNAT\2019\share\gdb-8.3

and I get a ton of errors:


Traceback (most recent call last):
   File "D:\GNAT\2019\share\gdb-8.3/python\gdb\__init__.py", line 143, 
in auto_load_packages
     __import__(modname)
   File "D:\GNAT\2019\share\gdb-8.3/python\gdb\command\explore.py", line 
746, in <module>
     Explorer.init_env()
   File "D:\GNAT\2019\share\gdb-8.3/python\gdb\command\explore.py", line 
135, in init_env
     gdb.TYPE_CODE_RVALUE_REF : ReferenceExplorer,
AttributeError: 'module' object has no attribute 'TYPE_CODE_RVALUE_REF'

Traceback (most recent call last):
   File "D:\GNAT\2019\share\gdb-8.3/python\gdb\__init__.py", line 143, 
in auto_load_packages
     __import__(modname)
   File 
"D:\GNAT\2019\share\gdb-8.3/python\gdb\command\frame_filters.py", line 
21, in <module>
     import copy
   File "D:\GNAT\2019\share\gdb-8.3\python-2.7.16\lib\copy.py", line 52, 
in <module>
     import weakref
   File "D:\GNAT\2019\share\gdb-8.3\python-2.7.16\lib\weakref.py", line 21
     ReferenceType),
                   ^
SyntaxError: invalid syntax

Traceback (most recent call last):
   File "D:\GNAT\2019\share\gdb-8.3/python\gdb\__init__.py", line 143, 
in auto_load_packages
     __import__(modname)
   File 
"D:\GNAT\2019\share\gdb-8.3/python\gdb\command\pretty_printers.py", line 
19, in <module>
     import copy
   File "D:\GNAT\2019\share\gdb-8.3\python-2.7.16\lib\copy.py", line 52, 
in <module>
     import weakref
   File "D:\GNAT\2019\share\gdb-8.3\python-2.7.16\lib\weakref.py", line 21
     ReferenceType),
                   ^
SyntaxError: invalid syntax

Traceback (most recent call last):
   File "D:\GNAT\2019\share\gdb-8.3/python\gdb\__init__.py", line 143, 
in auto_load_packages
     __import__(modname)
   File 
"D:\GNAT\2019\share\gdb-8.3/python\gdb\command\type_printers.py", line 
17, in <module>
     import copy
   File "D:\GNAT\2019\share\gdb-8.3\python-2.7.16\lib\copy.py", line 52, 
in <module>
     import weakref
   File "D:\GNAT\2019\share\gdb-8.3\python-2.7.16\lib\weakref.py", line 21
     ReferenceType),
                   ^
SyntaxError: invalid syntax

GNU gdb (GDB) 7.8
Copyright (C) 2014 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 "x86_64-w64-mingw32".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
(gdb)



Again this is just the install package from Adacore. I am using Windows 
10 and I must admit that I don't have experience with gcc or gdb. To my 
knowledge there was never another python installation on my machine, not 
unless some other application installed it silently but I checked and 
can't find anything Python related, so this should be the only one 
(2.7.16). I just have no idea how to fix this since I would assume that 
the pack from Adacore should run out of the box.

Any help is appreciated.


             reply	other threads:[~2020-02-06 19:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-06 19:49 Rick Newbie [this message]
2020-02-07 22:39 ` Ada Community and GDB/Python problems joakimds
2020-02-08  6:19   ` J-P. Rosen
2020-02-09 17:28     ` Rick Newbie
2020-02-08 10:27   ` Dmitry A. Kazakov
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox