[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [cdt-dev] [DSF] SessionType
|
Vladimir,
On Jul 8, 2010, at 8:39 PM, Vladimir Prus wrote:
> On Thursday 08 July 2010 19:48:59 Marc Khouzam wrote:
>>> Hi,
>>> I'm looking at this definition from DSF:
>>>
>>> public enum SessionType { LOCAL, REMOTE, CORE }
>>
>> This is DSF-GDB specific. (just to be fair to DSF :-))
>>
>>> Unfortunately, despite quite some years of experience with gdb, I have
>>> no idea what LOCAL and REMOTE means.
>>
>> REMOTE is when we connect to a gdbserver.
>> LOCAL is when we use GDB on the host only.
>
> And what if we connect to something that speaks gdb protocol, but is not
> a gdbserver?
>
that was exactly my case.
>>> Would it not be better to remove session type completely, and use
>>> more detailed switches, like 'should run or continue to be used
>>> when starting program', or 'run can be used to restart'.
>>
>> If the problem is using -exec-run or -exec-continue, then the
>> service which dispatches those commands can be overridden to handle
>> the cases you want to deal with.
>
> I am becoming somewhat concerned :-( You seem to suggest that
> overridding a service -- that is, writing my own service class
> and doing what I want -- is a sensible approach. However,
> suppose I want to go this route. I'll derive from GDBControl_7_0
> and what is the next step? startOrRestart method is pretty big,
> and all I want to do is modify a single if condition inside it.
> Clearly, copy-pasting it is not a good approach and there
> are no methods that encapsulate 'should I use run' decision.
> Are you proposing to add 'useRun' method to GDBControl_7_0, or
> there's some other approach?
If you support old versions too, you have to extend GDBControl as well.
Anna.