Community
Participate
Working Groups
I noticed that when running a multi-threaded application to which we attach (local attach launch), the debug view shows a single thread numbered 0 instead of the proper list of threads. It turns out this is because the threadListIds command is cached with no threads, and the cache is not cleared when we attach. I think the runControl should listen to InferiorStartedEvent or something like that.
(In reply to comment #0) > I think the runControl should listen to InferiorStartedEvent or something like > that. Yes. I think MIProcesses service should issues IRunControl.IStartedDMEvent/IRunControl.IExitedDMEvent whenever a new debug context is created/destroyed as s result of an attach/disconnect or a new process being started with the debugger or exiting. In 1.0 these events were combined with the inferior started/existed events, which made some sense because the only process being managed was the inferior process. Now the GDBProcesses/MIProcesses service is going to need to manage the inferior processes, which may or may not have the debugger attached. Because of this I guess it makes sense to have the option to separate these two events.
(In reply to comment #1) > (In reply to comment #0) > > I think the runControl should listen to InferiorStartedEvent or something like > > that. > Yes. I think MIProcesses service should issues > IRunControl.IStartedDMEvent/IRunControl.IExitedDMEvent whenever a new debug > context is created/destroyed as s result of an attach/disconnect or a new > process being started with the debugger or exiting. I've started to work on this and ran into my first problem. When detaching from a container, it makes sense, as you point-out, to issue an IExitedEvent. The IExitedEvent requires an IExecutionDMContext. However, the current interface for IProcesses.detachDebuggerFromProcess() takes an IProcessDMContext, which cannot provide the needed IExecution (Icontainer). In truth, it would make sense for IProcesses.detachDebuggerFromProcess() to be passed an IContainer since the debugger should be attached to that process, and therefore, it should have an IContainer associated with it. So, I suggest making IProcesses.detachDebuggerFromProcess() take an IDMContext and calling with something that has an IContainer as an ancestor.
(In reply to comment #2) > So, I suggest making IProcesses.detachDebuggerFromProcess() take an IDMContext > and calling with something that has an IContainer as an ancestor. +1, makes sense to me :-)
Created attachment 108803 [details] Started and Exited events from IProcesses This patch adds the started and exited events when attaching and detaching from a process. I still left the connect/disconnect actions off for now, until multi-process is further along. Committed
This bug seems fixed to me. I'm not sure why it was still open. I think this went into M2 and not M1... Pawel, can you verify?
Verified.
I guess I just forgot to mark it verified last time.
DD 1.1 reelased!