36 void winpr_execinfo_backtrace_free(
void* buffer)
38 t_execinfo* data = (t_execinfo*)buffer;
46 void* winpr_execinfo_backtrace(DWORD size)
48 t_execinfo* data = calloc(1,
sizeof(t_execinfo));
53 data->buffer = calloc(size,
sizeof(
void*));
61 assert(size <= INT32_MAX);
62 const int rc = backtrace(data->buffer, (
int)size);
69 data->used = (size_t)rc;
73 char** winpr_execinfo_backtrace_symbols(
void* buffer,
size_t* used)
75 t_execinfo* data = (t_execinfo*)buffer;
85 assert(data->used < INT32_MAX);
86 return backtrace_symbols(data->buffer, (
int)data->used);
89 void winpr_execinfo_backtrace_symbols_fd(
void* buffer,
int fd)
91 t_execinfo* data = (t_execinfo*)buffer;
96 assert(data->used <= INT32_MAX);
97 backtrace_symbols_fd(data->buffer, (
int)data->used, fd);