Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] exec notification in CDT/dsf ?

Hi,

I finally found an answer. If somebody want to do something similar:

public MyClass implements org.eclipse.cdt.dsf.debug.service.command.IEventListener {
    @Override
    public void eventReceived(Object output) {
        if (output instanceof MIOutput) {
            MIOOBRecord[] records = ((MIOutput) output).getMIOOBRecords();
            for (MIOOBRecord r : records) {
                if (r instanceof MIConsoleStreamOutput) {
                    MIConsoleStreamOutput mioutput = (MIConsoleStreamOutput) r;
                    if (mioutput.getCString().contains("is executing new program:")) {
                        // implements what you want here.
                    }
                }
            }
        }
    }
}


Do not forget to add this class as event listener of the IMICommandControl service.

Xavier



De: "Xavier Raynaud" <xavier.raynaud@xxxxxxxxx>
À: "CDT General developers list." <cdt-dev@xxxxxxxxxxx>
Envoyé: Vendredi 4 Juillet 2014 12:23:39
Objet: [cdt-dev] exec notification in CDT/dsf ?

Hi,

While debugging a program with DSF: when the debugged program performs an "exec", the message "XXX is executing new program: YYY" in both gdb console and gdb traces.
Is there a way to be notified of this change in DSF ?

Xavier Raynaud

_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/cdt-dev


Back to the top