Extend DebuggerInterface for area information retrieval.
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2009-2012, Ingo Weinhold, [email protected].
|
* Copyright 2009-2012, Ingo Weinhold, [email protected].
|
||||||
* Copyright 2010-2012, Rene Gollent, [email protected].
|
* Copyright 2010-2013, Rene Gollent, [email protected].
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -23,6 +23,7 @@
|
|||||||
|
|
||||||
#include "ArchitectureX86.h"
|
#include "ArchitectureX86.h"
|
||||||
#include "ArchitectureX8664.h"
|
#include "ArchitectureX8664.h"
|
||||||
|
#include "AreaInfo.h"
|
||||||
#include "CpuState.h"
|
#include "CpuState.h"
|
||||||
#include "DebugEvent.h"
|
#include "DebugEvent.h"
|
||||||
#include "ImageInfo.h"
|
#include "ImageInfo.h"
|
||||||
@@ -518,6 +519,26 @@ DebuggerInterface::GetImageInfos(BObjectList<ImageInfo>& infos)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
status_t
|
||||||
|
DebuggerInterface::GetAreaInfos(BObjectList<AreaInfo>& infos)
|
||||||
|
{
|
||||||
|
// get the team's areas
|
||||||
|
area_info areaInfo;
|
||||||
|
int32 cookie = 0;
|
||||||
|
while (get_next_area_info(fTeamID, &cookie, &areaInfo) == B_OK) {
|
||||||
|
AreaInfo* info = new(std::nothrow) AreaInfo(fTeamID, areaInfo.area,
|
||||||
|
areaInfo.name, (addr_t)areaInfo.address, areaInfo.size,
|
||||||
|
areaInfo.ram_size, areaInfo.lock, areaInfo.protection);
|
||||||
|
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)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2009, Ingo Weinhold, [email protected].
|
* Copyright 2009, Ingo Weinhold, [email protected].
|
||||||
* Copyright 2010-2012, Rene Gollent, [email protected].
|
* Copyright 2010-2013, Rene Gollent, [email protected].
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
#ifndef DEBUGGER_INTERFACE_H
|
#ifndef DEBUGGER_INTERFACE_H
|
||||||
@@ -17,6 +17,7 @@
|
|||||||
class Architecture;
|
class Architecture;
|
||||||
class CpuState;
|
class CpuState;
|
||||||
class DebugEvent;
|
class DebugEvent;
|
||||||
|
class AreaInfo;
|
||||||
class ImageInfo;
|
class ImageInfo;
|
||||||
class SymbolInfo;
|
class SymbolInfo;
|
||||||
class ThreadInfo;
|
class ThreadInfo;
|
||||||
@@ -54,6 +55,7 @@ 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 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,
|
||||||
|
|||||||
Reference in New Issue
Block a user