Extend DebuggerInterface for semaphore information retrieval.
This commit is contained in:
parent
dcbc00c3cf
commit
dbf6921a9f
@ -27,6 +27,7 @@
|
|||||||
#include "CpuState.h"
|
#include "CpuState.h"
|
||||||
#include "DebugEvent.h"
|
#include "DebugEvent.h"
|
||||||
#include "ImageInfo.h"
|
#include "ImageInfo.h"
|
||||||
|
#include "SemaphoreInfo.h"
|
||||||
#include "SymbolInfo.h"
|
#include "SymbolInfo.h"
|
||||||
#include "ThreadInfo.h"
|
#include "ThreadInfo.h"
|
||||||
|
|
||||||
@ -539,6 +540,25 @@ DebuggerInterface::GetAreaInfos(BObjectList<AreaInfo>& infos)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
status_t
|
||||||
|
DebuggerInterface::GetSemaphoreInfos(BObjectList<SemaphoreInfo>& infos)
|
||||||
|
{
|
||||||
|
// get the team's semaphores
|
||||||
|
sem_info semInfo;
|
||||||
|
int32 cookie = 0;
|
||||||
|
while (get_next_sem_info(fTeamID, &cookie, &semInfo) == B_OK) {
|
||||||
|
SemaphoreInfo* info = new(std::nothrow) SemaphoreInfo(fTeamID,
|
||||||
|
semInfo.sem, semInfo.name, semInfo.count, semInfo.latest_holder);
|
||||||
|
if (info == NULL || !infos.AddItem(info)) {
|
||||||
|
delete info;
|
||||||
|
return B_NO_MEMORY;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return B_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
DebuggerInterface::GetSymbolInfos(team_id team, image_id image,
|
DebuggerInterface::GetSymbolInfos(team_id team, image_id image,
|
||||||
BObjectList<SymbolInfo>& infos)
|
BObjectList<SymbolInfo>& infos)
|
||||||
|
@ -19,6 +19,7 @@ class CpuState;
|
|||||||
class DebugEvent;
|
class DebugEvent;
|
||||||
class AreaInfo;
|
class AreaInfo;
|
||||||
class ImageInfo;
|
class ImageInfo;
|
||||||
|
class SemaphoreInfo;
|
||||||
class SymbolInfo;
|
class SymbolInfo;
|
||||||
class ThreadInfo;
|
class ThreadInfo;
|
||||||
|
|
||||||
@ -56,6 +57,8 @@ public:
|
|||||||
virtual status_t GetThreadInfos(BObjectList<ThreadInfo>& infos);
|
virtual status_t GetThreadInfos(BObjectList<ThreadInfo>& infos);
|
||||||
virtual status_t GetImageInfos(BObjectList<ImageInfo>& infos);
|
virtual status_t GetImageInfos(BObjectList<ImageInfo>& infos);
|
||||||
virtual status_t GetAreaInfos(BObjectList<AreaInfo>& infos);
|
virtual status_t GetAreaInfos(BObjectList<AreaInfo>& infos);
|
||||||
|
virtual status_t GetSemaphoreInfos(
|
||||||
|
BObjectList<SemaphoreInfo>& infos);
|
||||||
virtual status_t GetSymbolInfos(team_id team, image_id image,
|
virtual status_t GetSymbolInfos(team_id team, image_id image,
|
||||||
BObjectList<SymbolInfo>& infos);
|
BObjectList<SymbolInfo>& infos);
|
||||||
virtual status_t GetSymbolInfo(team_id team, image_id image,
|
virtual status_t GetSymbolInfo(team_id team, image_id image,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user