Videos
download the most recent GDB from https://www.sourceware.org/gdb/download/
expand the gdb-7.12.1.tar.xz file:
tar xopf gdb-7.12.1.tar.xzcd gdb-7.12.1in terminal to open the gdb folderthen follow the instructions in the README file in the gdb folder, or simply follow the following steps:
./configure, wait for the terminalmakeand wait again (which can take some time)sudo make install
Now gdb is installed at /usr/local/bin/
Note that you might want to try/use LLDB (lldb) instead. This is now the default (don't know about 10.12, but on 10.13 it is installed, when you install the Xcode utilities). It even comes with a nice curses GUI, but otherwise a shell very similar to GDB.
No idea what MinGW Installation Manager is or why you were trying to use it when you are using msys2.
To install mingw64 gdb in msys2, you really just need to:
pacman -S mingw-w64-x86_64-gdb
You should probably run pacman -Syu twice before you run the above though.
As you can see, if you need other mingw64 builds of programs (toolchain programs or not), their package names would be prefixed with mingw-w64-x86_64-. There's also the package group mingw-w64-x86_64-toolchain which you can pacman -S --needed instead to get a somewhat full toolchain.
You may also want to use the urt64 toolchain instead. See this page for more details. (You can e.g. pacman -Ss gdb to find out what's the package name prefix for each of the variants.)
Note that to use any of the toolchain (or any non-msys2 builds of programs), you should use the corresponding "launcher" of shell/terminal instead of msys2.exe.
Check by restarting your PC, if it didn't work download the *.gdb file from its website (I guess it's a *.rar or some file), now update with MSYS and restart. It have solved for me, I guess it helps....