Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Timeouts for GDB/MI commands (Was: [DSF] Making Sequence more robust)

On Monday, October 24, 2011 18:51:58 Marc Khouzam wrote:

> > > > 1. Add new interface:
> > > >     interface IMIControlTimeoutPolicy {
> > > >     
> > > >         void commandSend(CommandHandle);
> > > >         void commandDone(CommandHandle);
> > > >     
> > > >     }
> > > 
> > > ICommandListener has commandSent() and commandDone().
> > > How about using 'sendCommand' and 'processCommandReply' to avoid
> > > confusion?
> > 
> > Well, 'sendCommand' sounds like a methods that sends a command,
> > as opposed to a method that is notified that a command is sent.
> > Maybe, createTimeoutPolicy should just return ICommandListener?
> 
> So I mis-understood what you suggest.  When you say that TxThread/RxThread
> would call these methods, I thought it was to send and receive
> the commands in a way that could be overridden.
> 
> Instead, I gather you want to be able to do extra work when a
> command is sent, so as to set a timer, right?

Right.

> In that case, maybe you simply want to use the existing:
>   ICommandControl.addCommandListener(ICommandListener)
> then add a timer in there?

That would work, and be confined purely inside DSF-GDB. Maybe, it's
actually a good idea -- test-drive this approach using local
and purely private code changes before bubbling up interface changes.

> > What do you think?
> 
> Ok with me.

Great. Then, if Pawel does not disagree, we'll try to implement something
along those lines.

Thanks,

-- 
Vladimir Prus
CodeSourcery / Mentor Graphics
+7 (812) 677-68-40


Back to the top