This is the mail archive of the gdb-patches@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: [RFA] Async mode fixes.


 > You mean this bit of code:
 > 
 >      else if (sync_execution)
 > 	{
 > 	  /* Don't print the prompt. We are executing the target in
 > 	     synchronous mode.  */
 > 	  args->action = EXECUTE_COMMAND_SUPRESS_PROMPT;
 > 	  return;
 > 	}
 > 
 > ?

Yes.

 > I actually planned to remove it without further ado, after this async
 > patch goes in. My reasoning is that the current behaviour is just bizarre. For sync
 > target, any exec commands results in 
 > 
 > 	^running
 > 	(gdb) 
 > 
 > whereas for async target, due to above fragment, you can sometimes not get
 > a prompt -- and this is backward.

That would seem to work.

 > Of course, this code only deals with printing the prompt, whereas we still
 > have the bigger issue -- namely that if we execute "continue" using
 > -interpreter-exec, then GDB does not accept the input while continue runs,
 > and -exec-interrupt does not work.

I don't think this is right but I don't want to work on your patch while it's
not part of GDB.

 >                                    Apple branch fixes that by not setting
 > sync_execution inside async_disable_stdin, but I find the fix suspect -- if
 > we give up terminal to inferior and then try to read something, I'm not sure
 > it will work. It does work with "target async", but target async does not
 > actually mess with terminal.
 > 
 > One solution is probably to never disable stdin when an external tty
 > is used for program output. Or to never disable stdin when top-level
 > interpreter is MI. I must admit I don't know the right solution, yet.
 > 
 > - Volodya

-- 
Nick                                           http://www.inet.net.nz/~nickrob


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