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)


> -----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:
> 
> 
> 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.
> 

Hi, 
I started working on implementing this change, and it worked fine in
general.

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
org.eclipse.cdt.dsf.gdb.internal.ui.preferences.GdbDebugPreferencePage
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
preferences
in the UI plugin preference store.

I see this code used in many places, e.g.:
org.eclipse.cdt.dsf.gdb.service.GDBProcesses.eventDispatched(IExitedDMEv
ent)

When I added ".ui" to GdbPlugin.PLUGIN_ID it worked in my case, but I
don't think
this is a correct approach, and I don't understand how it works in other
places in CDT.
Any clues?

2- I initially added the code in GDBControl as suggested, but found out
that 
GDBControl_7_0 is the one I should use for most cases.
Is it correct to add the command listener in GDBControl_7_0?

Thanks


Back to the top