Solaris GDB:如何暂停执行? [英] Solaris GDB: Howto pause execution?

查看:126
本文介绍了Solaris GDB:如何暂停执行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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



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

  bash-3.00#gdb --pid = 1521 
GNU gdb 6.6
版权所有(C)2006免费软件基金会
GDB是免费软件,由GNU通用公共许可证覆盖,您是
欢迎在特定条件下更改和/或分发副本。
输入show copy来查看条件。
GDB绝对没有保修。输入显示保修的详细信息。
这个GDB被配置为i386-pc-solaris2.10。
附加到流程1521
重试#1:
重试#2:
重试#3:
重试#4:
[新建LWP 1]
0xfe3b5a23在?? ()
(gdb)c
继续。
^ C ^ C ^ C ^ C ^ C ^ C ^ C ^ C

我是否回到(gdb)提示符?我做错了事情,我该怎么做才能使这个工作。

解决方案

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

  kill -INT 1521 

GDB将在调试程序接收到SIGINT时暂停执行。


I am using GDB to debug a closed source program on Solaris 10 x86.

I attach gdb to the program and continue execution, however when I want to pause execution later to examine some memory I cant. When I press CTRL-C it only prints ^C instead of pausing the program and dropping me to a (gdb) prompt.

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

How do I get back to a (gdb) prompt? Am I doing something wrong or how can I go about getting this to work.

解决方案

Just found a workaround. From another terminal give the following command:

kill -INT 1521

GDB will pause execution upon the debugged program receiving the SIGINT.

这篇关于Solaris GDB:如何暂停执行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆