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.
6 #ifndef SPECIFIC_IMAGE_DEBUG_INFO_H
7 #define SPECIFIC_IMAGE_DEBUG_INFO_H
10 #include <ObjectList.h>
11 #include <Referenceable.h>
13 #include "AddressSectionTypes.h"
14 #include "ReturnValueInfo.h"
22 class DebuggerInterface
;
24 class FunctionDebugInfo
;
25 class FunctionInstance
;
26 class GlobalTypeCache
;
36 class TypeLookupConstraints
;
40 class SpecificImageDebugInfo
: public BReferenceable
{
42 virtual ~SpecificImageDebugInfo();
44 virtual status_t
GetFunctions(
45 const BObjectList
<SymbolInfo
>& symbols
,
46 BObjectList
<FunctionDebugInfo
>& functions
)
50 virtual status_t
GetType(GlobalTypeCache
* cache
,
52 const TypeLookupConstraints
& constraints
,
54 // returns a reference
55 virtual bool HasType(const BString
& name
,
56 const TypeLookupConstraints
& constraints
)
59 virtual AddressSectionType
GetAddressSectionType(target_addr_t address
)
62 virtual status_t
CreateFrame(Image
* image
,
63 FunctionInstance
* functionInstance
,
65 bool getFullFrameInfo
,
66 ReturnValueInfoList
* returnValueInfos
,
68 CpuState
*& _previousCpuState
) = 0;
69 // returns reference to previous frame
70 // and CPU state; returned CPU state
71 // can be NULL; can return B_UNSUPPORTED
72 // getFullFrameInfo: try to retrieve
73 // variables/parameters if true
75 virtual status_t
GetStatement(FunctionDebugInfo
* function
,
76 target_addr_t address
,
77 Statement
*& _statement
) = 0;
79 virtual status_t
GetStatementAtSourceLocation(
80 FunctionDebugInfo
* function
,
81 const SourceLocation
& sourceLocation
,
82 Statement
*& _statement
) = 0;
85 virtual status_t
GetSourceLanguage(FunctionDebugInfo
* function
,
86 SourceLanguage
*& _language
) = 0;
88 virtual ssize_t
ReadCode(target_addr_t address
, void* buffer
,
91 virtual status_t
AddSourceCodeInfo(LocatableFile
* file
,
92 FileSourceCode
* sourceCode
) = 0;
95 static status_t
GetFunctionsFromSymbols(
96 const BObjectList
<SymbolInfo
>& symbols
,
97 BObjectList
<FunctionDebugInfo
>& functions
,
98 DebuggerInterface
* interface
,
99 const ImageInfo
& imageInfo
,
100 SpecificImageDebugInfo
* info
);
105 #endif // SPECIFIC_IMAGE_DEBUG_INFO_H