Closed Spongman closed 3 years ago
Yep, there's no way to do that.
Compilers can inline, split or not inline functions. Compilers treat inline
, force_inline
and no_inline
as hints and sometimes ignore them. There's no nice way to sync get_stacktrace_depth()
and safe_dump_to
.
I'm planning to less advertise safe_dump_to
in next revisions of stacktrace library.
how is one supposed to query for the required buffer size for a call to
safe_dump_to(void*,size_t)
? the only way i can think of to do this right now is to keep calling it repeatedly with an increasing buffer size until the return value stops changing.please don't say 'just choose some random constant value'...