You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modules-dev@httpd.apache.org by wangyz <wa...@tongtech.com> on 2008/02/29 10:14:16 UTC

Re: [邮件隔离]Re: [可能是垃圾邮件] Re: [可能是垃圾邮件] Re: how to debug module using gdb

Pitchaimani Muthuveeran wrote:
>
> ----- Original Message ----- From: "wangyz" <wa...@tongtech.com>
> To: <mo...@httpd.apache.org>
> Sent: Friday, February 29, 2008 12:59 PM
> Subject: Re: [可能是垃圾邮件] Re: [可能是垃圾邮件] Re: how to debug
> module using gdb
>
>
>> hi meendar:
>> i am a new monkey at apache. can you give me a detail explanation
>> .thanks you
>>
>> meendar wrote:
>>> wangyz wrote:
>>>
>>>> thanks again.
>>>> I sure that i had compiled a debug version. and gdb had load the
>>>> library.
>>>>
>>>>
>>>> Jarek Kucypera wrote:
>>>>
>>>>
>>>>>> I have done as you said. start httpd within gdb.
>>>>>> but it seemed that it is not useful. i can not still step into my
>>>>>> function.
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>> Hmm, have you compiled your module with debug info ? Are you sure
>>>>> httpd
>>>>> loads your module ?
>>>>> I use gdb 6.7.1 on linux and it nicely delays setting breakpoints in
>>>>> not-yet-existing code until particuar
>>>>> shared library is loaded (i.e. when setting such breakpoint, it
>>>>> stores
>>>>> it as "unresolved" and resolves
>>>>> it while loading the library).
>>>>>
>>>>> J.K.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>>
>>> Make sure you compile with optimization level 0, that is *O0* flag in
>>> your gcc, by default apache configure_vars.mk having *O2* level.
>>>
>>>
>>>
>>>
>>
>>
>>
>>
>
>
> Do not Top Post!
>
> If you compiling your module with apxs, then change the variable
> EXTRA_CFLAGS to "-g O0 -pthread" <Apache Dist
> Dir>/build/config_vars.mk and compile again.
>
> Else if you are compiling your module along with apache, then change
> environment <ApacheSRCDir>/config_vars.mk as flag O2 to O0 in same
> variable given above and compile it.
>
> Thanks!
>
> Mani
>
>
>
>
>
>
everything is ok. after change o2 to o0 ,
thanks everyone