2 * Copyright 2012, Rene Gollent, rene@gollent.com.
3 * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
4 * Distributed under the terms of the MIT License.
6 #ifndef DWARF_STACK_FRAME_DEBUG_INFO_H
7 #define DWARF_STACK_FRAME_DEBUG_INFO_H
13 #include "StackFrameDebugInfo.h"
16 class CompilationUnit
;
18 class DIEFormalParameter
;
23 class DwarfTargetInterface
;
24 class DwarfTypeContext
;
25 class DwarfTypeFactory
;
27 class GlobalTypeCache
;
28 class GlobalTypeLookup
;
29 class LocationDescription
;
35 class DwarfStackFrameDebugInfo
: public StackFrameDebugInfo
{
37 DwarfStackFrameDebugInfo(
38 Architecture
* architecture
,
39 image_id imageID
, DwarfFile
* file
,
40 CompilationUnit
* compilationUnit
,
41 DIESubprogram
* subprogramEntry
,
42 GlobalTypeLookup
* typeLookup
,
43 GlobalTypeCache
* typeCache
,
44 target_addr_t instructionPointer
,
45 target_addr_t framePointer
,
46 target_addr_t relocationDelta
,
47 DwarfTargetInterface
* targetInterface
,
48 RegisterMap
* fromDwarfRegisterMap
);
49 ~DwarfStackFrameDebugInfo();
53 status_t
CreateParameter(FunctionID
* functionID
,
54 DIEFormalParameter
* parameterEntry
,
55 Variable
*& _parameter
);
57 status_t
CreateLocalVariable(FunctionID
* functionID
,
58 DIEVariable
* variableEntry
,
59 Variable
*& _variable
);
61 status_t
CreateReturnValue(FunctionID
* functionID
,
63 ValueLocation
* location
,
65 Variable
*& _variable
);
69 struct DwarfFunctionParameterID
;
70 struct DwarfLocalVariableID
;
71 struct DwarfReturnValueID
;
74 status_t
_CreateVariable(ObjectID
* id
,
75 const BString
& name
, DIEType
* typeEntry
,
76 LocationDescription
* locationDescription
,
77 Variable
*& _variable
);
79 template<typename EntryType
>
80 static DIEType
* _GetDIEType(EntryType
* entry
);
83 DwarfTypeContext
* fTypeContext
;
84 GlobalTypeLookup
* fTypeLookup
;
85 GlobalTypeCache
* fTypeCache
;
86 DwarfTypeFactory
* fTypeFactory
;
90 #endif // DWARF_STACK_FRAME_DEBUG_INFO_H