[asterisk-dev] GCC compiler flags

Alex Balashov abalashov at evaristesys.com
Mon Dec 3 23:17:02 CST 2007


Igor,

GCC optimisation options strip out a lot of symbol table data used for
debugging backtraces and so on.  Optimisation flags and debugging 
information of the variety usable in GDB are generally mutually exclusive.

-- Alex

On Tue, 4 Dec 2007, Igor A. Goncharovsky wrote:

> Hello, All!
>
> I am now debugging one issue, and found that asterisk use flag -06, when
> checked DONT_OPTIMIZE. I try to search in Google and in man, but can not
> find anything about this option. I foun only -O0 for disable any
> optimizations. Can someone help with this?
>
> Also I found, that when compiling asterisk-addons, there is always
> optimized, and in debug I can not see anything usable:
>
> ==714== Process terminating with default action of signal 11 (SIGSEGV):
> dumping core
> ==714==  Access not within mapped region at address 0x0
> ==714==    at 0x8135F18: __ast_str_helper (utils.c:1441)
> ==714==    by 0x8132F81: ast_str_set (strings.h:629)
> ==714==    by 0x6B6A347: (within
> /usr/lib/asterisk/modules/cdr_addon_mysql.so)
> ==714==    by 0x6B6AFEF: (within
> /usr/lib/asterisk/modules/cdr_addon_mysql.so)
> ==714==    by 0x80CFC1F: load_resource (loader.c:683)
> ==714==    by 0x80D05D5: load_modules (loader.c:883)
> ==714==    by 0x8079B73: main (asterisk.c:3050)
>
> How it can be fixed?
>
> -- 
> Best regards,
> Igor A. Goncharovsky
> ________________________________
> ICQ: 648337
> mailto: igi-go at ya.ru
> ________________________________
>
>
> _______________________________________________
> --Bandwidth and Colocation Provided by http://www.api-digital.com--
>
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-dev
>

--
Alex Balashov
Evariste Systems
Web    : http://www.evaristesys.com/
Tel    : +1-678-954-0670
Direct : +1-678-954-0671



More information about the asterisk-dev mailing list