Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] [DSF] Supporting new GDB commands

On Monday 21 June 2010 17:01:16 Marc Khouzam wrote:

 > > > 3- instantiate a new version of the CommandFactory for 
> > debug sessions that can use the new command
> > > 
> > > I think #3 is the best.
> > 
> > I am not sure I follow #3. The new command is fairly 
> > different to the old one both in options it
> > accepts and in output it produces. 
> 
> Yes, if the command is different in input/output, you can't
> use the CommandFactory.  It wasn't clear from your email
> if the new command was similar or different in that respect.

It's pretty different.

> > I am also unsure why you suggest new versio nof 
> > MemoryService. While the logic has to be different,
> > it's logic for reading memory block, so it's relatively 
> > localized. Why cannot existing MemoryService
> > consult a boolean flag somewhere, and act accordingly? 
> 
> I wasn't sure if you wanted to do this in DSF-GDB or in
> your own product.  For your own product, you'd have to 
> have your own version of the MemoryService.
> 
> For DSF-GDB, we could enhance the current MemoryService
> depending on the complexity of the change.

Sorry for not being clear. I've made a change in experimental
branch of DSF in our repository. In general, we can carry this
change forever locally, but I would like to have this change
upstream.

> But it looks like the CommandFactory won't work in your case.
> Changing the service may be the way to go.

Yes, changing the service seems like the way to go. However, could
you, as essentially the main DSF support person now, give the roadmap
for changing the service. Like:

- When the run -list-features
- How to communicate the result to memory service?

Of course, it's possible to run -list-features from memory service
itself, but:

- This will mean that in future, every single service will emit -list-features,
which smells bad
- I am not exactly clear on lifetime of services. In particular, will a new
instance of a service be *always* create when starting new debug session? If
that's the case, a single member variable inside MemoryService will suffice
to hold the result of -list-features.

Thanks,

-- 
Vladimir Prus
CodeSourcery
vladimir@xxxxxxxxxxxxxxxx
(650) 331-3385 x722


Back to the top