Gdb Hangup Detected On Fd 0 Error Detected On Stdin
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business run gdb from shell script Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation gdb bash Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just gdb pipe like you, helping each other. Join them; it only takes a minute: Sign up Invoke gdb to automatically pass arguments to the program being debugged up vote 38 down vote favorite 21 I'd like to write a script gdb script that (under certain conditions) will execute gdb and automatically run some program X with some set of arguments Y. Once the program has finished executing the user should remain at gdb's prompt until s/he explicitly exits it. One way to do this would be to have the script output the run command plus arguments Y to some file F and then have the script invoke gdb like this: gdb X < F But is there
Gdb Arguments Command Line
a way to do this without introducing a temporary file? Thanks. shell gdb share|improve this question edited Oct 22 '10 at 18:30 Nathan Fellman 46.5k62191270 asked Nov 26 '08 at 20:54 user41162 193124 add a comment| 8 Answers 8 active oldest votes up vote 23 down vote accepted If you want to run some commands through GDB and then have it exit or run to completion, just do echo commands | gdb X If you want to leave it at the command prompt after running those commands, you can do (echo commands; cat) | gdb X This results in echoing the commands to GDB, and then you type into the cat process, which copies its stdin to stdout, which is piped into GDB. share|improve this answer answered Nov 26 '08 at 20:59 Adam Rosenfield 242k66373493 1 (echo "run params"; cat) | gdb X; # worked a treat, many thanks! –Ian Vaughan Sep 29 '10 at 12:58 2 Note that you lose the shell interactivity if you do that (all the readline editing features, history, etc.). –ijw Nov 4 '10 at 20:31 Just noticed that up/down doesn't work.. not an acceptable solution :( –Nils Nov 6 '10 at 10:47 1 @ijw, @Nils: You are correct. See mike v's answer (stackoverflow.com/questions/322110/…) for a better solution. –Adam Rosenfield Nov 6 '10
error detected on stdin From: Vikash Jain
♦ ♦ | Report Content as Inappropriate ♦ ♦ Exception condition detected on fd 0 error detected on stdin Howdy, I am trying to debug my program with MinGW GDB version 7.1 and I keep getting this error. After this error appears, the debug session hangs and pretty much dies. What does this error mean? It seems to happen spontaneously. NOTE: Please keep CC to my other e-mail account. I am using my work account, and the weekend is approaching. I would like to be able to follow up on this at home. Thankies ^^ -San Saeteurn ________________________________ San Saeteurn Software Engineer, Switching and Routing Solutions Engineering Grass Valley, Inc. Tel: (1) 530 478 3571 Fax: (1) 530 478 4020 Cell: (1) 530 370 7294 E-mail: [hidden email] Mail: Grass Valley 400 Providence Mine Road Nevada City, CA, 95959 USA ------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing http://p.sf.net/sfu/novell-sfdev2dev_______________________________________________ MinGW-users mailing list [hidden email] This list observes the Etiquette found at http://www.mingw.org/Mailing_Lists. We ask that you be polite and do the same. Disregard for the list etiquette may cause your account to be moderated. _______________________________________________ You may change your MinGW Account Options or unsubscribe at: https://lists.sourceforge.net/lists/listinfo/mingw-users Tatsh Reply | Threaded Open this post in threaded view ♦ ♦ | Report Content as Inappropriate ♦ ♦ Re: Exception condition detected on fd 0 error detected on stdin There are no real file descriptors on Windows. And there certainly isn't file descriptor 0 available for you to access. It might help to show some code. Saeteurn San wrote: > Howdy, > > > > I am trying to debug my program with MinGW GDB version 7.1 and I keep > getting this error. > > After this error appears, the debug session hangs and pretty much dies. > > > What does this error mean? It seems to happen spontaneously. > > > > NOTE: Please keep CC to my other e-mail account. I am using my wor