303 TInt iWaitCount; |
303 TInt iWaitCount; |
304 TPointerArrayBuffer iSuspendedQ; |
304 TPointerArrayBuffer iSuspendedQ; |
305 }; |
305 }; |
306 typedef TPckgBuf<TCondVarKernelInfo> TCondVarKernelInfoBuf; |
306 typedef TPckgBuf<TCondVarKernelInfo> TCondVarKernelInfoBuf; |
307 |
307 |
308 class TCodeSegKernelInfo |
308 class TCodeSegKernelInfoBase |
309 { |
309 { |
310 public: |
310 public: |
311 TUint32 iRunAddress; |
311 TUint32 iRunAddress; |
312 TInt iSize; |
312 TInt iSize; |
313 TFileName8 iFileName; |
313 TFileName8 iFileName; |
314 }; |
314 }; |
315 typedef TPckgBuf<TCodeSegKernelInfo> TCodeSegKernelInfoBuf; |
315 |
316 |
316 // We don't really need a base class, it's just for BC reasons |
317 class TTomsciCodeSegKernelInfo : public TCodeSegKernelInfo |
317 class TCodeSegKernelInfo : public TCodeSegKernelInfoBase |
318 { |
318 { |
319 public: |
319 public: |
320 TUint8* iAddressOfKernelObject; |
320 TUint8* iAddressOfKernelObject; |
321 TFullName8 iName; |
321 TFullName8 iName; |
322 TInt iAccessCount; |
322 TInt iAccessCount; |
323 TInt iDepCount; |
323 TInt iDepCount; |
324 }; |
324 TBool iXip; |
|
325 }; |
|
326 typedef TPckgBuf<TCodeSegKernelInfo> TCodeSegKernelInfoBuf; |
|
327 |
325 |
328 |
326 class TProp |
329 class TProp |
327 { |
330 { |
328 public: |
331 public: |
329 TUid iCategory; |
332 TUid iCategory; |
449 EControlReboot, |
452 EControlReboot, |
450 EControlGetCreatorThread, |
453 EControlGetCreatorThread, |
451 EControlPropertyNotify, |
454 EControlPropertyNotify, |
452 EControlPropertyNotifyCancel, |
455 EControlPropertyNotifyCancel, |
453 EControlSubscribeToProperty, |
456 EControlSubscribeToProperty, |
|
457 EControlAcquireCodeSegMutexAndFilterCodesegsForProcess, |
454 ENumRequests, // Add new commands above this line |
458 ENumRequests, // Add new commands above this line |
455 }; |
459 }; |
456 public: |
460 public: |
457 static TInt LoadDriver(); |
461 static TInt LoadDriver(); |
458 static void CloseDriver(); |
462 static void CloseDriver(); |
490 TInt GetObjectInfo (TObjectType aObjectType, const TDesC& aObjectName, TDes8& aObjectInfoBuf); |
494 TInt GetObjectInfo (TObjectType aObjectType, const TDesC& aObjectName, TDes8& aObjectInfoBuf); |
491 //Get info about a kernel object specified as a user side handle |
495 //Get info about a kernel object specified as a user side handle |
492 TInt GetObjectInfoByHandle (TObjectType aObjectType, TInt aThreadId, TInt aObjectHandle, TDes8& aObjectInfoBuf); |
496 TInt GetObjectInfoByHandle (TObjectType aObjectType, TInt aThreadId, TInt aObjectHandle, TDes8& aObjectInfoBuf); |
493 //Wait on the kernel's code seg mutex |
497 //Wait on the kernel's code seg mutex |
494 TInt AcquireCodeSegMutex(); |
498 TInt AcquireCodeSegMutex(); |
|
499 TInt AcquireCodeSegMutexAndFilterCodesegsForProcess(TUint aProcessId); |
495 //Signal the kernel's code seg mutex |
500 //Signal the kernel's code seg mutex |
496 TInt ReleaseCodeSegMutex(); |
501 TInt ReleaseCodeSegMutex(); |
497 //Get info about the next code seg. Call repeatedly to iterate all code segs. Call AcquireCodeSegMutex before calling. |
502 //Get info about the next code seg. Call repeatedly to iterate all code segs. Call AcquireCodeSegMutex before calling. |
498 TInt GetNextCodeSegInfo(TDes8& aCodeSegInfoBuf); |
503 TInt GetNextCodeSegInfo(TDes8& aCodeSegInfoBuf); |
499 //Kill an object. aObyType should be a thread or process. Either an objectId (user side handle) _OR_ objectPtr (kernel side DObject*) should be provided. |
504 //Kill an object. aObyType should be a thread or process. Either an objectId (user side handle) _OR_ objectPtr (kernel side DObject*) should be provided. |
681 params().iObjectHandle=aObjectHandle; |
686 params().iObjectHandle=aObjectHandle; |
682 return DoControl(EControlGetObjectInfoByHandle, (TAny*)¶ms, (TAny*)&aObjectInfoBuf); |
687 return DoControl(EControlGetObjectInfoByHandle, (TAny*)¶ms, (TAny*)&aObjectInfoBuf); |
683 } |
688 } |
684 inline TInt RMemoryAccess::AcquireCodeSegMutex() |
689 inline TInt RMemoryAccess::AcquireCodeSegMutex() |
685 { return DoControl(EControlAcquireCodeSegMutex, NULL, NULL); } |
690 { return DoControl(EControlAcquireCodeSegMutex, NULL, NULL); } |
|
691 inline TInt RMemoryAccess::AcquireCodeSegMutexAndFilterCodesegsForProcess(TUint aProcessId) |
|
692 { return DoControl(EControlAcquireCodeSegMutexAndFilterCodesegsForProcess, (TAny*)aProcessId); } |
686 inline TInt RMemoryAccess::ReleaseCodeSegMutex() |
693 inline TInt RMemoryAccess::ReleaseCodeSegMutex() |
687 { return DoControl(EControlReleaseCodeSegMutex, NULL, NULL); } |
694 { return DoControl(EControlReleaseCodeSegMutex, NULL, NULL); } |
688 inline TInt RMemoryAccess::GetNextCodeSegInfo(TDes8& aCodeSegInfoBuf) |
695 inline TInt RMemoryAccess::GetNextCodeSegInfo(TDes8& aCodeSegInfoBuf) |
689 { return DoControl(EControlGetNextCodeSegInfo, (TAny*)&aCodeSegInfoBuf, NULL); } |
696 { return DoControl(EControlGetNextCodeSegInfo, (TAny*)&aCodeSegInfoBuf, NULL); } |
690 inline TInt RMemoryAccess::ObjectDie(TObjectType aObjType, TUint aObjectId, TUint8* aObjectPtr, TExitType aType, TInt aReason, const TDesC& aCategory) |
697 inline TInt RMemoryAccess::ObjectDie(TObjectType aObjType, TUint aObjectId, TUint8* aObjectPtr, TExitType aType, TInt aReason, const TDesC& aCategory) |