From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED.8dY8omnix++EB5/QBRk4Sw.user.gioia.aioe.org!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: GDB Problems with new install of GPS 2019 x86 64 Windows Date: Sun, 22 Dec 2019 11:44:47 +0000 Organization: Aioe.org NNTP Server Message-ID: References: <4e411af7-682b-4d46-9454-85b0f8c0b410@googlegroups.com> NNTP-Posting-Host: 8dY8omnix++EB5/QBRk4Sw.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: abuse@aioe.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (darwin) Cancel-Lock: sha1:bO0ibejdKCJVyG/E/4dMVoAI9q8= X-Notice: Filtered by postfilter v. 0.9.2 Xref: reader01.eternal-september.org comp.lang.ada:57755 Date: 2019-12-22T11:44:47+00:00 List-Id: William Thomas writes: > On Friday, December 20, 2019 at 10:55:15 AM UTC-5, William Thomas wrote: >> Running Windows 10. >> When trying to debug a simple Hello World main, I get this (three times). >> Tried running it as admin, maybe I have to install as admin? Or maybe its a Python GPS command thing? >> >> Any suggestions? >> >> >> C:\GNAT\2019\bin\gdb.exe: warning: Couldn't determine a path for the index cache directory. >> Traceback (most recent call last): >> File "c:\gnat\2019\share\gdb-8.3/python\gdb\__init__.py", line 143, in auto_load_packages >> __import__(modname) >> File "c:\gnat\2019\share\gdb-8.3/python\gdb\command\frame_filters.py", line 21, in >> import copy >> File "c:\gnat\2019\share\gdb-8.3\python-2.7.16\lib\copy.py", line 52, in >> import weakref >> File "c:\gnat\2019\share\gdb-8.3\python-2.7.16\lib\weakref.py", line 14, in >> from _weakref import ( >> ImportError: cannot import name _remove_dead_weakref > > OK, > > So I go into the file weakref.py and I comment out the following: > > from _weakref import ( > getweakrefcount, > getweakrefs, > ref, > proxy, > CallableProxyType, > ProxyType, > ReferenceType) #, > # _remove_dead_weakref) > > I just removed the "_remove_dead_weakref" (kind of ironic) from the > python import thingy and now it works. GDB fired up and I can finally > start to debug my Hello World program. I wonder whether you have python 3 installed? maybe running 3 with 2.7-related libraries causes trouble? (both 2.7.16 and 3.7.4 execute that import on its own just fine). No idea why GNAT CE includes so much gdb-related python; standard gdb (8.3) such as I run on Mac with FSF GCC 9.1.0 doesn't.