[Mono-dev] Mono-Debugger: Multiple threads and SingleSteppingEngines?

jonas echterhoff jonas at unity3d.com
Wed Apr 22 04:43:13 EDT 2009


I got debugging of multi-threaded applications to work in OS X, as in  
supporting it on the backend. But what I don't quite get yet is how  
multi-threaded applications should be handled and represented inside  
the debugger. In ThreadManager.cs, there is a comment:

		//   For each application we're debugging, there is just one  
SingleSteppingEngine,
		//   no matter how many threads the application has.  The engine is  
using one single
		//   event loop which is processing commands from the user and  
events from all of
		//   the application's threads.

Somehow, it seems to me that this is not really the case. In  
ProcessServant.ThreadCreated (which is called when a new thread is  
created by the application):

			SingleSteppingEngine new_thread = new SingleSteppingEngine (
				manager, this, new_inferior, pid);

Seems to contradict that. Looking at the code, I assume the above  
comment is wrong. It appears that the debugger will create one  
SingleSteppingEngine plus Inferior for each thread. Am I right?

jonas


More information about the Mono-devel-list mailing list