Hi Marc,
Sorry for the delay, I was out of office
The code is the following, there is a way to override eventReceived() in that scenario ?
DsfServicesTracker fTracker = new DsfServicesTracker(GdbPlugin.getBundleContext(), dsfSession.getId());
IGDBControl fCommandControl = fTracker.getService(IGDBControl.class);
CommandFactory fCommandFactory = fCommandControl.getCommandFactory();
fTracker.dispose();
fCommandControl.queueCommand(
fCommandFactory.createMIInterpreterExecConsole(
fCommandControl.getContext(),
"complete "+key),new DataRequestMonitor<MIInfo>(dsfSession.getExecutor(), null) {
private String[] completeInfo;
@Override
protected void handleSuccess() {
MIOutput out = getData().getMIOutput();
MIOOBRecord[] oobs = out.getMIOOBRecords();
gdbCompleteList = getCompleteInfo(oobs);
}
.....
I’m implementing an autocomplete in gdb console, I send the command “complete “ + key, gdb answer and write 1+ lines to the console, I want to avoid that, in CDI it was simple to disable the output in the console before send the command and re-enable it after
Thanks
Gaetano
From: cdt-dev-bounces@xxxxxxxxxxx [mailto:cdt-dev-bounces@xxxxxxxxxxx] On Behalf Of Marc Khouzam
Sent: mercoledì 30 aprile 2014 21:15
To: 'CDT General developers list.'
Subject: Re: [cdt-dev] How to enable or disable console in DSF like in CDI
I’m not sure without seeing your code, but you could implement the two separately.
AbstractCLIProcess is extended by MIBackendCLIProcess and again by GDBBackenCLIProcess.
You can extend that class to modify eventReceived(). To use your own class, you will
need to override GDBControl which is a DSF service.
Marc
Hi Marc,
Thanks for the answer
But I’m implementing a class that implements IConsolePageParticipant, how I can override eventReceived() from my class?
Thanks again
Hi,
Printing to the gdb console is done by AbstractCLIProcess#eventReceived()
You should be able to override this to control when it prints.
Marc
Hi all,
I’ve a problem in migrating a feature from CDI to DSF, it is related to the gdb console
In CDI I do:
- miSession.getRxThread().setEnableConsole(false); to avoid the response (from gdb) is written to the console
- miSession.getRxThread().setEnableConsole(true); to re-enable the console
after some investigation I don’t find a way to do the same in DSF, I suspect it’s impossible
someone more expert than me can help me to understand if it is possible in DSF and how?
Thanks in advance
Ciao
Gaetano