blob: f9a12736bf9e6afbf5b11b6dcfb75ead1fc2c7fa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
//===-- NameToDIE.h ---------------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#ifndef SymbolFileDWARF_NameToDIE_h_
#define SymbolFileDWARF_NameToDIE_h_
#include "lldb/Core/UniqueCStringMap.h"
#include <functional>
#include "lldb/lldb-defines.h"
class SymbolFileDWARF;
typedef std::vector<uint32_t> DIEArray;
class NameToDIE
{
public:
NameToDIE () :
m_map()
{
}
~NameToDIE ()
{
}
void
Dump (lldb_private::Stream *s);
void
Insert (const lldb_private::ConstString& name, uint32_t die_offset);
void
Finalize();
size_t
Find (const lldb_private::ConstString &name,
DIEArray &info_array) const;
size_t
Find (const lldb_private::RegularExpression& regex,
DIEArray &info_array) const;
size_t
FindAllEntriesForCompileUnit (uint32_t cu_offset,
uint32_t cu_end_offset,
DIEArray &info_array) const;
void
ForEach (std::function <bool(const char *name, uint32_t die_offset)> const &callback) const;
protected:
lldb_private::UniqueCStringMap<uint32_t> m_map;
};
#endif // SymbolFileDWARF_NameToDIE_h_
|