GDB错误重新设置断点(不能访问内存) [英] gdb error in re-settings breakpoint (cannot access memory)

查看:3197
本文介绍了GDB错误重新设置断点(不能访问内存)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图让GDB来设置pcbsd10(freebsd10)一个断点。

I am trying to get gdb to set a breakpoint in pcbsd10 (freebsd10).

我编我的code。与调试符号,这里是从GDB输出

I have compiled my code with debug symbols, and here is the output from gdb

GNU gdb (GDB) 7.7
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
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 "x86_64-unknown-freebsd10.0".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from tor...done.
(gdb) break config.c:3626
Breakpoint 1 at 0xfde72: file src/or/config.c, line 3626.
(gdb) run
Starting program: /usr/home/jon/swdev/apps/tor/src/or/tor -f /home/jon/torrc
Error in re-setting breakpoint 1: Cannot access memory at address 0xfdb90
Error in re-setting breakpoint 1: Cannot access memory at address 0xfdb90
...

和我的code继续而不在断点处停止运行。

And my code continues to run without stopping at the breakpoint.

这是怎么回事?我怎样才能更深入地了解为什么GDB失败的原因?

What is going on here? How can I get more insight into why gdb is failing?

推荐答案

您可能看这GDB的错误

虽然它看起来像GDB 7.7应该已经有一个解决方法,你可能会想尝试7.7.1。

Although it looks like GDB 7.7 should already have a fix, you may want to try 7.7.1.

另外,建立你的二进制文件作为非PIE二进制(删除 -fPIE 从Makefile)。

Alternatively, build your binary as a non-PIE binary (remove -fPIE from the Makefile).

这篇关于GDB错误重新设置断点(不能访问内存)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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