1 /* 2 * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de. 3 * Copyright 2013-2014, Rene Gollent, rene@gollent.com. 4 * Distributed under the terms of the MIT License. 5 */ 6 #ifndef DEBUGGER_IMAGE_DEBUG_INFO_H 7 #define DEBUGGER_IMAGE_DEBUG_INFO_H 8 9 10 #include "ImageInfo.h" 11 #include "SpecificImageDebugInfo.h" 12 13 14 class Architecture; 15 class DebuggerInterface; 16 class SymbolInfo; 17 18 19 class DebuggerImageDebugInfo : public SpecificImageDebugInfo { 20 public: 21 DebuggerImageDebugInfo( 22 const ImageInfo& imageInfo, 23 DebuggerInterface* debuggerInterface, 24 Architecture* architecture); 25 virtual ~DebuggerImageDebugInfo(); 26 27 status_t Init(); 28 29 virtual status_t GetFunctions( 30 const BObjectList<SymbolInfo>& symbols, 31 BObjectList<FunctionDebugInfo>& functions); 32 virtual status_t GetType(GlobalTypeCache* cache, 33 const BString& name, 34 const TypeLookupConstraints& constraints, 35 Type*& _type); 36 virtual bool HasType(const BString& name, 37 const TypeLookupConstraints& constraints) 38 const; 39 40 virtual AddressSectionType GetAddressSectionType(target_addr_t address); 41 virtual status_t CreateFrame(Image* image, 42 FunctionInstance* functionInstance, 43 CpuState* cpuState, 44 bool getFullFrameInfo, 45 ReturnValueInfoList* returnValueInfos, 46 StackFrame*& _previousFrame, 47 CpuState*& _previousCpuState); 48 virtual status_t GetStatement(FunctionDebugInfo* function, 49 target_addr_t address, 50 Statement*& _statement); 51 virtual status_t GetStatementAtSourceLocation( 52 FunctionDebugInfo* function, 53 const SourceLocation& sourceLocation, 54 Statement*& _statement); 55 56 virtual status_t GetSourceLanguage(FunctionDebugInfo* function, 57 SourceLanguage*& _language); 58 59 virtual ssize_t ReadCode(target_addr_t address, void* buffer, 60 size_t size); 61 62 virtual status_t AddSourceCodeInfo(LocatableFile* file, 63 FileSourceCode* sourceCode); 64 65 private: 66 ImageInfo fImageInfo; 67 DebuggerInterface* fDebuggerInterface; 68 Architecture* fArchitecture; 69 }; 70 71 72 #endif // DEBUGGER_IMAGE_DEBUG_INFO_H 73