2 * Copyright 2008-2009, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Distributed under the terms of the MIT License.
12 #include "Referenceable.h"
15 class debug_symbol_iterator
;
16 class debug_symbol_lookup_context
;
22 Symbol(SharedImage
* image
, addr_t base
, size_t size
, const char* name
)
31 const char* Name() const { return name
.String(); }
40 struct SymbolComparator
{
41 inline bool operator()(const Symbol
* a
, const Symbol
* b
) const
43 return a
->base
< b
->base
;
48 class SharedImage
: public BReferenceable
{
53 status_t
Init(team_id owner
, image_id imageID
);
54 status_t
Init(const char* path
);
56 inline const char* Name() const;
57 inline const image_info
& Info() const;
59 inline Symbol
** Symbols() const;
60 inline int32
SymbolCount() const;
62 inline bool ContainsAddress(addr_t address
) const;
63 int32
FindSymbol(addr_t address
) const;
66 status_t
_Init(debug_symbol_iterator
* iterator
);
79 SharedImage::Name() const
86 SharedImage::Info() const
93 SharedImage::Symbols() const
100 SharedImage::SymbolCount() const
107 SharedImage::ContainsAddress(addr_t address
) const
109 return address
>= (addr_t
)fInfo
.text
110 && address
<= (addr_t
)fInfo
.data
+ fInfo
.data_size
- 1;
114 #endif // SHARED_IMAGE_H