debug 2
Red Hat Developer Toolset
delivers the latest stable versions of essential GCC C, C++, Fortran, and supporting development
tools to enhance developer productivity and improve deployment times.
About GCC version, recommend to use the latest version,
wihle adding new features to compiler, it may introduce some ABI changes and new defects(especially c++11)
if we use a third-party lib complied with gcc of a different version, sometimes it may cause link failure(backwards compatibility).
https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html (part 3)
https://gcc.gnu.org/wiki/Cxx11AbiCompatibility
https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html
linux so information:
readelf vs objdump : recommend to use readelf
https://stackoverflow.com/questions/8979664/readelf-vs-objdump-why-are-both-needed
direct dependency: readelf -d
recursive ones : ldd
elf sections: .comment debug symtab text
gcc version : readelf -p .comment elf-file
check whether elf is compiled with '-g' (debugging)
1) use gdb
2) readelf -S elf //to see if there are .debug_x sections
- readelf --debug-dump=decodeline elf // to show section:.debug_line
3)if Elf are built with '-gsplit-dwarf', it would generate *.dwo to contain debug info
find its path in .debug_str
Windbg 概念
Local cache MS Symbol Store Symbol (search) Path
.symfix (path) : 把 Store 覆盖 Symbol Path (不需要记忆官方地址)
.symfix+ path : 把Store 添加到已有Symbol Path
.sympath (path) : 显示(覆盖)当前Symbol Path
Source: src path 只要相对路径不被破坏,只需指定一处(源文件的根目录),windbg会自动关联。
- 需要的src path通常是包含在pdb文件中,只有在加载pdb后可知,比如打印堆

|
load executable/ dump file / attach to process |
|
|
lm 查看模块及是否加载symbol !lmi module-name 查看模块的symbol 位置 ~ 显示thread数 ~ NO. S 切换thread K显示堆 .frame NO. 前往指定堆 查找符号断点 - 根据k 显示的符号 - X [<*|module>!]<*|symbol> - view symbols Bp function-name & bc 删除 打开源文件, 如果没设置对路径,无反应 .open -a function-name 调试 g – run p – step over t – step in 查看变量 dv varialble |
i sh 查看加载的动态模块 Info threads 查看线程 thread NO. 切换线程 bt 堆 frame NO 前往指定堆 查看符号断点 - Info functions 查看有的符号 - b functon-name / delete NO. 删除断点 - info b 查看breakpoints Info sources 查看引用source 路径 Show directories 来查看source search path 使用set directories / substitute-path 来设置目录 List - 当前行 list function / NO. Debug r – run n – step over s - step into c - continue Variables p variable set variable = new-v |
|
提供了 查看map, list 命令 |
Info args / where / condition / (force) return |
debug 2的更多相关文章
- jmeter sampler maven项目排错记
eclipse 创建的maven项目,引入jar包之后出现红色叹号,一直找不到原因,连main方法都无法运行,提示找不到类: 错误: 找不到或无法加载主类 soapsampler.SoapSample ...
- 记一次debug记录:Uncaught SyntaxError: Unexpected token ILLEGAL
在使用FIS3搭建项目的时候,遇到了一些问题,这里记录下. 这里是发布搭建代码: // 代码发布时 fis.media('qa') .match('*.{js,css,png}', { useHash ...
- .NET Core的日志[3]:将日志写入Debug窗口
定义在NuGet包"Microsoft.Extensions.Logging.Debug"中的DebugLogger会直接调用Debug的WriteLine方法来写入分发给它的日志 ...
- 设置tomcat远程debug
查看端口占用情况命令: netstat -tunlp |grep 8000 tomcat 启动远程debug: startup.sh 中的最后一行 exec "$PRGDIR"/& ...
- Android NDK debug 方法
最近又频繁遇到 NDK 的错误,记录一下debug调试的一些经验,以备后续查看 一般来说,在Android Studio中的Monitor中将过滤器的 LOG TAG 设置为 "DEBUG& ...
- 玩转Windows服务系列——Debug、Release版本的注册和卸载,及其原理
Windows服务Debug版本 注册 Services.exe -regserver 卸载 Services.exe -unregserver Windows服务Release版本 注册 Servi ...
- struts debug 标签
< s:debug> 引起下面的错误 org.apache.jasper.JasperException: Caught an exception while getting the pr ...
- How to debug .NET Core RC2 app with Visual Studio Code on Windows?
Simone Chiaretta (http://codeclimber.net.nz/archive/2016/05/20/How-to-debug-NET-Core-RC2-app-with-Vi ...
- Debug Databinding Issues in WPF
DataBinding is one of the most powerful features in WPF. But because it resolves the bindings at run ...
- Debug JDK变量显形
本文面向的朋友 本文主要说明在使用Eclipse Debug JDK时,看不到变量值的解决办法. 如果您看到上面绿色字体表示不敢兴趣,请一定果断back,如果您不爽,请在下面使劲的拍. Debug J ...
随机推荐
- Python selenium —— 一定要会用selenium的等待,三种等待方式解读
发现太多人不会用等待了,博主今天实在是忍不住要给大家讲讲等待的必要性. 很多人在群里问,这个下拉框定位不到.那个弹出框定位不到…各种定位不到,其实大多数情况下就是两种问题:1 有frame,2 没有加 ...
- 每个努力奋斗过的人,被不公正的际遇砸了满头包的时候,都有那么一瞬间的代入感。出生就是hard模式的人,早已经历了太多的劳其筋骨饿其体肤,再多的人为考验只会摧毁人对美好的向往。
每个努力奋斗过的人,被不公正的际遇砸了满头包的时候,都有那么一瞬间的代入感.出生就是hard模式的人,早已经历了太多的劳其筋骨饿其体肤,再多的人为考验只会摧毁人对美好的向往.
- python 学习三
list循环删除下标会出错 L = [1,1,1,2,3,4,5]#list是根据下标来取值 #下标0,1,2,3,4,5,6 循环后下标错位 输出的结果是[1,2,4],把1也取到了 #l2 = [ ...
- [2019.04.01]Linux 学习心得(2)-- tar 命令的理解
这篇文章并不是发布最早的但是阅读量却每天都见长,很想知道各位大大是怎么找到这篇文章的.如果不忙,还请各位大大评论一下我看看,没准我可以为大家改进一下本文,提升一下质量. =============== ...
- 完全理解 Python 迭代对象、迭代器、生成器(转)
完全理解 Python 迭代对象.迭代器.生成器 本文源自RQ作者的一篇博文,原文是Iterables vs. Iterators vs. Generators » nvie.com,俺写的这篇文章是 ...
- winform动态生成新窗体并添加控件执行命令
主要代码 Form nf = new Form(); ; ; nf.Width = _w; nf.Height = _h; //添加textbox TextBox tb = new TextBox() ...
- Python学习day17 迭代器&生成器
迭代器&生成器 1. 迭代器 1.1 迭代器 迭代:迭代是重复反馈过程的活动,其目的通常是为了逼近所需目标或结果.每一次对过程的重复称为一次"迭代" 迭代器:帮助对某种对象 ...
- Spring定时器配置与运用,及Cron表达式的详解
一:首先在spring的配置文件里配置一个定时器 <task:executor id="executor" pool-size="5" /> < ...
- GWAS:拒绝假阳性之case和control数量比例严重失衡的解决方案(SAIGE模型的应用)
一.为什么要校正case和control数量比例不平衡情况 试问作为生信届人员,最怕的是什么,当然是统计结果不靠谱.统计结果不靠谱包括两方面:一个是假阴性,一个是假阳性.假阴性可以理解为白天鹅被误当成 ...
- 大数据-hadoop生态之-HDFS
一.HDFS初识 hdfs的概念: HDFS,它是一个文件系统,用于存储文件,通过目录树定位文件,其次,他是分布式的,由很多服务器联合起来 实现功能,集群中的服务器各有各自的角色 HDFS设计适合一次 ...