2

Does anybody know how so start gdb in emacs when the program requires command line arguments?

I am using this command to create my program

/home/cdim/Local/gcc-4.9.2/bin/gfortran -ffree-form -g ./utests/test_gdb.f -o test_gdb

1 Answer 1

3

Either start gdb (When M-x gdb prompts you for the debugger) with --args or just use the set args command of gdb in the *gud* emacs window (the GDB command window under Emacs).

Sign up to request clarification or add additional context in comments.

6 Comments

I am going to Tools then Debugger (GDB). Let's start without arguments. Without arguments my program displays help information. I click on the run button and nothing happens. I get Undefined command: "-exec-run". Try "help".
You have a GDB command window under Emacs. Find it, and type commands there.
I have a window gud-test_meidum.x
I type run gdb test_meidum.x, then get the window, I type run and I get Undefined command: "-exec-run". Try "help".
I was not using -i=mi. Putting it before the executable gets me to gdb and I can run the program using run in the window.
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.