From faa04e8d936df8e8688f7945d1a209086429cdd4 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Mon, 22 Jun 2009 00:07:13 +0000 Subject: [PATCH] Also return the "commpage" image as one of the team's images. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31171 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../debugger_interface/DebuggerInterface.cpp | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/apps/debugger/debugger_interface/DebuggerInterface.cpp b/src/apps/debugger/debugger_interface/DebuggerInterface.cpp index 0acef63861..7a7b6689d8 100644 --- a/src/apps/debugger/debugger_interface/DebuggerInterface.cpp +++ b/src/apps/debugger/debugger_interface/DebuggerInterface.cpp @@ -12,6 +12,7 @@ #include #include +#include #include #include "debug_utils.h" @@ -383,6 +384,7 @@ DebuggerInterface::GetThreadInfos(BObjectList& infos) status_t DebuggerInterface::GetImageInfos(BObjectList& infos) { + // get the team's images image_info imageInfo; int32 cookie = 0; while (get_next_image_info(fTeamID, &cookie, &imageInfo) == B_OK) { @@ -395,6 +397,24 @@ DebuggerInterface::GetImageInfos(BObjectList& infos) } } + // Also add the "commpage" image, which belongs to the kernel, but is used + // by userland teams. + cookie = 0; + while (get_next_image_info(B_SYSTEM_TEAM, &cookie, &imageInfo) == B_OK) { + if ((addr_t)imageInfo.text >= USER_COMMPAGE_ADDR + && (addr_t)imageInfo.text < USER_COMMPAGE_ADDR + COMMPAGE_SIZE) { + ImageInfo* info = new(std::nothrow) ImageInfo(B_SYSTEM_TEAM, + imageInfo.id, imageInfo.name, (addr_t)imageInfo.text, + imageInfo.text_size, (addr_t)imageInfo.data, + imageInfo.data_size); + if (info == NULL || !infos.AddItem(info)) { + delete info; + return B_NO_MEMORY; + } + break; + } + } + return B_OK; }