Debug tool 学习笔记
GDB调试命令大全
gdb --pid 1235
gdb core.1234
where (bt) //where the segmentation fault occurred
f 1 //切换栈帧
info locals //打印内存
WinDBG调试技巧 . ybao@microsoft.com baoyunduan
.ecxr command displays the context record
kb display call stack with first 3 params
.hh --help
.sympath+ srv*c:\symsrv*http://msdl.microsoft.com/download/symbols
.sympath+ C:\training\Labfiles
.srcpath C:\training\Labfiles\ErrorCheck\FileCopy
srv*c:\symsrv*http://msdl.microsoft.com/download/symbols;C:\training\Labfiles
./realod /f
lm -----check the symbol file
Noninvasive -----only view, can't modify memory data
.detach
command line: c:/windbg /?
dash y == -y
slash ? == /?
process -p PID
service -pn name/global
k --- call stack
kn ---- show frame number
kf ---- show memory ocupy
~*k
~4k ---- show thread 4
~ --- show all thread
~S5 --- jump to thread 5
.frame 2 -- jump to frame
? --- convert hex to Decimal
.formats -- show all formats of a number
g --- continure run debugger
r --- list all the registers
rm ff
r@eax --- specific a registers
syspath
ft
tasklist svc
.hh ---help
.hh reload
.reload --- reload symboal
.reload /f
!chain
!ext analyze
c:/debuggers/winext
.load usbkd
unload usbkd
.kframes
logfile
logopen d:\log.txt
logclose
logappend d:\log.txt
d ---- display memory
dd* point ---- display data in the address store in the point
dv ----display local variable
dt ----display type
dt ps
dt ps -r1
e ---- edit data in memory
!grep
n 10
.formats -118
x---- list the function name/global variable
x notepad!*
x notepad!*file
------------------------mex debugging extension for windebug
c:/debugers/winext
!mex.help
.load mex
.unload mexextpath
!us
bl ----list break point
bp ----set break point
bm ----set multiple point
bm notepad!*file
bd ----disable break point
bc ----clear specific break point
|
||
vertarget ----Shows target computer version
? Evaluate expression
?? Evaluate an expression according to c++ expression rules
.dump
/f complete dump
/ma mini dump
.reload
/f
/u
lm ---- list all dlls, can be used to check if the symbol file was loaded
lmvm combase
.effmach x86 | amd64
t
p
pc
g
gu
gu; echo "hello"; gu; gu
u ---- show assembly code
u L30
uf ----The uf command displays an assembly translation of the specified function in memory
----------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------
eventvwr
!analyze -v
!dh badapp
dps +image base address + offset address
!error errorcode
!error 3
!gle
----GetLastError() in code
!teb
.unload ext ---- Load Extension DLL
.load ext
BOOL SafeDiv(INT32 dividend, INT32 divisor, INT32 *pResult)
{
__try
{
*pResult = dividend / divisor;
}
__except(GetExceptionCode() == EXCEPTION_INT_DIVIDE_BY_ZERO ?
EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH)
{
return FALSE;
}
return TRUE;
}
sx ---set exception
prodump.exe -----create dump file when some rules was trigger
-ma --very important
-i
-e
-c
-cl
-h
-n
---- show dump info
!peb -- !peb extension displays a formatted view of the information in the process environment block (PEB).
!teb -- !teb extension displays a formatted view of the information in the thread environment block (TEB).
!runway ---- show run time of thread
!runway f
stack:
1M
two pages
c++函数调用方法
32 bit 4种不同的调用方法
64bit 只有一种调用方法
STDCALL 从右往左压栈,适用于有固定参数个数,由调用函数来处理
CDECL
THISCALL
FASTCALL
----------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------
E:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin
dumpbin
editbin /LARGEADORESSAWARE[:NO] 可在不重新编译的情况下,将用户可用内存空间大于2G
或者在VS--链接--系统--启用大地址中修改选项,然后重新编译
You can use /userva with /3Gb to further tune user VA space
!address -summary
Performance Monitor -- 1. 打开:Administrative Tools->Performance,或在运行中输入"perfmon"
C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\
1. Windows Performance recorder
WPRUI.exe
2. Windows Performance Analyzer
wpa.exe
C:\Program Files (x86)\Windows Resource Kits\Tools\consume 可以用来模拟系统资源占用比较严重的情况,我被弄死机了,差点笔记也没有了
consume -cpu-time
!address summary
!address analyze
!heap -s
!heap /?
!help -stat -h HANDLE
!heap -p -a ADDR
gflags -i heap_overrun_demo.exe +hpa
--------------------------------------------------------------------------------------------------------------------
check deadlock ----step
!locks, !cs, ~*k
children process -- command line
Semaphore -- multiple owner
CS/Mute -- One owner
WaitForMultipleObject() ---- 等多个条件齐了才能开始
!handle f
TLS 线程本地存储 ----- http://blog.csdn.net/xiaoliangsky/article/details/43158713
用ProcDump 来取dump是比较准确的
.reload /i C:\Users\admin\Downloads\wme4train_x64\mediaengine\maps\x64\Release
.reload /i wseclient.dll
.effmach x86
.load wow64exts
!analyze -v
!wow64exts k
Debug tool 学习笔记的更多相关文章
- ansible debug模块学习笔记
- name: Print debug infomation eg hosts: test2 gather_facts: F tasks: - name: Command run line shell ...
- Spring MVC 学习笔记2 - 利用Spring Tool Suite创建一个web 项目
Spring MVC 学习笔记2 - 利用Spring Tool Suite创建一个web 项目 Spring Tool Suite 是一个带有全套的Spring相关支持功能的Eclipse插件包. ...
- 【转】 C#学习笔记14——Trace、Debug和TraceSource的使用以及日志设计
[转] C#学习笔记14——Trace.Debug和TraceSource的使用以及日志设计 Trace.Debug和TraceSource的使用以及日志设计 .NET Framework 命名空 ...
- 学习笔记之Coding / Design / Tool
CODING 学习笔记之代码大全2 - 浩然119 - 博客园 https://www.cnblogs.com/pegasus923/p/5301123.html 学习笔记之编程珠玑 Programm ...
- Xcode 8 的 Debug 新特性 —- WWDC 2016 Session 410 & 412 学习笔记
Contents OverView Static Analyzer Localizability Instance Cleanup Nullablility Runtime Issue View De ...
- DirectX 总结和DirectX 9.0 学习笔记
转自:http://www.cnblogs.com/graphics/archive/2009/11/25/1583682.html DirectX 总结 DDS DirectXDraw Surfac ...
- DBus学习笔记
摘要:DBus作为一个轻量级的IPC被越来越多的平台接受,在MeeGo中DBus也是主要的进程间通信方式,这个笔记将从基本概念开始记录笔者学习DBus的过程 [1] DBus学习笔记一:DBus学习的 ...
- Oracle RAC学习笔记02-RAC维护工具集
Oracle RAC学习笔记02-RAC维护工具集 RAC维护工具集 1.节点层 2.网络层 3.集群层 4.应用层 本文实验环境: 10.2.0.5 Clusterware + RAC 11.2.0 ...
- Hibernate 马士兵 学习笔记 (转)
目录(?)[+] 第2课 Hibernate UML图 第3课 风格 第4课 资源 第5课 环境准备 第6课 第一个示例Hibernate HelloWorld 第7课 建立Annotation版本的 ...
随机推荐
- Java-帮助文档的制作
Java-帮助文档的制作 1,public修饰的类才干够用bin/javadoc生成文档 2.java的说明书是通过文档的凝视来完毕的,所以在敲代码的时候.凝视是非常有必要的 使用文档凝视法,才干够生 ...
- java统计中英文字数 Java问题通用解决代码
http://yangchao20020.blog.163.com/blog/static/483822472011111635424751/ 这个不适用于新浪微博字数的统计,结果有差别,若需要可 ...
- C/C++中字符串与数字之间的转换
主要有两种方式:C 中能够使用 sprintf 将数字转为字符数组,sscanf 将字符数组转为数字:而在 C++ 中不仅能够使用 C 中的方法,还能够使用 stringstream 实现字符串与数字 ...
- Maven环境下搭建SSH框架之Spring整合Hibernate
© 版权声明:本文为博主原创文章,转载请注明出处 1.搭建环境 Spring:4.3.8.RELEASE Hibernate:5.1.7.Final MySQL:5.7.17 注意:其他版本在某些特性 ...
- Hibernate学习之属性级别注解
© 版权声明:本文为博主原创文章,转载请注明出处 属性级别注解 添加方式 1. 写在属性字段上面 2. 写在属性getter方法上面 @Id:必须,定义了映射到数据库表的主键属性,一个实体可以有一个或 ...
- 一个可以模拟GET,POST,PUT,DELET请求的HTTP在线工具
一个简陋的HTTP请求工具,UI比较丑陋.0.0,可以用于接口调试. 之前在调试公司的远程接口的时候用的是curl,后来也在网上找到几种Http请求模拟的客户端程序.当时后来发现google app ...
- 近期建了一个.net源代码共享群,群共享有大量网友分享的.net(C#)商业源代码
本群创建于2013/6/21: 群里都是.net(C#)程序开发者,群共享有大量网友分享的.net(C#)商业源代码.比方:DTCMS旗舰版,hishop微分销,shopnum微分销.多用户微信公众平 ...
- 使用Firebug进行断点调试详解
利用Firebug我们可以非常方便地对网页上的任何JavaScript代码进行断点调试. 首先,使用快捷键F12在当前页面打开Firebug,并切换到脚本选项卡. 其次,我们需要为指定的js代码添加断 ...
- Codeforces 14D Two Paths 树的直径
题目链接:点击打开链接 题意:给定一棵树 找2条点不反复的路径,使得两路径的长度乘积最大 思路: 1.为了保证点不反复,在图中删去一条边,枚举这条删边 2.这样得到了2个树,在各自的树中找最长链.即树 ...
- 出现windows启动服务失败(无法从命令行或调试器启动,需要安装InstallUtil.exe)的解决办法
两种方法1 从命令行安装2 选择项目-视图-自定义操作 然后将 安装,提交,回滚,卸载分别加入自定义操作,注意InstallClass属性为true