gdb - directory 路径问题

1: gdb几种设置断点的方式
https://www.cnblogs.com/northhurricane/p/3860393.html

2: gdb $pc 可以打断点吗
   gdb汇编地址打断点的方式?
   
GDB深入研究
https://www.cnblogs.com/lhc-java/p/4999017.html

20145215卢肖明 / LinuxNetworkAttack
https://gitee.com/20145215/LinuxNetworkAttack/blob/master/test.c

  
3: gdb调试程序时directory设置的问题    --- 相关文章 gdb调试难点;
https://bbs.csdn.net/topics/290088922

gdb调试问题备份 ----  important, GDB还可以用gdb -x选项,进入到要调试文件的目录;
http://blog.sina.com.cn/s/blog_4cd71cd00101843j.html


(gdb) b test/dbTest.cpp:190
No source file named test/dbTest.cpp.
Make breakpoint pending on future shared library load? (y or [n]) n

竟然未找到源文件,
(gdb) pwd
Working directory /home/pan/trunck_code_20111215/my_code.
工作目录没错呀。
(gdb) directory src

最后man 了下gdb发现

      -directory=directory

      -d directory
             Add directory to the path to search for source files.
原来如此啊,
gdb -d /home/pan/trunck_code_20111215/my_code/test/

 

//------------------------------------------------------------------------//

一次在调用 gdb exefile后,

(gdb) b test/dbTest.cpp:190

No source file named test/dbTest.cpp.

Make breakpoint pending on future shared library load? (y or [n]) n

 

竟然未找到源文件,

(gdb) pwd

Working directory /home/pan/trunck_code_20111215/my_code.

工作目录没错呀。

(gdb) directory src

Source directories searched: /home/pan/trunck_code_20111215/my_code/src:$cdir:$cwd

(gdb) show directories

Source directories searched: /home/pan/trunck_code_20111215/my_code/src:$cdir:$cwd

 

最后man 了下gdb发现

 

      -directory=directory

 

      -d directory

             Add directory to the path to search for source files.

原来如此啊,

gdb -d /home/pan/trunck_code_20111215/my_code/test/

 

(gdb) directory src

Source directories searched: /home/pan/trunck_code_20111215/my_code/src:/home/pan/trunck_code_20111215/my_code/test:$cdir:$cwd

已经有了, 哈哈哈。。

最后说明下 必须在同一shell中。

 

//---------------------------------------------------------------------------------//

 

 

 

https://blog.csdn.net/hutianyou123/article/details/78135152?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1.channel_param&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1.channel_param

GDB允许明确指定源代码位置,或者路径替换规则,以应付源代码位置迁移的

 

https://blog.csdn.net/ld11690/article/details/81027672

情况。

directory path-list:将一个或者多个源代码搜索目录加入到当前源码搜索目录列表的前面,目录之间使用空格间隔。
directory:不带参数的directory将源码搜索目录恢复为默认值。
set directories path-list:将源码目录设置为path-list,但是会补上默认目录。
show directories:显示源码搜索目录列表。
set substitute-path from to:设置目录替换规则,放置在规则列表的末端。
unset substitute-path [path]:删除path对应的替换规则,或者删除所有的替换规则。
show substitute-path [path]:显示path对应的替换规则,或者显示所有的替换规则。

 


CALL和RET指令---汇编学习笔记
https://blog.csdn.net/qq_37340753/article/details/81585083

经典的GDB调试命令
https://www.cnblogs.com/chars/p/4971366.html

4:10个常用GDB高级技巧,让调试更加方便快捷
https://blog.csdn.net/lida2003/article/details/8576508?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1.channel_param&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1.channel_param

5: gdb调试艺术之定义钩子命令:-D
https://blog.csdn.net/weixin_46222091/article/details/104187884

GDB的极致运用 - 简书

https://www.cnblogs.com/Key-Ky/p/6942408.html
https://blog.csdn.net/wenceng9/article/details/21372265


《Linux/UNIX系统编程手册》第49章 内存映射
https://www.cnblogs.com/arnoldlu/p/12550993.html

关于进程的物理内存RSS
http://blog.itpub.net/26239116/viewspace-1472417/

Linux内存管理 一个进程究竟占用多少空间?-VSS/RSS/PSS/USS
https://www.cnblogs.com/arnoldlu/p/9375377.html

《Linux/UNIX系统编程手册》第49章 内存映射
https://www.cnblogs.com/arnoldlu/p/12550993.html


20145215《网络对抗》Exp8 Web基础
https://www.cnblogs.com/lxm20145215----/p/6804921.html

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值