I have installed gdb 7.10 under Ubuntu 14.04 by compiling from the source as detailed in this answer (with the only exception that I copied the executable into /usr/bin). When I execute commands in gdb, I get the following error:
Python Exception <type 'exceptions.NameError'> Installation error: gdb.execute_unwinders function is missing:
What can I do to get rid of it?
What can I do to get rid of it?
GDB wants to install more than just the GDB binary. To make a complete installation, remove /usr/bin/gdb and do make install.
Related
I'm trying to use arm-none-eabi-gdb as the debugger for my stm32 project, but when I try to execute it, it return the following error:
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ModuleNotFoundError: No module named 'encodings'
Current thread 0x00007f75639ddc00 (most recent call first):
Aborted (core dumped)
I look online and find this solution, but when I enter export PYTHONHOME=/usr/local it come out annother error message that I cannot find any solution:
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ModuleNotFoundError: No module named 'encodings'
Current thread 0x00007fcc24680c00 (most recent call first):
Aborted (core dumped)
I've check that my python and python3 work ok, Is there anything I should check for?
Thank you ~
The arm gcc_tool_chain version I'm using is 11.2-2022.02 for x86_64 Linux hosted which I download from the official website. And After downloading it, I just unzip it and add the toolchain directory into $PATH. I did not compile or install and I'm not sure if I should do any of those since I download the binary version(gcc-arm-11.2-2022.02-x86_64-arm-none-eabi.tar.xz) and the arm-none-eabi-g++ compiler works perpectly.
It is weird that on my machine with python3.10 and kubuntu 22.10 it is working with gdb from 10.3. But 11.3 is complaining
I think you truncated the message you received! I had same problem.
arm-none-eabi-gdb looks for specific python version that explained at end of the message! Mine was 3.8 whereas I already had 3.10. so I decided to install python 3.8 in parallel with my installed version. After some search I found a way:
sudo add-apt-repository ppa:deadsnakes/ppa
apt update
sudo apt install python3.8
You can find more information in this site.
When debugging a C++ project in Eclipse I get the following error:
'Launching Project.exe' has encountered a problem.
Could not determine GDB version using command:
D:\Programme\MinGW\bin\gdb.exe --version
Some Posts on Stackoverflow suggested linking MinGW\bin\gdb.exe directly in the C++/GDB settings solves the problem, but as you can see it didn't for me.
Any suggestions?
Edit: Tried mingw-get.exe install gdb in MinGW\bin, got an error that said the latest version is already installed.
I found the solution for my --version error:
When I ran $ gdb --version from the MinGW shell I got an error message saying zlib1.dll was not found.
I copied zlib1.dll from the \Debug folder of my C++ project into MinGW\bin and now it's working.
If gdb --version works in cmd, then try change path in eclipse - run - debug configurations - debugger - GDB debugger to C:\MinGW\gdb64\bin\gdb.exe, the default one in C:\MinGW\bin could be 32-bit.
I am following a C++ Eclipse tutorial and learning how to debug. I filled in the sections of the Debug Configurations window as it said in the tutorial and clicked 'Debug'.
I get the error "Error while launching command: gdb --version". I found a similar post here: Mac C++/eclipse cannot debug: Error while launching command: gdb --version
and there the user said he already had GDB installed. I tried to install it using the instructions at this link: http://www.patosai.com/blog/post/installing-gdb-on-mac-os-x-yosemite
and when I entered the first command "brew install gdb" I got the following in my terminal:
Error: No available formula for gdb
==> Searching formulae...
cgdb gdbm pgdbf
==> Searching taps...
homebrew/dupes/gdb Caskroom/cask/macgdbp
I think there may have been a problem there because when I entered the final command of the "Installing GDB on Mac OS X Yosemite" tutorial above: "codesign -s gdb-cert /usr/local/bin/gdb" it said "no such file or directory.
Can anyone see where I've made an error please? Thanks :)
Seems like brew was unable to find gdb in its default search location.
The line 'Searching Taps...' means that brew is searching other git repositories for the software you are trying to install.
In this case it found two repositories that contain something useful.
homebrew/dupes/gdb and Caskroom/cask/macgdbp
homebrew/dupes/gdb would be the one you need as this is the gdb version apple used for xcode before it switched to other tools.
This site has a really good tutorial for installing gdb using either brew or macports http://ntraft.com/installing-gdb-on-os-x-mavericks/
I used this command to try to install gdb.
brew install homebrew/dupes/gdb
this should produce the following output
Installing gdb from homebrew/homebrew-dupes
Downloading http://ftpmirror.gnu.org/gdb/gdb-7.9.1.tar.xz
./configure --prefix=/usr/local/Cellar/gdb/7.9.1 --with-system-readline --with-lzma --with-python=/usr
make
config.status: creating Makefile
config.status: creating testsuite/Makefile
config.status: creating config.h
config.status: executing default commands**strong text**
make: *** [all] Error 2
The installation process failed on my macbook. This was most likely due to me using the os x 10.11 beta. But it might also be because the gdb version on brew does not work well with yosemite and higher. If this is the case you could try the macports install using the above tutorial.
I can't currently use macports because my os x version. but if you are using yosemite it should be fine.
I have a C++ project imported to Eclipse CDT. I can build and run the project using Makefile and argument settings. However, when I tried to add a debug point and run "debug as local c/c++ application", it throws me an error of "Launching projectName" has encountered a problem. Error with command gdb --version
By expanding the Details, it gives: Error with command: gdb --version
Cannot run program "gdb": Unknown reason
I installed the gdb by Macports before. If I enter command ggdb it returns the version info. If I type which ggdb, it gives /opt/local/bin/ggdb. I tried to add "PATH" to debug configuration -> environment variables and give the path value to it, but it did not work. How should I set the path and link the path please? And what should the variable name be.
The gdb version on my machine is GNU gdb (GDB) 7.7.1
Added: I looked up which ggdb and used the link James provided to change gdb debugger to browse to that path. But it did not work still.
Thanks.
It looks like Eclipse is using the default gdb that was on the system before you installed ggdb from macports. This link shows how to change the debugger settings, change it to ggdb which is the name Macport uses.
After installing ggdb from Macports you will have to sign it with a certificate so it will be allowed to control other processes, take a look at "Certifying GDB" here. After creating the certificate, make sure you select the correct name when signing:
$ codesign -s gdb-cert $(which ggdb) /// 'ggdb'
I've always worked around the debugger issue, but now it has gotten too annoying. I'm working on more complex programs and can't anywhere if I cant debug my programs. Has any one else been able to fix this issue in eclipse? It works for java, but not more my C++ plugin from minGW
Debbugger for C++ eclipse gives the following error. 'Launching program name' has encountered a problem. Error while launching command: gdb --version
Assuming you are using Windows and have MinGW installed, you only need to locate the gdb executable in the MinGW bin folder. This can be done on the "Main" tab in the "Debugger" configuration of Eclipse: