开发者

Is it possible to attach to an already running gdb process?

开发者 https://www.devze.com 2023-02-18 13:36 出处:网络
Good morning, I started a gdb debug 开发者_StackOverflow社区session several hours ago. Is possible to use gdb to attach to a process already being debugged by gdb?

Good morning, I started a gdb debug 开发者_StackOverflow社区session several hours ago. Is possible to use gdb to attach to a process already being debugged by gdb?

I tried to attach as root but I get the following error message:

[root@localhost lirh5g_deb]# gdb ./MatchUpAccurate.exe  12327
ptrace: Operation not permitted.
/home/frank/DQT/MatchUpTest/lirh5g_deb/12327: No such file or directory.

We are using Centos Linux Version 5.5. Thank you.


Unfortunately, not directly. Your only option, if you didn't use screen/tmux, is to search for a tty hijacker (it's possible to "steal" tty's - this is an ugly solution though) and grab the tty which has your existing gdb session

0

精彩评论

暂无评论...
验证码 换一张
取 消