xref: /haiku/src/kits/debugger/debug_info/DwarfFunctionDebugInfo.h (revision faf79e7f783976326856422ff006b4c6ae9c3031)
1 /*
2  * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
3  * Distributed under the terms of the MIT License.
4  */
5 #ifndef DWARF_FUNCTION_DEBUG_INFO_H
6 #define DWARF_FUNCTION_DEBUG_INFO_H
7 
8 #include <String.h>
9 
10 #include "FunctionDebugInfo.h"
11 #include "SourceLocation.h"
12 
13 
14 class CompilationUnit;
15 class DIESubprogram;
16 class DwarfImageDebugInfo;
17 class TargetAddressRangeList;
18 
19 
20 class DwarfFunctionDebugInfo : public FunctionDebugInfo {
21 public:
22 								DwarfFunctionDebugInfo(
23 									DwarfImageDebugInfo* imageDebugInfo,
24 									CompilationUnit* compilationUnit,
25 									DIESubprogram* subprogramEntry,
26 									TargetAddressRangeList* addressRanges,
27 									const BString& name,
28 									LocatableFile* sourceFile,
29 									const SourceLocation& sourceLocation);
30 	virtual						~DwarfFunctionDebugInfo();
31 
32 	virtual	SpecificImageDebugInfo* GetSpecificImageDebugInfo() const;
33 	virtual	target_addr_t		Address() const;
34 	virtual	target_size_t		Size() const;
35 	virtual	const BString&		Name() const;
36 	virtual	const BString&		PrettyName() const;
37 
38 	virtual	bool				IsMain() const;
39 
40 	virtual	LocatableFile*		SourceFile() const;
41 	virtual	SourceLocation		SourceStartLocation() const;
42 	virtual	SourceLocation		SourceEndLocation() const;
43 
44 			CompilationUnit*	GetCompilationUnit() const
45 									{ return fCompilationUnit; }
46 			DIESubprogram*		SubprogramEntry() const
47 									{ return fSubprogramEntry; }
48 
49 private:
50 			DwarfImageDebugInfo* fImageDebugInfo;
51 			CompilationUnit*	fCompilationUnit;
52 			DIESubprogram*		fSubprogramEntry;
53 			TargetAddressRangeList* fAddressRanges;
54 			BString				fName;
55 			LocatableFile*		fSourceFile;
56 			SourceLocation		fSourceLocation;
57 };
58 
59 
60 #endif	// DWARF_FUNCTION_DEBUG_INFO_H
61