Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any function in musl like "backtrace" in glibc

I'm trying to translate my code from centos to Alpine-docker , but Alpine really lack of some functions, like "backtrace" "pthread_rwlockattr_setkind_np" etc.. How could I use them in Alpine or are there any functions instead?

like image 276
st_fj Avatar asked Dec 22 '25 00:12

st_fj


1 Answers

musl does not provide backtrace.

You may use an external libexecinfo library to provide it. It was created exactly for the purpose of porting programs requiring glibc backtrace facility.

like image 175
smokku Avatar answered Dec 24 '25 10:12

smokku