2 * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Distributed under the terms of the MIT License.
10 #include <Referenceable.h>
11 #include <util/DoublyLinkedList.h>
13 #include "ImageInfo.h"
16 enum image_debug_info_state
{
17 IMAGE_DEBUG_INFO_NOT_LOADED
,
18 IMAGE_DEBUG_INFO_LOADING
,
19 IMAGE_DEBUG_INFO_LOADED
,
20 IMAGE_DEBUG_INFO_UNAVAILABLE
29 class Image
: public BReferenceable
, public DoublyLinkedListLinkImpl
<Image
> {
31 Image(Team
* team
, const ImageInfo
& imageInfo
,
32 LocatableFile
* imageFile
);
37 Team
* GetTeam() const { return fTeam
; }
38 image_id
ID() const { return fInfo
.ImageID(); }
39 const BString
& Name() const { return fInfo
.Name(); }
40 const ImageInfo
& Info() const { return fInfo
; }
41 image_type
Type() const { return fInfo
.Type(); }
42 LocatableFile
* ImageFile() const { return fImageFile
; }
44 bool ContainsAddress(target_addr_t address
) const;
46 // mutable attributes follow (locking required)
47 ImageDebugInfo
* GetImageDebugInfo() const { return fDebugInfo
; }
48 image_debug_info_state
ImageDebugInfoState() const
49 { return fDebugInfoState
; }
50 status_t
SetImageDebugInfo(ImageDebugInfo
* debugInfo
,
51 image_debug_info_state state
);
56 LocatableFile
* fImageFile
;
58 ImageDebugInfo
* fDebugInfo
;
59 image_debug_info_state fDebugInfoState
;
63 typedef DoublyLinkedList
<Image
> ImageList
;