ChinaUnix.net
相关文章推荐:

gdb attach

gdbattach一个程序,attach上之后进程就不执行了。需要“c”继续执行。 这样在多线程里面也是这样吗?是不是所有的进程都会停了 例如 int main() { printf("#####\n"); sleep(1); return 0; } attach上就不打印了 c之后就可以

by learn007 - Linux环境编程 - 2012-06-20 10:22:35 阅读(2656) 回复(0)

相关讨论

一个程序在运行 (gdb) attach pid 我attach之后,怎么知道程序现在运行到什么地方了啊。 是不是这时候,我想让程序在什么地方停设个断点(怎么没有反应啊),然后r一下就可以了啊。 对attach调试流程,不是太清楚,请大家给解释一下吧。 还有attach的时候,我f个栈n的时候 提示(gdb) n Cannot find bounds of current function 我刚开始的时候file program 多谢了呀。 [ 本帖最后由 ruchong 于 2007-1-21 21:59 编辑 ]

by ruchong - C/C++ - 2007-01-21 21:08:06 阅读(1253) 回复(0)

root@dev:/mnt/nfs/video# ./arm-gdb ./video 793 GNU gdb 6.8 Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This gdb was configured as "arm-linu...

by pppStar - C/C++ - 2011-08-16 17:04:11 阅读(2178) 回复(0)

I am trying to use gdb on FreeBSD 7.0 but is does not seem to work using the attach option. I know this all works with the FreeBSD 4.11 machines we still have running. Is there a solution?? # ps -auxww | grep vi daryl 22044 0.0 0.1 3408 1488 qb S+ 2:34PM 0:00.00 vi xxx # gdb --quiet (gdb) attach 22044 attaching to process 22044 /usr/src/gnu/usr.bin/gdb/libgdb/../../../../contrib/gdb/gdb/solib-svr...

by isuid - C/C++ - 2008-06-03 12:40:52 阅读(1860) 回复(1)

系统有个进程zombie了,kill也没用,gdb attach也没用,我想看看它最后调用的堆栈或者函数,有办法吗?/proc//stat是不是有一些信息?

by Tanacore - C/C++ - 2012-06-29 07:44:16 阅读(2727) 回复(2)

在aix下用gdb调试程序,用attach时,可以跟踪到程序,但是却无法设断点,被告知找不到symble,需要运行file命令,但是如果运行file命令,又会kill掉当前进程(A program is being debugged already. Kill it? (y or n) ),并重新启动进程。 这样就达不到attach的目的,请问我该怎么处理呢? (编译时已经加入了-g选项,这一点不要怀疑)。 [ 本帖最后由 mingjwan 于 2006-10-11 09:09 编辑 ]

by mingjwan - C/C++ - 2006-10-11 09:29:31 阅读(1702) 回复(1)

自己随便写了一程序,运行时让它阻塞,ps找到pid,然后 gdb attatch pid 提示我: (gdb) attach 2944 attaching to process 2944 /usr/src/gnu/usr.bin/gdb/libgdb/../../../../contrib/gdb/gdb/solib-svr4.c:1443: internal-error: legacy_fetch_link_map_offsets called without legacy link_map support enabled. A problem internal to gdb has been detected, further debugging may prove unreliable. Quit this debugging s...

by flyingkisser - C/C++ - 2006-06-17 23:49:32 阅读(1520) 回复(1)

一个最简单的用scanf的程序:[code] #include int main(void){ int i; scanf("%d",&i); return 0; } [/code]编译运行之,如果我直接gdb a.out,那么可以在gdb里面给予标准输入。 但是我现在是想a.out先执行,不做输入,用ps -ef来查找a.out的进程id(例如8783),然后在一个新的窗口里面启动gdb:[code] # gdb GNU gdb (gdb) Red Hat Enterprise Linux (7.2-56.el6) .......一堆文字 (gdb) attach 8783 attaching to proc...

by ejeker - Linux环境编程 - 2013-07-22 16:19:23 阅读(3935) 回复(13)

现在有一个多线程程序,运行时可能会有几个线程停止执行,表面看来似乎是在无限等待某条件变量的通知。但是通过程序打印显示已经有线程给他们发送条件变量通知了,也没有哪个线程还锁定着互斥量。 我用gdb attach这个进程去看,查看了某些全局变量后,再detach,然后就可以发现这几个线程开始运行了。 实在不知道为什么会这样。gdbattach和detach操作应该不会对进程有什么特殊影响吧? 请问有谁知道gdb attach和detach进程时的...

by kokobar - Linux环境编程 - 2012-09-29 10:53:16 阅读(22203) 回复(7)

RT,一个运行着的进程为什么可以被attach?gdb也是一个程序啊,一个进程怎么能够直接“侵犯”另外一个进程的空间?

by Ph0nix - Linux环境编程 - 2007-11-20 21:46:18 阅读(6724) 回复(2)