Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] [DSF] SessionType

On 08/07/2010 11:16, Vladimir Prus wrote:
> Hi,
> I'm looking at this definition from DSF:
> 
> 	public enum SessionType { LOCAL, REMOTE, CORE }
> 
> Unfortunately, despite quite some years of experience with gdb, I have
> no idea what LOCAL and REMOTE means. Say:
> 
> - If I do 'target sim', is this remote or local? Note that not only
> simulator runs on the same machine as gdb, but also there's no 
> TCP communucation going on.

  I've just implemented a sim gdb myself.  I used a LOCAL session type for
everything, but override the launch sequence to send "target sim" etc.

  I also had to play horrible games in both CDI
("miSession.getMIInferior().setIsRemoteInferior(true);") and DSF variants of
the debugger to trick the framework into sending interrupt signals to GDB
rather than the pseudo-inferior that a sim gdb creates.  (In the DSF version I
just hacked out the cygwin-related "gdbSpawner.interruptCTRLC();" call down in
the GDBBackend and left myself a note that this really needed a new
SessionType.  Ugly.)

> 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'.

... and then perhaps even reimplement the existing session types in terms of
sets of those switches, for back-compat, while making it a whole world easier
to add new session types?  Yep, I reckon so.

    cheers,
      DaveK



Back to the top