mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Kernel: Support grab backtrace stack when assert fail. v5.0.80
This commit is contained in:
parent
5a1a234855
commit
e10fa6dc91
19 changed files with 183 additions and 7 deletions
|
@ -37,6 +37,9 @@ SrsServer* _srs_server = NULL;
|
|||
bool _srs_in_docker = false;
|
||||
bool _srs_config_by_env = false;
|
||||
|
||||
// The binary name of SRS.
|
||||
const char* _srs_binary = NULL;
|
||||
|
||||
#include <srs_app_st.hpp>
|
||||
|
||||
// Initialize global settings.
|
||||
|
@ -83,6 +86,8 @@ srs_error_t prepare_main() {
|
|||
GTEST_API_ int main(int argc, char **argv) {
|
||||
srs_error_t err = srs_success;
|
||||
|
||||
_srs_binary = argv[0];
|
||||
|
||||
if ((err = prepare_main()) != srs_success) {
|
||||
fprintf(stderr, "Failed, %s\n", srs_error_desc(err).c_str());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue