Pergunta

Rather bizarrely the hpux unwind API _UNW_STACK_TRACE doesn't take a file descriptor, but instead takes a FILE*. The newer API uwx_stack_trace also takes a FILE*.

With both of these using buffered IO and not (signal safe IO interfaces) open/write/close, neither of these can safely be used in a signal handler (one of the most obvious places where one would wish to do so).

On one of our (probably now dead) ia64 platforms, we once had our own unwind implementation, but it was a beast to maintain and flaky, so I don't want to go down that route again. Are there any other options for HPUX stack unwind?

Foi útil?

Solução

I found the hpux documentation that details their stackwalk iterator interfaces. Unfortunately, and somewhat unbelievably, trying this out in the debugger shows that it's busted in a signal context too (uwx_init calls malloc!)

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top