This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to debug a hang process if the hung process itself is gdb !


Thanks for the quick reply. Yes tried to attach the hung gdb to a fresh gdb,
but it says the PTRACE operation is not permitted. :(

Thanks,
Santosh
 

Michael Snyder-6 wrote:
> 
> santoshp wrote:
>> Hi All,
>> I have a problem, I have a signal handler for few fatal signals e.g.
>> sigsegv, sigill etc. The handler will dump the stack trace in the log
>> when
>> those signals will be triggered using GDB in batch mode. What I do is
>> fork()
>> a process and inside the child I exec() the gdb process to capture the
>> stack
>> tarce. The command will be something like this:
>> 
>> /usr/bin/gdb <binary path> <running pid> -batch -n -x <command file>
>> 
>> cat $commandfile
>> 
>> set pagination off
>> set width 65536
>> thread apply all bt
>> detach
>> 
>> But it seems the gdb itself hung and the process attached is also hung.
>> How
>> to debug them ?
>> 
>> Is there a way to see the stack trace for hung gdb process or the running
>> process to be debugged which was attached to gdb?
>> 
>> If anybody knows of any known issues with GDB, please share.
>> 
>> GDb version: GNU gdb Red Hat Linux (6.5-37.el5_2.2rh),
>> "x86_64-redhat-linux-gnu", OS is RHEL5 running on x86_64. Please let me
>> know
>> if this is not the place to discuss this. Any help or pointer would be of
>> great help.
>> 
>> 
>> Thanks in advance.
>> 
>> Regards,
>> Santosh
>> 
> 
> Have you tried attaching a fresh gdb to the hung gdb?
> 
> 
> 
> 

-- 
View this message in context: http://old.nabble.com/How-to-debug-a-hang-process-if-the-hung-process-itself-is-gdb-%21-tp29889557p29889599.html
Sent from the Sourceware - gdb list mailing list archive at Nabble.com.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]