We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I want to print call stack, when a SIGSEGV happen.
void handle_signal_handler(int sig) { 243 DEBUG_INFO("get signal: %d\n", sig); 244 if (sig == SIGSEGV) { 245 dump_trace(); 246 } 247 248 re_cancel(); 249 }
In main function: 2889 EOR(re_main(handle_signal_handler));
2889 EOR(re_main(handle_signal_handler));
I think handle_signal_handler will be call by signal 2(SIGINT), not signal 11(SIGSEGV).
This is why? Thank you.
The text was updated successfully, but these errors were encountered:
printing the call stack should be done with a debugger like gdb or lldb.
if you want to print the call stack in your program, you can try the backtrace function:
backtrace
http://man7.org/linux/man-pages/man3/backtrace.3.html
Alfred
Sorry, something went wrong.
No branches or pull requests
I want to print call stack, when a SIGSEGV happen.
In main function:
2889 EOR(re_main(handle_signal_handler));
I think handle_signal_handler will be call by signal 2(SIGINT), not signal 11(SIGSEGV).
This is why? Thank you.
The text was updated successfully, but these errors were encountered: