Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-debug-dev] Adding a Target....

> 
> <laugh> In the end I ended up having to do both.
> 
> The target command was moved to createLaunchSession. But I still had to 
> hook restart in CTarget because the default implementation was destructive 
> for our target and because restart looks very architecture specific for us. 
> For it's something like: set $pc = ResetVector; set $cacheattr = 
> defaultCacheattr (and you don't want to know what it looks like on configs 
> with MMUs.)
> 
> So good suggestion Alain, that is the right place to add the MI target 
> send. It's just too bad I have to have that CTarget subclass anyway to do 
> those other things.
> 


In the (long term) future, we hope to have those scenarios possible:

(1) Say you want to implement some "process monitor", your monitor is running
  on a host and watching over some processes.  So the monitor
  implements ICDISession and calls ICDISession.addTarget() or
  ICDISession.removeTarget() in its cycle, of course by some black magic
  the target can be debug i.e. Target.suspend(), Target.next() etc ..

(2) By some black magic, catchpoints are implemented and the ICDSession
  can "see" when a new target/process is created, for example
  by catching fork(2).  But you want to make things easier for the user
  and not do the same hold sleep(2) and reattach.  The IDE/tools is/are
  smart enough to handle this kind of mudane tasks and automatically
  add the new Target to the session and lets you flip between ...

(..) lots of other funny ideas 8-)

But the framework is not quite here yet with CDI(C Debugger API) to
do this, where ICDISession become just a way to group targets.


So in your case, I was not sure that every thing would work ok.
And the next version(in the head branch) will only bring you more
headaches 8-), (un)fortunately we do not have that many users of this
API that we have to be backward compatible etc ...

In any case, I have back away for such a major change,
Time is flying and we have to work towards the debug proposed
plan(see old post).

But if you have any wild ideas about Multi Process debugging, .... 8-)


> Thanks!
> -Chris
> 
> At 12:49 PM 1/25/2003 -0800, Chris Songer wrote:
> 
> >>I'm not sure about one thing, the extension of cdi.CTarget, could you
> >>not just attach to the target when you were creating the session in
> >>XtGDB.createCSession() ?
> >
> >Assuming I understand the question: Yes you could as long as no one else 
> >is invoking restart.
> >
> >I thought of that, but I didn't because of personal ignorance. There's a 
> >lot of code that I don't know. Sending an exec-run to our the MP simulator 
> >after attaching is bad and that means restart() in CTarget was destructive 
> >if it got invoked. I was not clear what menu item or other thing might get 
> >a hold of the target and send a restart and was I concerned that just 
> >attaching in the session would leave some hole.
> >
> >If restart will only ever be called by the createCSession call, or resume 
> >under createCSession, then that's a much better way to do it.
> >
> >Thanks!
> >-Chris
> >
> >_______________________________________________
> >cdt-debug-dev mailing list
> >cdt-debug-dev@xxxxxxxxxxx
> >http://dev.eclipse.org/mailman/listinfo/cdt-debug-dev
> 
> _______________________________________________
> cdt-debug-dev mailing list
> cdt-debug-dev@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/cdt-debug-dev
> 


-- 
au revoir, alain
----
Aussi haut que l'on soit assis, on est toujours assis que sur son cul !!!



Back to the top