Files
haiku-beta6/headers/private/debugger/debug_info/SpecificImageDebugInfo.h
T

106 lines
2.9 KiB
C++
Raw Normal View History

/*
* Copyright 2009, Ingo Weinhold, [email protected].
* Copyright 2013-2014, Rene Gollent, [email protected].
* Distributed under the terms of the MIT License.
*/
2009-06-27 21:09:21 +00:00
#ifndef SPECIFIC_IMAGE_DEBUG_INFO_H
#define SPECIFIC_IMAGE_DEBUG_INFO_H
#include <ObjectList.h>
#include <Referenceable.h>
#include "AddressSectionTypes.h"
#include "ReturnValueInfo.h"
2009-06-29 22:38:15 +00:00
#include "Types.h"
class Architecture;
class BString;
class CpuState;
class DataMember;
class DebuggerInterface;
class FileSourceCode;
class FunctionDebugInfo;
2009-07-18 23:52:16 +00:00
class FunctionInstance;
class GlobalTypeCache;
class Image;
class ImageInfo;
class LocatableFile;
class SourceLanguage;
class SourceLocation;
class StackFrame;
class Statement;
class SymbolInfo;
class Type;
2011-06-30 22:30:48 +00:00
class TypeLookupConstraints;
class ValueLocation;
class SpecificImageDebugInfo : public BReferenceable {
public:
2009-06-27 21:09:21 +00:00
virtual ~SpecificImageDebugInfo();
virtual status_t GetFunctions(
const BObjectList<SymbolInfo>& symbols,
BObjectList<FunctionDebugInfo>& functions)
= 0;
// returns references
virtual status_t GetType(GlobalTypeCache* cache,
2011-06-30 22:30:48 +00:00
const BString& name,
const TypeLookupConstraints& constraints,
Type*& _type) = 0;
// returns a reference
virtual bool HasType(const BString& name,
const TypeLookupConstraints& constraints)
const = 0;
virtual AddressSectionType GetAddressSectionType(target_addr_t address)
= 0;
virtual status_t CreateFrame(Image* image,
2009-07-18 23:52:16 +00:00
FunctionInstance* functionInstance,
CpuState* cpuState,
2012-12-26 00:17:09 -05:00
bool getFullFrameInfo,
ReturnValueInfoList* returnValueInfos,
2011-12-15 22:43:38 -05:00
StackFrame*& _Frame,
CpuState*& _previousCpuState) = 0;
// returns reference to previous frame
// and CPU state; returned CPU state
// can be NULL; can return B_UNSUPPORTED
2012-12-26 00:17:09 -05:00
// getFullFrameInfo: try to retrieve
// variables/parameters if true
// (and supported)
virtual status_t GetStatement(FunctionDebugInfo* function,
target_addr_t address,
Statement*& _statement) = 0;
// returns reference
virtual status_t GetStatementAtSourceLocation(
FunctionDebugInfo* function,
const SourceLocation& sourceLocation,
Statement*& _statement) = 0;
// returns reference
virtual status_t GetSourceLanguage(FunctionDebugInfo* function,
SourceLanguage*& _language) = 0;
virtual ssize_t ReadCode(target_addr_t address, void* buffer,
size_t size) = 0;
virtual status_t AddSourceCodeInfo(LocatableFile* file,
FileSourceCode* sourceCode) = 0;
protected:
static status_t GetFunctionsFromSymbols(
const BObjectList<SymbolInfo>& symbols,
BObjectList<FunctionDebugInfo>& functions,
DebuggerInterface* interface,
const ImageInfo& imageInfo,
SpecificImageDebugInfo* info);
};
2009-06-27 21:09:21 +00:00
#endif // SPECIFIC_IMAGE_DEBUG_INFO_H