2009-06-20 21:20:49 +04:00
|
|
|
/*
|
|
|
|
* Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
|
|
|
|
* 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 "ArchitectureTypes.h"
|
|
|
|
#include "ImageInfo.h"
|
|
|
|
|
|
|
|
|
|
|
|
class Architecture;
|
|
|
|
class DebuggerInterface;
|
|
|
|
class FunctionDebugInfo;
|
2009-06-28 01:09:21 +04:00
|
|
|
class SpecificImageDebugInfo;
|
2009-06-20 21:20:49 +04:00
|
|
|
|
|
|
|
|
|
|
|
class ImageDebugInfo : public Referenceable {
|
|
|
|
public:
|
2009-06-28 01:09:21 +04:00
|
|
|
ImageDebugInfo(const ImageInfo& imageInfo),
|
2009-06-20 21:20:49 +04:00
|
|
|
~ImageDebugInfo();
|
|
|
|
|
2009-06-28 01:09:21 +04:00
|
|
|
bool AddSpecificInfo(SpecificImageDebugInfo* info);
|
|
|
|
status_t FinishInit();
|
2009-06-20 21:20:49 +04:00
|
|
|
|
2009-06-26 17:12:06 +04:00
|
|
|
int32 CountFunctions() const;
|
|
|
|
FunctionDebugInfo* FunctionAt(int32 index) const;
|
|
|
|
FunctionDebugInfo* FunctionAtAddress(target_addr_t address) const;
|
2009-06-20 21:20:49 +04:00
|
|
|
|
|
|
|
private:
|
2009-06-28 01:09:21 +04:00
|
|
|
typedef BObjectList<SpecificImageDebugInfo> SpecificInfoList;
|
2009-06-26 17:12:06 +04:00
|
|
|
typedef BObjectList<FunctionDebugInfo> FunctionList;
|
|
|
|
|
|
|
|
private:
|
|
|
|
static int _CompareFunctions(const FunctionDebugInfo* a,
|
|
|
|
const FunctionDebugInfo* b);
|
|
|
|
static int _CompareAddressFunction(
|
|
|
|
const target_addr_t* address,
|
|
|
|
const FunctionDebugInfo* function);
|
2009-06-20 21:20:49 +04:00
|
|
|
|
|
|
|
private:
|
|
|
|
ImageInfo fImageInfo;
|
2009-06-28 01:09:21 +04:00
|
|
|
SpecificInfoList fSpecificInfos;
|
2009-06-26 17:12:06 +04:00
|
|
|
FunctionList fFunctions;
|
2009-06-20 21:20:49 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif // IMAGE_DEBUG_INFO_H
|