This is the mail archive of the gdb@sourceware.org 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: invoking GDB from FE and signals


On Mon, May 15, 2006 at 10:37:33AM +1200, Nick Roberts wrote:
> Maybe that relates to what I'm seeing on the async branch (and with Apple's
> GDB) where the inferior can't accept input on the same terminal:
> 
>   -exec-run
>   ^running
>   (gdb)
>   Enter value for n1: 5
>   Enter value for n2:
>   Suspended (tty input)
> 
> Where 5 has been entered by the user for the inferior.

Correct.  This is managed by target_terminal_ours and
target_terminal_inferior.

> I was hoping that GDB could tell whether the inferior was waiting for input or
> not and pass any input it receives or process it accordingly (a problem I
> have with Emacs is not knowing whether to queue an input for GDB or send
> it immediately for the inferior).

The inferior's stdin is connected to the terminal, not to GDB, so
there's no way to do this.  Basically, if they're both going to read
from the same standard input, "synchronous" operation is pretty much
mandated.

-- 
Daniel Jacobowitz
CodeSourcery


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