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).
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).
Does installing GDB on a mac usually take a while? or is it only me?
How to properly install gdb on an apple machine
Have you tried macports?
More on reddit.com[Question] How can I install GDB? Searching it won’t install and [[BigBoss Recommended Tools]] depends on it (Unc0ver 11.3.1)
Installation of GDB on Mac (Mojave)
Videos
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! .....)