Re: RE: How to debug a daemon during its initialization :: gdb

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Shriek

> >  I need to use gdb to check some initialization functions which are
> > called  during the time when the daemon is stopped and restarted ... 

I think you took the wrong place asking this on kernel oriented mailing 
list, however I'll try to share ideas:
- every debugger will surely get detached from its debugee if the 
debugee exits. Thus all you need to do it reconnect gdb to the target 
PID. Perhaps a shell script can automate this for you..

-  Hermant suggested strace...while I suggest you ltrace. Please read 
the manuals to know the difference and how to use it.

- Another way to trace it is by doing static binary analysis. IMHO, as 
long as the symbol table is still complete (not stripped and just 
leaving dynamic symbol), you can manually check the call trace. Another 
alternative is by using elfsh together with modflow and graph the 
result with graphviz or any other similar graphing tool.

Good luck...

regards,

Mulyadi



--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux