| 10 | namespace LIEF::dsc::py { |
| 11 | template<> |
| 12 | void create<dsc::SubCache>(nb::module_& m) { |
| 13 | nb::class_<dsc::SubCache> obj(m, "SubCache", |
| 14 | R"doc( |
| 15 | This class represents a subcache in the case of large/split dyld shared |
| 16 | cache. |
| 17 | |
| 18 | It mirror (and abstracts) the original ``dyld_subcache_entry`` / ``dyld_subcache_entry_v1`` |
| 19 | )doc"_doc |
| 20 | ); |
| 21 | |
| 22 | obj |
| 23 | .def_prop_ro("uuid", &SubCache::uuid, |
| 24 | R"doc(The uuid of the subcache file)doc"_doc |
| 25 | ) |
| 26 | .def_prop_ro("vm_offset", &SubCache::vm_offset, |
| 27 | R"doc(The offset of this subcache from the main cache base address)doc"_doc |
| 28 | ) |
| 29 | .def_prop_ro("suffix", &SubCache::suffix, |
| 30 | R"doc( |
| 31 | The file name suffix of the subCache file |
| 32 | (e.g. ``.25.data``, ``.03.development``) |
| 33 | )doc"_doc |
| 34 | ) |
| 35 | .def_prop_ro("cache", [] (const SubCache& self) { |
| 36 | return std::unique_ptr<DyldSharedCache>(const_cast<DyldSharedCache*>(self.cache().release())); |
| 37 | }, |
| 38 | R"doc( |
| 39 | The associated :class:`~.DyldSharedCache` object for this subcache |
| 40 | )doc"_doc |
| 41 | ) |
| 42 | ; |
| 43 | } |
| 44 | } |