LIEF: Library to Instrument Executable Formats
Version 2.0.0
Toggle main menu visibility
Loading...
Searching...
No Matches
lief-install
x86_64
static
include
LIEF
DWARF
Scope.hpp
Go to the documentation of this file.
1
/* Copyright 2022 - 2026 R. Thomas
2
*
3
* Licensed under the Apache License, Version 2.0 (the "License");
4
* you may not use this file except in compliance with the License.
5
* You may obtain a copy of the License at
6
*
7
* http://www.apache.org/licenses/LICENSE-2.0
8
*
9
* Unless required by applicable law or agreed to in writing, software
10
* distributed under the License is distributed on an "AS IS" BASIS,
11
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
* See the License for the specific language governing permissions and
13
* limitations under the License.
14
*/
15
#ifndef LIEF_DWARF_SCOPE_H
16
#define LIEF_DWARF_SCOPE_H
17
18
#include <string_view>
19
#include <cstdint>
20
#include <memory>
21
#include <string>
22
23
#include "
LIEF/compiler_attributes.hpp
"
24
#include "
LIEF/visibility.h
"
25
26
27
namespace
LIEF::dwarf
{
28
29
namespace
details
{
30
class
Scope;
31
}
32
35
class
LIEF_API
Scope
{
36
public
:
37
enum class
TYPE
: uint32_t {
38
UNKNOWN = 0,
39
UNION,
40
CLASS,
41
STRUCT,
42
NAMESPACE,
43
FUNCTION,
44
COMPILATION_UNIT,
45
};
46
Scope
(std::unique_ptr<details::Scope> impl);
47
49
std::string_view
name
() const
LIEF_LIFETIMEBOUND
;
50
52
std::unique_ptr<
Scope
>
parent
() const
LIEF_LIFETIMEBOUND
;
53
55
TYPE
type
() const;
56
59
std::
string
chained
(std::string_view sep =
"::"
) const;
60
61
~
Scope
();
62
63
private:
64
std::unique_ptr<
details
::
Scope
> impl_;
65
};
66
67
}
68
69
#endif
LIEF::dwarf::Scope::name
std::string_view name() const
Name of the scope. For instance namespace's name or function's name.
LIEF::dwarf::Scope::type
TYPE type() const
The current scope type.
LIEF::dwarf::Scope::parent
std::unique_ptr< Scope > parent() const
Parent scope (if any).
LIEF::dwarf::Scope::chained
std::string chained(std::string_view sep="::") const
Represent the whole chain of all (parent) scopes using the provided separator. E.g....
LIEF::dwarf::Scope::TYPE
TYPE
Definition
Scope.hpp:37
LIEF::dwarf::Scope::Scope
Scope(std::unique_ptr< details::Scope > impl)
compiler_attributes.hpp
LIEF_LIFETIMEBOUND
#define LIEF_LIFETIMEBOUND
Definition
compiler_attributes.hpp:72
LIEF::dwarf::details
Definition
DWARF/CompilationUnit.hpp:33
LIEF::dwarf
Namespace for the DWARF debug format.
Definition
DWARF/CompilationUnit.hpp:31
visibility.h
LIEF_API
#define LIEF_API
Definition
visibility.h:45
Generated by
1.19.0