1/*
2 * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
3 * Copyright 2014, Rene Gollent, rene@gollent.com.
4 * Distributed under the terms of the MIT License.
5 */
6#ifndef DWARF_MANAGER_H
7#define DWARF_MANAGER_H
8
9#include <Locker.h>
10
11#include <util/DoublyLinkedList.h>
12
13
14class DwarfFile;
15struct DwarfFileLoadingState;
16
17
18class DwarfManager {
19public:
20								DwarfManager(uint8 addressSize);
21								~DwarfManager();
22
23			status_t			Init();
24
25			bool				Lock()		{ return fLock.Lock(); }
26			void				Unlock()	{ fLock.Unlock(); }
27
28			status_t			LoadFile(const char* fileName,
29									DwarfFileLoadingState& _loadingState);
30									// _loadingState receives a reference
31									// to the corresponding DwarfFile.
32
33			status_t			FinishLoading();
34
35private:
36			typedef DoublyLinkedList<DwarfFile> FileList;
37
38private:
39			uint8				fAddressSize;
40			BLocker				fLock;
41			FileList			fFiles;
42};
43
44
45
46#endif	// DWARF_MANAGER_H
47