Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Threads, stdin and interaction of gdb



The goal: 
to drive the state of the program using cmds from
stdin into a lua interpreter.

The attempt: 
* create a thread which listens to stdin using
fgets(). 

* thread fills a buffer and then uses a mutex and
condition to indicate that the buffer is 
ready to be consumed.

* a timer in the main event loop calls a routine which
consumes this buffer 

* a lua interpreter is called with the string 


And everything worked fine until I tried to debug it
:)


When gdb runs the app, gdb is using stdin, and it
doesn't seem that the fgets() in the 
thread gets any of the input. 

Threads, stdin, unix system calls and the interaction
of gdb with an app under xcode.

Since any questions that begin, "I'm using xcode
to..." is going to be met with derision elsewhere, I
ask here. And I am asking only because I am quite
stumped.

The question:
* is there any reason why this is clearly not possible

* if it is possible, where should I look for more
information.

Much thanks in advance.
Mark


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/xcode-users/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.