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

89 lines
2.3 KiB
C++
Raw Normal View History

/*
* Copyright 2009, Ingo Weinhold, [email protected].
* Copyright 2010-2013, Rene Gollent, [email protected].
* Distributed under the terms of the MIT License.
*/
#ifndef IMAGE_DEBUG_INFO_H
#define IMAGE_DEBUG_INFO_H
#include <String.h>
#include <ObjectList.h>
#include <Referenceable.h>
#include "AddressSectionTypes.h"
#include "ImageInfo.h"
2009-06-29 22:38:15 +00:00
#include "Types.h"
class Architecture;
class DebuggerInterface;
class FileSourceCode;
class FunctionDebugInfo;
class FunctionInstance;
class GlobalTypeCache;
class LocatableFile;
2009-06-27 21:09:21 +00:00
class SpecificImageDebugInfo;
class SymbolInfo;
class Type;
2011-06-30 22:30:48 +00:00
class TypeLookupConstraints;
class ImageDebugInfo : public BReferenceable {
public:
2009-06-28 02:10:43 +00:00
ImageDebugInfo(const ImageInfo& imageInfo);
~ImageDebugInfo();
2009-07-18 23:52:16 +00:00
const ImageInfo& GetImageInfo() const { return fImageInfo; }
2009-06-27 21:09:21 +00:00
bool AddSpecificInfo(SpecificImageDebugInfo* info);
status_t FinishInit(DebuggerInterface* interface);
status_t GetType(GlobalTypeCache* cache,
2011-06-30 22:30:48 +00:00
const BString& name,
const TypeLookupConstraints& constraints,
Type*& _type);
// returns a reference
bool HasType(const BString& name,
const TypeLookupConstraints& constraints)
const;
AddressSectionType GetAddressSectionType(target_addr_t address)
const;
int32 CountFunctions() const;
FunctionInstance* FunctionAt(int32 index) const;
FunctionInstance* FunctionAtAddress(target_addr_t address) const;
FunctionInstance* FunctionByName(const char* name) const;
FunctionInstance* MainFunction() const
{ return fMainFunction; }
status_t AddSourceCodeInfo(LocatableFile* file,
FileSourceCode* sourceCode) const;
private:
2009-06-27 21:09:21 +00:00
typedef BObjectList<SpecificImageDebugInfo> SpecificInfoList;
typedef BObjectList<FunctionInstance> FunctionList;
private:
static int _CompareFunctions(const FunctionInstance* a,
const FunctionInstance* b);
static int _CompareAddressFunction(
const target_addr_t* address,
const FunctionInstance* function);
static int _CompareSymbols(const SymbolInfo* a,
const SymbolInfo* b);
private:
ImageInfo fImageInfo;
2009-06-27 21:09:21 +00:00
SpecificInfoList fSpecificInfos;
FunctionList fFunctions;
FunctionInstance* fMainFunction;
};
#endif // IMAGE_DEBUG_INFO_H