Re: multithreaded debugging
- From: "Mauro de Gennaro" <mdegennaro@xxxxxxxxxxxxx>
- Date: Tue, 31 Jan 2006 13:32:56 +0100
Thanks for your answer.
Real world is a bit more complex. WaitForSingleObject time out is not a
constant because it depends on "field" conditions and on other threads
status; it is not a problem to set time out to INFINITE for debugging
reasons but two questions arise:
1 - why does debugger suspend all threads? In EVC3 only the break"ed" one
was stopped; i wonder if are there any way to avoid this. Changing time out
to INFINITE works around the problem without solve it because the real time
threads are resumed but, cause their inactivities, they don't work well
anymore.
2 - if debugger suspend all threads why doesn't it suspend time out
computation too?
Mauro
"Voidcoder" <voidcoder@xxxxxxxxx> ha scritto nel messaggio
news:OPJ3TPlJGHA.2088@xxxxxxxxxxxxxxxxxxxxxxx
> Hm, are you sure the timeout period you are passing to
> WaitForSingleObject hasn't expired? Does it show
> the same behavior on INFINITE timeout?
>
>
> "Mauro de Gennaro" <mdegennaro@xxxxxxxxxxxxx> wrote in message
> news:uQW%23lFlJGHA.3064@xxxxxxxxxxxxxxxxxxxxxxx
>> WaitForSingleObject(SomeEvent) returns WAIT_TIMEOUT after pressing F5 to
>> exit from breakpoint in Nr.3.
>>
>> Mauro
>>
>>
>> "Voidcoder" <voidcoder@xxxxxxxxx> ha scritto nel messaggio
>> news:uxEQeqkJGHA.3144@xxxxxxxxxxxxxxxxxxxxxxx
>>> Not very clear, though. Do you mean WaitForSingleObject(SomeEvent)
>>> in Nr.2 returns WAIT_TIMEOUT when you stop at breakpoint in Nr.3?
>>>
>>>
>>>
"Valter Minute" <vminute@xxxxxxxxxxxxxxxxxxxxx> ha scritto nel messaggio
news:Xns975C779EE9A42VALTERMINUTE@xxxxxxxxxxxxxxxx
> "Mauro de Gennaro" <mdegennaro@xxxxxxxxxxxxx> wrote in
> news:uQW#lFlJGHA.3064@xxxxxxxxxxxxxxxxxxxx:
>
>> WaitForSingleObject(SomeEvent) returns WAIT_TIMEOUT after pressing
>> F5 to exit from breakpoint in Nr.3.
>>
>
> This happens if step-by-step debugging of other threads took too
> long.
> You may use a #define to set the timeout interval as a preprocessor
> constant and convert it to INFINITE (or a longer time) when _DEBUG is
> defined or when you #define a specific preprocessor symbol that will
> enable step-by-step debugging mode in your application.
> Something like:
>
> #ifdef STEP_BY_STEP_DEBUG
> #define THREAD_3_TIMEOUT 500
> #else
> #define THREAD_3_TIMEOUT INFINITE
> #endif
>
> If you use timeouts in Wait* calls to handle unexpected locks of
> other threads, changing it's behaviour to an infinite wait should not
> change your application behaviour and will allow you to perform step-
> by-step debugging on another thread.
>
> --
> Valter Minute
> (the reply address of this message is invalid)
> (l'indirizzo di reply di questo messaggio non è valido)
.
- Follow-Ups:
- Re: multithreaded debugging
- From: <ctacke/>
- Re: multithreaded debugging
- References:
- multithreaded debugging
- From: Mauro de Gennaro
- Re: multithreaded debugging
- From: Voidcoder
- Re: multithreaded debugging
- From: Mauro de Gennaro
- Re: multithreaded debugging
- From: Valter Minute
- multithreaded debugging
- Prev by Date: connmgr.exe
- Next by Date: Network bridging and Internet Connection sharing
- Previous by thread: Re: multithreaded debugging
- Next by thread: Re: multithreaded debugging
- Index(es):
Relevant Pages
|