MCPcopy Create free account
hub / github.com/lief-project/LIEF / Editor>

Method Editor>

api/python/src/DWARF/pyEditor.cpp:13–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11namespace LIEF::dwarf::py {
12template<>
13void create<dw::Editor>(nb::module_& m) {
14 nb::module_ m_editor = m.def_submodule("editor");
15
16 create<LIEF::dwarf::editor::Type>(m_editor);
17 create<LIEF::dwarf::editor::Function>(m_editor);
18 create<LIEF::dwarf::editor::Variable>(m_editor);
19 create<LIEF::dwarf::editor::CompilationUnit>(m_editor);
20
21 nb::class_<dw::Editor> editor(m, "Editor",
22 R"doc(
23 This class exposes the main API to create DWARF information
24 )doc"_doc
25 );
26
27 editor
28 .def_static("from_binary", &dw::Editor::from_binary,
29 "Instantiate an editor for the given binary object"_doc,
30 "bin"_a
31 )
32 .def("create_compilation_unit", &dw::Editor::create_compilation_unit,
33 "Create a new compilation unit"_doc
34 )
35 .def("write", [] (dw::Editor& self, nb::PathLike path) {
36 self.write(path);
37 },
38 "Write the DWARF file to the specified output"_doc,
39 "output"_a
40 )
41 ;
42
43}
44
45}

Callers

nothing calls this directly

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected