1 /* 2 * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de. 3 * Distributed under the terms of the MIT License. 4 */ 5 6 #include "DebuggerTeamDebugInfo.h" 7 8 #include <new> 9 10 #include "DebuggerImageDebugInfo.h" 11 12 13 DebuggerTeamDebugInfo::DebuggerTeamDebugInfo( 14 DebuggerInterface* debuggerInterface, Architecture* architecture) 15 : 16 fDebuggerInterface(debuggerInterface), 17 fArchitecture(architecture) 18 { 19 } 20 21 22 DebuggerTeamDebugInfo::~DebuggerTeamDebugInfo() 23 { 24 } 25 26 27 status_t 28 DebuggerTeamDebugInfo::Init() 29 { 30 return B_OK; 31 } 32 33 34 status_t 35 DebuggerTeamDebugInfo::CreateImageDebugInfo(const ImageInfo& imageInfo, 36 LocatableFile* imageFile, ImageDebugInfoLoadingState& _state, 37 SpecificImageDebugInfo*& _imageDebugInfo) 38 { 39 DebuggerImageDebugInfo* debuggerInfo 40 = new(std::nothrow) DebuggerImageDebugInfo(imageInfo, 41 fDebuggerInterface, fArchitecture); 42 if (debuggerInfo == NULL) 43 return B_NO_MEMORY; 44 45 status_t error = debuggerInfo->Init(); 46 if (error != B_OK) { 47 delete debuggerInfo; 48 return error; 49 } 50 51 _imageDebugInfo = debuggerInfo; 52 return B_OK; 53 } 54