Problems with install the GDB command file on mac's eclipse - gdb

I am using a Mac and I have installed the GDB. But I have some troubles with install the GDB command file. I have code signed in and typed in the "echo "set startup-with-shell off" >> ~/.gdbinit " on terminal but I cannot find the command file on my MacBook and eventually causing the debugging unsuccessful. Therefore, how can I install the gdb command file or where to find the gdb command file on Mac? Thanks!

Related

C++ Why is MSYS2 MINGW UCRT x64 gdb command not found

So I tried to check Mingw-w64 tools are correctly installed and gcc, g++ were correctly installed but gdb wasn't. I'm planning to usE Visual studio code in windows 10.
In the https://code.visualstudio.com/docs/cpp/config-mingw#_run-helloworldcpp, it said to match PATH entry but when I went to C:\msys64\mingw64\bin directory, the file was empty. Did I miss something or how do I know the correct path to put in the environment variable?
I tried C:\msys64\mingw64\bin as both user variable & system variable path but it won't work. and it said command not found.
This is what it said.
$ gdb --version
bash: gdb: command not found
Try installing GDB by running this in your Bash shell:
pacman -S $MINGW_PACKAGE_PREFIX-gdb

Can't run code on geany. Cannot execute build command

I installed geany on Fedora.
It compiles and builds my c++ code but it can't run the code.
"Cannot execute build command "xterm -e "/bin/sh /tmp/geany_run_script_BJ09E0.sh"": No such file or directory. Check the Terminal setting in Preferences"
I'm new on Linux and i don't know how to properly set terminal settings.
Depending on your spin, bring different Console Emulators.
For example, Fedora with KDE comes with konsole terminal emulator.
To use konsole with Geany, configure Edit - Preferences - Tools ->
Terminal: konsole -e "/bin/sh %c"
But, if you still want to use the xterm emulator (lighter and faster), you can install it from the repository, leaving Geany with the default configuration.
sudo dnf install xterm

GDB Version error on Eclipse CDT in Ubuntu 16.04

I installed Eclipse Oxygen CDT on Ubuntu 16.04. I am using the default gdb installed.
When I try to launch the debugger in eclipse, I get the following error:
Error with command: gdb -version
I suspected that this could be because eclipse was unable to find the gdb program, so i mentioned the whole path of the gdb program in the "Preferences =>C/C++ => GDB" options.
Still the error persists. Can anybody tell me how I can fix this error? Thanks in advance for your help.
check gdb version from c:\MINGW\bin\gdb32.exe "I have this version"
then got Eclips >> Preferences >> C/C++ >> GDB
then in GDB path "First block" click browse then insert the GDB path
Done ^-^

Sqlite3 command not recognized in command prompt (Python2.7)

im fairly new to sqlite. I ran the 'sqlite3' command in command prompt and the command was not recognized.
I cant find the sqlite3.exe in my python27 installation (so i cant add it to paths)
I also tried adding a path to the sqlite dll which did not work (Windows Command prompt shell for sqlite3).
How can i get this command to work?
The complete solution is to install the 'sqlite-tools' and the 'sqlite-dlls' from the precompiled windows binaries at this link:
http://sqlite.org/download.html

Netbeans "Resolve missing debugger command" C++

Whenever I try to debug any program (i.e. a welcome message), I get this prompt. Any ideas how to run the debugger for C++ program?
I am using Macbook Pro OS X El Capitan (10.11.3)
For Mac OSX 10.5 and above,
Install Homebrew (if you don't have it already)
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Install GDB
brew install gdb
Go to https://sourceware.org/gdb/wiki/BuildingOnDarwin and follow the instructions to code sign the gdb binary.
If you're on Sierra, run the following command in your terminal
echo "set startup-with-shell off" >> ~/.gdbinit
Finally, run the following comamnd in your terminal
which gdb
Copy the output path from that command, (mine was /usr/local/bin/gdb) into the Debugger Command box in Netbeans and start debugging!
On Linux systems derived from debian, you have to install gdb
sudo apt-get install gdb
Then in debbuger command type
/usr/bin/gdb
More information of gdb can be found in GDB: The GNU Project Debugger
Make sure gdb is installed in your machine. you can do this by following
C:\cygwin64>setup-x86_64.exe -q -P gdb
after this, select gdb as a debugger in netbeans
gdb location
Use Synaptic to install gdb. This debugger is required for Netbeans.
On a Mac, I installed HomeBrew first, then followed this exactly on the Sierra OS. Worked perfectly. After Homebrew is installed, you have to create then sign your gdb certificate. Then select it in your IDE debugger section.
The instructions show how to select gdb in Eclipse, but I got it working in NetBeans by pushing the debugger button and typing in the file path in the popup (as mentioned in this document).
https://www.ics.uci.edu/~pattis/common/handouts/macmingweclipse/allexperimental/mac-gdb-install.html