debugging - Solaris GDB : Howto pause execution?

标签 debugging gdb solaris

我正在使用 GDB 在 Solaris 10 x86 上调试封闭源程序。

我将 gdb 附加到程序并继续执行,但是当我想稍后暂停执行以检查一些内存时,我不能。当我按 CTRL-C 时,它只打印 ^C 而不是暂停程序并将我放到 (gdb) 提示符下。

bash-3.00# gdb --pid=1521
GNU gdb 6.6
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-pc-solaris2.10".
Attaching to process 1521
Retry #1:
Retry #2:
Retry #3:
Retry #4:
[New LWP 1]
0xfe3b5a23 in ?? ()
(gdb) c
Continuing.
^C^C^C^C^C^C^C^C

我如何回到 (gdb) 提示?我是不是做错了什么,或者我怎样才能让它发挥作用。

最佳答案

刚刚找到了一个解决方法。从另一个终端给出以下命令:

kill -INT 1521

GDB 将在被调试程序收到 SIGINT 后暂停执行。

关于debugging - Solaris GDB : Howto pause execution?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/614810/

相关文章:

java - 无法从类型 SpecialAssignment1 静态引用非静态方法 printMenuGetSelection()

c - 如何在mac m1(苹果硅)上安装GDB?

python - 从 python 库调用时,Solaris 上的 BeanStalkd 不会返回任何内容

linux - 如何使用 gdbserver 进行远程调试?

go - 无法让 gdb 为 Go 1.3 程序工作

shell - 测试远程 TCP 端口是否从 shell 脚本打开

Solaris 软件包升级

python - 在堆栈跟踪中打印函数的参数值

visual-studio - 调试 Classic Asp 时调试器在错误的行上

javascript - 您如何调试 Javascript 中的时序问题?