在gdb中移动断点 [英] Moving breakpoints in gdb

查看:138
本文介绍了在gdb中移动断点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以更改现有GDB断点的位置?

Is it possible to change the location of an existing GDB breakpoint?

我在特定行上设置了一个断点,然后向它添加了一个条件。我想将它移动到不同的行号,但保留条件而不必销毁它并重新输入条件。

I've set one on a particular line, and then added a condition to it. I would like to move it to a different line number, but retain the condition without having to destroy it and retype the condition.

我在RedHat Enterprise上使用GDB 7.5 Linux 5 64bit。

I'm using GDB 7.5 on RedHat Enterprise Linux 5 64bit.

非常感谢任何帮助。

Any help much appreciated.

推荐答案

这是不可能的。

这将是一个很好的补充,但没有人实现它。

It would be a nice addition, but nobody has implemented it yet.

您可以使用保存断点,然后编辑结果并将其来源。如果条件非常复杂,这可能很方便。

You can use "save breakpoints" and then edit the result and source it. This may be handy if the condition is very complicated.

这篇关于在gdb中移动断点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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