Re: [WAY OT] how to gdb a running process *non-intrusively*??

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

 



On Thu, 2008-04-17 at 03:25 -0700, Robert P. J. Day wrote:
> sorry for the massively OT post but it's 3:30 am where i am, and i'd
> like to figure this out in the next hour or two.  how can i use "gdb"
> to debug a currently running process *non-intrusively* -- i.e.,
> without attaching to it which causes it to stop, even briefly?  i
> could have sworn there was a way to do that, but my memory is failing
> me at the moment.

AFAIK the only possible way of doing it is:

$ gdb /path/to/prog --pid=$(pgrep prog_name) --eval-command=cont

> 
>   assume i have a symbol-laden copy of the executable, and that all i
> want to do is, in real time, print variable contents as the process
> continues to run with no interference of the process itself.  thanks
> muchly.

... Here's the problem.
If you want gdb to actually do some work (evaluate something, etc),
you'll need to interrupt (Ctrl-C), and suspend the running process.

I don't believe I ever saw a debugger that was capable of passively
evaluating symbols on the fly without suspending the debugged process.
(Plus, an active process will most likely change stack frames making it
impossible to evaluate non-global symbols)

> 
> rday
> --

- Gilboa

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux