惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Help Net Security
Help Net Security
G
Google Developers Blog
雷峰网
雷峰网
WordPress大学
WordPress大学
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Engineering at Meta
Engineering at Meta
Security Latest
Security Latest
T
Threat Research - Cisco Blogs
AWS News Blog
AWS News Blog
F
Full Disclosure
C
Cybersecurity and Infrastructure Security Agency CISA
T
The Exploit Database - CXSecurity.com
J
Java Code Geeks
U
Unit 42
C
Cyber Attacks, Cyber Crime and Cyber Security
V
V2EX
C
Cisco Blogs
博客园 - 司徒正美
Project Zero
Project Zero
L
LINUX DO - 热门话题
阮一峰的网络日志
阮一峰的网络日志
Blog — PlanetScale
Blog — PlanetScale
Scott Helme
Scott Helme
A
About on SuperTechFans
Hugging Face - Blog
Hugging Face - Blog
S
Securelist
小众软件
小众软件
aimingoo的专栏
aimingoo的专栏
S
Schneier on Security
G
GRAHAM CLULEY
酷 壳 – CoolShell
酷 壳 – CoolShell
Cyberwarzone
Cyberwarzone
MongoDB | Blog
MongoDB | Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 叶小钗
T
Threatpost
Recorded Future
Recorded Future
C
CXSECURITY Database RSS Feed - CXSecurity.com
宝玉的分享
宝玉的分享
N
News and Events Feed by Topic
人人都是产品经理
人人都是产品经理
The Register - Security
The Register - Security
S
Security Archives - TechRepublic
博客园 - Franky
N
News | PayPal Newsroom
Simon Willison's Weblog
Simon Willison's Weblog
S
SegmentFault 最新的问题
W
WeLiveSecurity
A
Arctic Wolf
B
Blog

博客园 - 叶伟民

RAG开发大模型应用掉进过的坑(1)——从讨论国内外大模型应用发展而起 大模型时代的PDF解析工具 《.NET内存管理宝典 》(Pro .NET Memory Management) 阅读指南 - 第10章 《.NET内存管理宝典 》(Pro .NET Memory Management) 阅读指南 - 第9章 《.NET内存管理宝典 》(Pro .NET Memory Management) 阅读指南 - 第8章 《.NET内存管理宝典 》(Pro .NET Memory Management) 阅读指南 - 第7章 《.NET内存管理宝典 》(Pro .NET Memory Management) 阅读指南 - 第6章 《.NET内存管理宝典 》(Pro .NET Memory Management) 阅读指南 - 第4章 《.NET内存管理宝典 》(Pro .NET Memory Management) 阅读指南 - 第3章 如何取书名(2) - 书店研究心得 使用Jasmine和karma对传统js进行单元测试 《.NET内存管理宝典 》(Pro .NET Memory Management) 阅读指南 - 第5章 《.NET内存管理宝典 》(Pro .NET Memory Management) 阅读指南 - 第2章 走正确的路 - IT业没有护城河 - 机器翻译新锐Deepl 《.NET内存管理宝典 》(Pro .NET Memory Management) 阅读指南 - 第1章 Women forum两周年有感 现代化编程模式(1)-快 转型 - 在海归群的最大收获以及写给子孙后代的。 《 .NET并发编程实战》一书中的节流为什么不翻译成限流
《.NET内存管理宝典》 售后服务系列文(2) - WinDbg命令.cmdtree
叶伟民 · 2020-03-08 · via 博客园 - 叶伟民

2020-03-08 13:18  叶伟民  阅读(496)  评论()    收藏  举报

此文是《.NET内存管理宝典   提高代码质量、性能和可扩展性》(英文名《Pro .NET Memory Management: For Better Code, Performance, and Scalability》)一书的售后服务系列文章之一。

在《.NET内存管理宝典   提高代码质量、性能和可扩展性》一书(目前我还在翻译本书,预计年底出版)的第3章 “内存测量”里的“WinDbg”一节中,有提到:

还有一个有用的工具可以用于WinDbg - 命令树窗口。由于一次又一次地键入所有命令非常麻烦,因此你可以创建一个包含可用命令的结构化列表的文件。然后,通过使用.cmdtree <file>命令,只需单击一下即可创建具有所有这些命令的专用窗口。

这一段超级有用,但是原著讲得十分笼统。因此我打算专门写一篇blog来体现它的威力。然而在写的过程中,发现了如下这篇blog已经写得很好了,我已经没有再重新专门写一篇的必要了,因此我决定就转载这一篇文章:

原文出处:https://www.cnblogs.com/yilang/p/11952873.html 并且我在此对该文作者表示感谢,给与一个大大的赞

WinDbg常用命令系列---.cmdtree

.cmdtree

简介

使用形式

.cmdtree cmdfile

参数

  • cmdfile
    命令文件,包含多个你需要的命令。必须是一个文本档

使用步骤

1、使用命令创建文本文件test.wl,使用以下示例作为模板。您可以按所需方式修改{}之间的节:

复制代码

windbg ANSI Command Tree 1.0

title {"Common Commands"}

body

{"Common Commands"}

 {"Information"}

  {"Time of dump"} {".time"}

  {"Process being debugged"} {"|"}

  {"Dump Location"} {"||"}

  {"Create server on port 9999"} {".server tcp:port=9999"}

  {"Show remote connections"} {".clients"}

  {"Process Environment Block"} {"!peb"}

 {"Logging"}

  {"Open Log"} {".logopen /t /u /d"}

  {"Close Log"} {".logclose"}

 {"Modules"}

  {"All Modules"} {"lm D sm"}

  {"Loaded Modules"} {"lmo D sm"}

  {"Loaded Modules (verbose)"} {"lmvo D sm"}

  {"Modules w/o symbols"} {"lme D sm"}

 {"Stacks"}

  {"Set frame length to 2000"} {".kframes 2000"}

  {"Dump current stack w/ DML"} {"kpM 1000"}

  {"Dump stacks without private info"} {"knL 1000"}

  {"Dump stacks with all parameters"} {"kPn 1000"}

  {"Dump stacks (distance from last frame)"} {"kf 1000"}

  {"Dump stacks with Frame Pointer Omission"} {"kvn 1000"}

  {"Dump all stack"} {"~*kbn 1000"}

  {"Dump unique stacks"} {"!uniqstack -pn"}

  {"Thread environment block"} {"!teb"}

  {"Move to next frame"} {".f+"}

  {"Move to previous frame"} {".f-"}

 {"Memory"}

  {"Dump heaps"} {"!heap -a"}

 {"Automated Task"}

  {"!analyze"} {"!analyze -v"}

  {"Locks"} {"!ntsdexts.locks"}

  {"CPU time for User and Kernel Mode"} {"!runaway 7"}

 {"Managed"}

  {"Load sos"} {".loadby sos mscorwks"}

  {"clrstack"} {"!clrstack"}

  {"Threads"} {"!threads"}

  {"Stack Objects"} {"!dso"}

  {"Exceptions"} {"!dae"}

复制代码

2、将文本文件保存在任何目录,建议是安装WinDbg的同一文件夹中。

3、打开转储文件,加载符号,然后使用以下命令:

.cmdtree xxx\test.wl

4、上面的命令将创建一个包含您的命令的新WinDbg窗口。您可以双击树状图窗口中的一个项目来执行该命令。