Hi Manish,
Does the problem you see, happen under load conditions, i.e. whatever
you application is doing, I assume it to be some kind of a
event-driven-system. So the condition under which you see the problem,
does it happen under multiple events occuring in a short span of time ?
If not, then I'd suggest you go back to the age-old (most primitive)
form of debugging, i.e. with traces / logs. If it is indeed occuring
under load conditions, unfortunately, the volume of traces/logs might be
overwhelming (not only to the person debugging, but also to the
FileSystem :) ).
My 2 cents,
Banibrata
Message
From: owner-hpux-devtools (AT) cxx (DOT) cup.hp.com
[mailto:owner-hpux-devtools (AT) cxx (DOT) cup.hp.com] Behalf Wood, John
(Partner Tech Svcs)
Sent: Thursday, February 01, 2007 3:34 AM
To: Dmitry Mikulin; Manish Katiyar
Cc: hpux-devtools (AT) cxx (DOT) cup.hp.com
Subject: RE: HPUX-DEVTLS: Debug multithreaded application
>>You can set a breakpoint at pthread_exit()
Would this work for a thread that does not explicitly call
pthread_exit()?
E.g. if a thread terminated it's start-routine by saying "return
<someValue>", does pthread_exit() get implicitly called?
I've seen thread-specific data used such that when a thread terminates,
the user-specified destructor routine for the thread-specific data is
called, which you could set a break-point on. This isn't an elegant
solution - e.g. it requires source-code modification, but I thought I'd
offer it as a suggestion. See pthread_key_create() &
pthread_set_specific().
JW
Message
From: owner-hpux-devtools (AT) cxx (DOT) cup.hp.com
[mailto:owner-hpux-devtools (AT) cxx (DOT) cup.hp.com] Behalf Dmitry Mikulin
Sent: 31 January 2007 20:54
To: Manish Katiyar
Cc: hpux-devtools (AT) cxx (DOT) cup.hp.com
Subject: Re: HPUX-DEVTLS: Debug multithreaded application
You can set a breakpoint at pthread_exit() and trace all terminating
threads. Gdb "thread" command will tell you the current thread id when
the breakpoint is hit. Currently I don't think there is a way to set a
breakpoint to detect termination of a particular thread.
Dmitry.
Manish Katiyar wrote:
Hi,
I am debugging a big multithreaded application. My one of the threads
while trying to send a signal to another thread gets the error value
as ESRCH, which means that it could not find that thread id.
>>From the stacks i could find that everytime it is the same thread id
>>(as
assigned internally by gdb).
Is it possible to set some kind of breakpoint so that i can stop and
check why my target thread died before sending the signal. Restating
again i want to stop just before the first thread dies
Is there any thread command for thisi am working on itanium
11.23.
Thanks in advance
To leave this mailing list, send mail to majordomo (AT) cxx (DOT) cup.hp.com
with the message UNSUBSCRIBE hpux-devtools
To leave this mailing list, send mail to majordomo (AT) cxx (DOT) cup.hp.com
with the message UNSUBSCRIBE hpux-devtools
To leave this mailing list, send mail to majordomo (AT) cxx (DOT) cup.hp.com
with the message UNSUBSCRIBE hpux-devtools