LWN.net Logo

Advertisement

E-Commerce & credit card processing - the Open Source way!

Advertise here

CLI Magic: Linux troubleshooting tools 101 (Linux.com)

CLI Magic: Linux troubleshooting tools 101 (Linux.com)

Posted Feb 20, 2007 14:46 UTC (Tue) by foo (guest, #1117)
In reply to: CLI Magic: Linux troubleshooting tools 101 (Linux.com) by donio
Parent article: CLI Magic: Linux troubleshooting tools 101 (Linux.com)

Exactly. If you give gdb a second argument that's not
a core file, he'll interpret it as a PID and attach
to it. When you exit gdb, he detaches and everything's
copacetic.

If you just want to see where a process is spending time,
doing an "strace -p PID" can attach to a running process,
and later detaches properly with a Ctrl-C.

And to be fair with the comment above, I'm sure you can do
the same thing under Windows, if you have a debugger
installed.


(Log in to post comments)

Copyright © 2008, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds
Powered by Rackspace Managed Hosting.