[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cdt-dev] Timeouts for GDB/MI commands (Was: [DSF] Making Sequence more robust)
- From: "Hussein, Mohamed" <mohamed_hussein@xxxxxxxxxx>
- Date: Tue, 25 Oct 2011 15:29:44 +0200
- Delivered-to: email@example.com
- Thread-index: AcySXTuTiSk86hb1SoqTzjjjPejSVgAuQAkA
- Thread-topic: [cdt-dev] Timeouts for GDB/MI commands (Was: [DSF] Making Sequence more robust)
> -----Original Message-----
> From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx]
> On Behalf Of Prus, Vladimir
> Sent: Monday, October 24, 2011 4:57 PM
> To: Marc Khouzam
> Cc: cdt-dev@xxxxxxxxxxx; Khodjaiants, Mikhail
> Subject: 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:
> > 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
> along those lines.
I started working on implementing this change, and it worked fine in
I had two issues remaining that I would like your help with:
1- I wanted to add a preference to enable/disable timeout and set
The timer, instead of hardcoding this info in the code.
I added the preferences to
And want to use them in GDBControl. which is in org.eclipse.cdt.dsf.gdb
The code that is used to perform such operation is as follows:
timeout = Platform.getPreferencesService().getInt(GdbPlugin.PLUGIN_ID,
IGdbDebugPreferenceConstants.PREF_TIMEOUT, 30, null);
This uses the core plugin ID while the preference page stores
in the UI plugin preference store.
I see this code used in many places, e.g.:
When I added ".ui" to GdbPlugin.PLUGIN_ID it worked in my case, but I
this is a correct approach, and I don't understand how it works in other
places in CDT.
2- I initially added the code in GDBControl as suggested, but found out
GDBControl_7_0 is the one I should use for most cases.
Is it correct to add the command listener in GDBControl_7_0?