char *args[] = {"gdb","test/a.out",(char *) 0 };
if (execvp("gdb",args)==-1)
{
printf("execv failed\n");
return -1;
}
//return 0; //this was added as a test
//printf("TEST!!!!!!!!!!!!!!!!!!!!!\n\n\n\n\n\n\n\n\n\n"); /*When this line is uncommented I do not see this show up in the terminal*/
fprintf(stdin,"%s","run");
There has to be some way that run additional commands to gdb. Any suggestions?
This post has been edited by unreal_origin: 26 March 2011 - 02:50 PM

New Topic/Question
Reply



MultiQuote




|