It just hangs like in an infinite loop. Any suggestions?
You don't know whether it's waiting for something or is actually in infinite loop.
Your first steps should be:
- Run
topand see whether GDB process is consuming CPU or is increasing in memory and - Run
strace gdbto see which (if any) system calls it is performing.
With that info, further guesses could be made. It may also help to know which system you are on, and which version of GDB you have installed.
Update:
Running strace gdb results in a infinite loop outputting: readlink(“/usr/bin/python”, “python”, 4096) = 6
So you have /usr/bin/python which is a symlink to itself.
Yes, that would cause all kinds of problems (including not being able to actually run python from command line).
Remove that symlink (/usr/bin/python is supposed to point to python2 or python3).
installing gdb version 14
Uninstalled GDB; apt had an absolute meltdown
amd Rocm installation problem
Seer – a GUI front end to GDB for Linux
Videos
Im currently on ubuntu version 23.04 and I have gdb version 13.1 and i need to upgrade to 14.2 however whenever I do apt update gdb doesnt update and i tried to manually install gdb 14.2 but there are no clear instructions on how to go about it. any help would be appreciated
(ps. im new to linux)
As far as I can see, there are two options:
- Install an old version (as pointed out by Chaos)
- Install gdb-multiarch, which actually worked for me.
I had the same question, and googled some more. It seems that with modern GDB you no longer need a GDB for your specific architecture. Just use GDB.
(seems to work on my older 16.04 workstation as well. I've been typing arm-none-eabi-gdb all those years, while just "gdb" would've worked just as well! .....)