2009-06-20 17:20:49 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
|
|
|
|
* 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
|
2009-06-20 17:20:49 +00:00
|
|
|
|
2009-06-26 13:12:06 +00:00
|
|
|
#include <ObjectList.h>
|
2009-06-20 17:20:49 +00:00
|
|
|
#include <Referenceable.h>
|
|
|
|
|
2009-06-29 22:38:15 +00:00
|
|
|
#include "Types.h"
|
2009-06-20 17:20:49 +00:00
|
|
|
|
|
|
|
|
|
|
|
class Architecture;
|
|
|
|
class CpuState;
|
|
|
|
class DebuggerInterface;
|
|
|
|
class FunctionDebugInfo;
|
|
|
|
class Image;
|
2009-06-21 13:17:21 +00:00
|
|
|
class SourceCode;
|
2009-07-07 20:47:39 +00:00
|
|
|
class SourceLocation;
|
2009-06-20 17:20:49 +00:00
|
|
|
class StackFrame;
|
2009-06-25 23:51:09 +00:00
|
|
|
class Statement;
|
2009-06-20 17:20:49 +00:00
|
|
|
|
|
|
|
|
2009-06-27 21:09:21 +00:00
|
|
|
class SpecificImageDebugInfo : public Referenceable {
|
2009-06-20 17:20:49 +00:00
|
|
|
public:
|
2009-06-27 21:09:21 +00:00
|
|
|
virtual ~SpecificImageDebugInfo();
|
2009-06-20 17:20:49 +00:00
|
|
|
|
2009-06-26 13:12:06 +00:00
|
|
|
virtual status_t GetFunctions(
|
|
|
|
BObjectList<FunctionDebugInfo>& functions)
|
|
|
|
= 0;
|
|
|
|
// returns references
|
2009-06-20 17:20:49 +00:00
|
|
|
|
|
|
|
virtual status_t CreateFrame(Image* image,
|
|
|
|
FunctionDebugInfo* function,
|
|
|
|
CpuState* cpuState,
|
|
|
|
StackFrame*& _previousFrame,
|
|
|
|
CpuState*& _previousCpuState) = 0;
|
|
|
|
// returns reference to previous frame
|
|
|
|
// and CPU state; returned CPU state
|
|
|
|
// can be NULL; can return B_UNSUPPORTED
|
2009-06-21 13:17:21 +00:00
|
|
|
virtual status_t LoadSourceCode(FunctionDebugInfo* function,
|
|
|
|
SourceCode*& _sourceCode) = 0;
|
|
|
|
// returns reference
|
2009-06-25 23:51:09 +00:00
|
|
|
virtual status_t GetStatement(FunctionDebugInfo* function,
|
|
|
|
target_addr_t address,
|
|
|
|
Statement*& _statement) = 0;
|
|
|
|
// returns reference
|
2009-07-07 20:47:39 +00:00
|
|
|
virtual status_t GetStatementForSourceLocation(
|
|
|
|
FunctionDebugInfo* function,
|
|
|
|
const SourceLocation& sourceLocation,
|
|
|
|
Statement*& _statement) = 0;
|
|
|
|
// returns reference
|
2009-06-20 17:20:49 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2009-06-27 21:09:21 +00:00
|
|
|
#endif // SPECIFIC_IMAGE_DEBUG_INFO_H
|