gdb - How to automatically run the executable? -


I want to run gdb immediately executable, as I typed "run" (Motivation: I hate typing "run").

One way to pip gdb like this is:

  Run $ echo. Gdb myApp  

But the problem with this approach is that you lose interactivity with gdb , e.g. If a breakpoint triggers or myApp crashes, gdb ends this method has been discussed.

- Help By looking at the options, I do not see any way to do this, but I'm probably missing something.

  gdb-x run ./a.out  
< P> If you need to give a reason for a.out :

  gdb -ex runs --args ./a.out arg1 arg2 .... ..  

Edit: This does not work on Mac OSX. Available after

-ex flag GDB-6.4 (released in 2005), but OSX uses GDB's Apple fork , And the latest XCode for Leopard is GDB 6.3.50-20050815 (apple version GDB-967) , so you are out of luck.

Building on the current GDB-7.0.1 Release is a possible solution, just be sure to read.


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -