Make UEFI boot-platform build again
[haiku.git] / src / bin / debug / profile / Image.h
blobd9c61e157f9542e2fae9950dd34e1bdf6b171069
1 /*
2 * Copyright 2008, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Distributed under the terms of the MIT License.
4 */
5 #ifndef IMAGE_H
6 #define IMAGE_H
8 #include "SharedImage.h"
11 class Image : public BReferenceable {
12 public:
13 Image(SharedImage* image,
14 const image_info& info, team_id owner,
15 int32 creationEvent);
16 ~Image();
18 inline SharedImage* GetSharedImage() const { return fImage; }
20 inline const image_id ID() const;
21 inline const char* Name() const;
22 inline team_id Owner() const;
23 inline addr_t LoadDelta() const { return fLoadDelta; }
25 inline int32 CreationEvent() const;
26 inline int32 DeletionEvent() const;
27 inline void SetDeletionEvent(int32 event);
29 inline Symbol** Symbols() const;
30 inline int32 SymbolCount() const;
32 inline bool ContainsAddress(addr_t address) const;
33 inline int32 FindSymbol(addr_t address) const;
35 private:
36 SharedImage* fImage;
37 image_id fID;
38 team_id fOwner;
39 addr_t fLoadDelta;
40 int32 fCreationEvent;
41 int32 fDeletionEvent;
45 // #pragma mark -
48 const image_id
49 Image::ID() const
51 return fID;
55 const char*
56 Image::Name() const
58 return fImage->Name();
62 team_id
63 Image::Owner() const
65 return fOwner;
69 int32
70 Image::CreationEvent() const
72 return fCreationEvent;
76 int32
77 Image::DeletionEvent() const
79 return fDeletionEvent;
83 void
84 Image::SetDeletionEvent(int32 event)
86 fDeletionEvent = event;
90 Symbol**
91 Image::Symbols() const
93 return fImage->Symbols();
97 int32
98 Image::SymbolCount() const
100 return fImage->SymbolCount();
104 bool
105 Image::ContainsAddress(addr_t address) const
107 return fImage->ContainsAddress(address - fLoadDelta);
111 int32
112 Image::FindSymbol(addr_t address) const
114 return fImage->FindSymbol(address - fLoadDelta);
118 #endif // IMAGE_H