Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] DSF/GDB: context types required to create an expression

On 21/06/2010 2:46 PM, Mikhail Khodjaiants wrote:
On 21/06/2010 2:10 PM, Pawel Piech wrote:
I may be useful to have a little bit of a design discussion around this. Are you planning to implement a register service which delegates to the expression service for evaluation (PDA example does this). Or are you going to create a register service which re-uses the MIvariableManager and does a lot of similar stuff that the expression service does. The former would be much simpler I think, though the latter will give you more control in case you run into performance or other issues.

Cheers,
Pawel

For our commercial product I added the following new interface:

public interface IGDBRegisters extends IRegisters {

public interface IGDBRegisterDMContext extends IRegisterDMContext, IExpressionDMContext {
    }

public interface IGDBRegisterDMData extends IRegisterDMData, IExpressionDMData {
    }
}

The implementation of of this service extends the existing MIRegisters class. I also implemented my own RegisterVMNode that extends GdbVariableVMNode. Note that all these changes are GDB/MI specific and no changes in the basic DSF services is required.

This also answers Marc's question: my register DM context extends MIExpressionDMC and requires a parent.

Mikhail

It seems the following is a better option, but I haven't tried it yet.

public interface IGDBRegisters extends IRegisters {

    public interface IGDBRegisterDMContext extends IRegisterDMContext {

         IExpressionDMContext getExpressionDMC();
    }

    public interface IGDBRegisterDMData extends IRegisterDMData {

        IExpressionDMData getExpressionData();
    }
}

In this case I can pass IRegisterDMContext as a parent to MIExpressionDMC.



Back to the top