This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Pipe question


> Date: Wed, 4 Dec 2002 14:36:36 GMT
> From: a2782@dis.ulpgc.es
> 
>         system(strcat(\"gdb --quiet -f \",executable));

I hope this is not your actual code: you cannot strcat onto a
constant string.  It's a bug.

> But when I close the program, I only write \"quit\\n\" to togdb[1]. This 
> causes that the program doesn\'t end properly (GDB, which is the child 
> process, ends well). I have to go and type \"kill\" in a console. Could 
> anybody tell me what instructions I have to put in the end of the 
> program in order to finish it succesfully (without kill)?

When you give GDB the `quit' command, it asks whether to kill the
program being debugged; you need to respond with "yes".  So something
like "quit\nyes\n" should do the trick (but I didn't actually try
this, so I might miss something).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]