rem: vm.suspendAll(); thread_id me=find_thread(NULL); suspend_thread(clone1); suspend_thread(mmap1); suspend_thread(info1); if (loop1!=me) suspend_thread(loop1); if (loop2!=me) suspend_thread(loop2); if (loop3!=me) suspend_thread(loop3); debugger(t);
add: error ("Exception thrown! %s\n",t); exit(1);
context: int createFillAndTest(int pages,char *name){	try{	unsigned long addr;	int area1;	error ("%s: createFillAndTest: about to create \n",name);	area1=vm.createArea("Mine",pages,(void **)(&addr));	error ("%s: createFillAndTest: create done\n",name);	for (int i=0;i<pages*PAGE_SIZE;i++)		{						if (!(i%9024) )			error ("Writing to byte %d of area %s\n",i,name);		writeByte(addr,i,i%256);		}	error ("%s: createFillAndTest: writing done\n",name);	for (int i=0;i<pages*PAGE_SIZE;i++)		{		if (!(i%9024) )			error ("Reading from byte %d of area %s\n",i,name);		if (i%256!=readByte(addr,i))				error ("ERROR! Byte at offset %d does not match: expected: %d, found: %d\n",i,i%256,readByte(addr,i));		}	error ("%s: createFillAndTest: reading done\n",name);	return area1;	}	catch (const char *t)	{		vm.suspendAll();		thread_id me=find_thread(NULL);		suspend_thread(clone1);		suspend_thread(mmap1);		suspend_thread(info1);		if (loop1!=me)			suspend_thread(loop1);		if (loop2!=me)			suspend_thread(loop2);		if (loop3!=me)			suspend_thread(loop3);		debugger(t);	}	catch (...)	{		error ("Exception thrown!\n");		exit(1);	}	return 0;}