pbx2.offphl> gdb asterisk GNU gdb (GDB) 7.0.1-debian Copyright (C) 2009 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "sparc-linux-gnu". For bug reporting instructions, please see: ... Reading symbols from /usr/sbin/asterisk...done. (gdb) break main Breakpoint 1 at 0x5b92c: file asterisk.c, line 3361. (gdb) run -r Starting program: /usr/sbin/asterisk -r [Thread debugging using libthread_db enabled] Breakpoint 1, main (argc=2, argv=0xffffd964) at asterisk.c:3361 3361 char filename[80] = ""; (gdb) next 3362 char hostname[MAXHOSTNAMELEN] = ""; (gdb) 3364 char * xarg = NULL; (gdb) 3369 int isroot = 1, rundir_exists = 0; (gdb) 3371 const char *runuser = NULL, *rungroup = NULL; (gdb) 3372 char *remotesock = NULL; (gdb) 3377 if (argc > ARRAY_LEN(_argv) - 1) { (gdb) 3381 for (x = 0; x < argc; x++) (gdb) 3382 _argv[x] = argv[x]; (gdb) 3381 for (x = 0; x < argc; x++) (gdb) 3382 _argv[x] = argv[x]; (gdb) 3381 for (x = 0; x < argc; x++) (gdb) 3383 _argv[x] = NULL; (gdb) 3385 if (geteuid() != 0) (gdb) 3389 if (argv[0] && (strstr(argv[0], "rasterisk")) != NULL) { (gdb) 3392 if (gethostname(hostname, sizeof(hostname)-1)) (gdb) 3394 ast_mainpid = getpid(); (gdb) 3396 if (getenv("HOME")) (gdb) 3397 snprintf(filename, sizeof(filename), "%s/.asterisk_history", getenv("HOME")); (gdb) 3399 while ((c = getopt(argc, argv, "BC:cde:FfG:ghIiL:M:mnpqRrs:TtU:VvWXx:")) != -1) { (gdb) 3403 switch (c) { (gdb) 3478 ast_set_flag(&ast_options, AST_OPT_FLAG_NO_FORK | AST_OPT_FLAG_REMOTE); (gdb) 3479 break; (gdb) 3399 while ((c = getopt(argc, argv, "BC:cde:FfG:ghIiL:M:mnpqRrs:TtU:VvWXx:")) != -1) { (gdb) 3518 if (ast_opt_remote) { (gdb) 3519 strcpy(argv[0], "rasterisk"); (gdb) 3520 for (x = 1; x < argc; x++) { (gdb) 3521 argv[x] = argv[0] + 10; (gdb) 3520 for (x = 1; x < argc; x++) { (gdb) 3525 ast_readconfig(); (gdb) 3526 env_init(); (gdb) 3528 if (ast_opt_remote && remotesock != NULL) (gdb) 3531 if (!ast_language_is_prefix && !ast_opt_remote) { (gdb) 3535 if (ast_opt_always_fork && (ast_opt_remote || ast_opt_console)) { (gdb) 3540 if (ast_opt_dump_core) { (gdb) 3541 memset(&l, 0, sizeof(l)); (gdb) 3542 l.rlim_cur = RLIM_INFINITY; (gdb) 3543 l.rlim_max = RLIM_INFINITY; (gdb) 3544 if (setrlimit(RLIMIT_CORE, &l)) { (gdb) 3549 if (getrlimit(RLIMIT_NOFILE, &l)) { (gdb) 3558 struct timeval tv = { 0, }; (gdb) 3560 if (l.rlim_cur <= FD_SETSIZE) { (gdb) 3563 break; (gdb) 3591 if ((!rungroup) && !ast_strlen_zero(ast_config_AST_RUN_GROUP)) (gdb) 3593 if ((!runuser) && !ast_strlen_zero(ast_config_AST_RUN_USER)) (gdb) 3599 sigaction(SIGCHLD, &child_handler, NULL); (gdb) 3603 if (mkdir(ast_config_AST_RUN_DIR, 0755)) { (gdb) 3604 if (errno == EEXIST) { (gdb) 3605 rundir_exists = 1; (gdb) 3613 if (isroot) { (gdb) 3614 ast_set_priority(ast_opt_high_priority); (gdb) 3617 if (isroot && rungroup) { (gdb) 3637 if (runuser && !ast_test_flag(&ast_options, AST_OPT_FLAG_REMOTE)) { (gdb) 3693 if (geteuid() && ast_opt_dump_core) { (gdb) 3706 if (!getcwd(dir, sizeof(dir)) || eaccess(dir, R_OK | X_OK | F_OK)) { (gdb) 3716 if (!ast_opt_no_fork && !ast_opt_dump_core) { (gdb) 3724 if (ast_tryconnect()) { (gdb) 3743 } else if (ast_opt_remote || ast_opt_exec) { (gdb) 3744 fprintf(stderr, "Unable to connect to remote asterisk (does %s exist?)\n", ast_config_AST_SOCKET); (gdb) Unable to connect to remote asterisk (does /var/run/asterisk/asterisk.ctl exist?) 3745 printf("%s", term_quit()); (gdb) 3746 exit(1); (gdb) Program received signal SIGBUS, Bus error. 0xf7d00e78 in ?? () from /lib/libc.so.6 (gdb) Cannot find bounds of current function (gdb)