MCPcopy Create free account
hub / github.com/clementgallet/libTAS / eh_iterate_callback

Function eh_iterate_callback

src/external/elfhacks.cpp:77–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75}
76
77int eh_iterate_callback(struct dl_phdr_info *info, size_t size, void *argptr)
78{
79 struct eh_iterate_callback_args *args = (eh_iterate_callback_args *)argptr;
80 eh_obj_t obj;
81 int ret = 0;
82
83 /* eh_init_obj needs phdr and phnum */
84 obj.phdr = info->dlpi_phdr;
85 obj.phnum = info->dlpi_phnum;
86 obj.addr = info->dlpi_addr;
87 obj.name = info->dlpi_name;
88
89 if ((ret = eh_init_obj(&obj))) {
90 if (ret == ENOTSUP) /* just skip */
91 return 0;
92 return ret;
93 }
94
95 if ((ret = args->callback(&obj, args->arg)))
96 return ret;
97
98 if ((ret = eh_destroy_obj(&obj)))
99 return ret;
100
101 return 0;
102}
103
104int eh_iterate_obj(eh_iterate_obj_callback_func callback, void *arg)
105{

Callers

nothing calls this directly

Calls 2

eh_init_objFunction · 0.85
eh_destroy_objFunction · 0.85

Tested by

no test coverage detected