SlideShare a Scribd company logo
1 of 39
Introduction to the Debugging Tools for Windows
Understanding Windows and x86/x64
Architectures
Understanding Application Crashes
Introducing Application Verifier
Advanced Debugging Techniques
7 years working at Microsoft


3 years at Digital Equipment Corporation

Instructor with David Solomon
The Debugging Tools install four debuggers


Support for all architectures supported by
Windows


WinDbg is a Windows–based debugging tool
Several ways to select a debugging target


Must know the name or the identifier of the target

Support for noninvasive debugging
WinDbg supports the use of workspaces


Support included for a command line interface


Access to symbols to perform debugging
A collection of symbols contained within a single
file
Can be challenging to locate the required
symbols


Set the system wide environment variable

Troubleshoot symbol loading errors with !sym
noisy
The most useful information is the Help file


Use the .hh command from within the debugger

Discovering commands with auto–complete
Demo
Registers, small areas of extremely fast storage
Usually measured by the number of bits they hold

x86 architecture provides 16 basic program
registers

x64 adds an additional 8 general–purpose
registers
Accessible using the r debugger command
Windows provides support for a
flat addressed virtual
environment


Linear address space is divided
into fixed–size pages
Windows provides support for a
flat addressed virtual
environment


Linear address space is divided
into fixed–size pages
Accessible using the d debugger commands
Process, an instance of a program


Thread, a unit of execution within the system


A unique identifier is assigned to both
Using the !teb debugger command


Using the !peb debugger command

Using the inbuilt ~ command
A storage location used by threads


Useful to identify the flow of code in an
application


A unique stack is allocated to each thread
Accessible using the k debugger commands
Demo
The result of an unhandled exception


Windows uses structured exception handling


Unhandled exceptions are passed to a system
filter
Dr Watson replaced with WerFault in Windows
Vista


A central location is now provided for users


Additional support for non–critical events
Default configuration is to not take a full dump


Ability to exclude reports on a per application
basis


Doesn’t affect applications with their own support
Application not terminated until the filter returns

Must know the name or the PID of the application


Allows a user to create a dump of the application
Demo
A runtime verification tool for native code


Available as a separate download from Microsoft

Injects verification DLLs into the application
Configurable using the Application Verifier tool


Certain verification layers require a debugger


Support for using a command line interface
Demo
Possible to force dump creation of an application

Using the built in Windows Task Manager


Using the Debugging Tools for Windows
Support for redirection using a kernel debugger


The system must be started in debugging mode

Useful in several advanced scenarios
Demo
Windows Internals, 5th Edition

Advanced Windows Debugging

Windows via C/C++, 5th Edition
Memory Dump, Software
Trace, Debugging, Malware and Intelligence
Analysis Portal

Advanced Windows Debugging and
Troubleshooting
Windows Debugging and Troubleshooting

More Related Content

Viewers also liked

Mon economic assumptions
Mon economic assumptionsMon economic assumptions
Mon economic assumptions
Travis Klein
 
Iron mountain Records Management Observing
Iron mountain Records Management ObservingIron mountain Records Management Observing
Iron mountain Records Management Observing
Nafi Putrawan
 
Monday factors of production
Monday factors of productionMonday factors of production
Monday factors of production
Travis Klein
 
Fri papal response to luther
Fri papal response to lutherFri papal response to luther
Fri papal response to luther
Travis Klein
 
Fri papal response to luther
Fri papal response to lutherFri papal response to luther
Fri papal response to luther
Travis Klein
 
цахим хичээлийн зөвлөмж
цахим хичээлийн зөвлөмжцахим хичээлийн зөвлөмж
цахим хичээлийн зөвлөмж
pvsa_8990
 

Viewers also liked (17)

5 Tips for Great Social Media Research
5 Tips for Great Social Media Research5 Tips for Great Social Media Research
5 Tips for Great Social Media Research
 
Mon economic assumptions
Mon economic assumptionsMon economic assumptions
Mon economic assumptions
 
Storyboard
StoryboardStoryboard
Storyboard
 
Iron mountain Records Management Observing
Iron mountain Records Management ObservingIron mountain Records Management Observing
Iron mountain Records Management Observing
 
Monday factors of production
Monday factors of productionMonday factors of production
Monday factors of production
 
Fri papal response to luther
Fri papal response to lutherFri papal response to luther
Fri papal response to luther
 
らくがき
らくがきらくがき
らくがき
 
Badanie wody rzeki_kamieniczki_spz
Badanie wody rzeki_kamieniczki_spzBadanie wody rzeki_kamieniczki_spz
Badanie wody rzeki_kamieniczki_spz
 
Mon banking
Mon bankingMon banking
Mon banking
 
Mit2 092 f09_lec15
Mit2 092 f09_lec15Mit2 092 f09_lec15
Mit2 092 f09_lec15
 
Gdp per capita
Gdp per capitaGdp per capita
Gdp per capita
 
Fri papal response to luther
Fri papal response to lutherFri papal response to luther
Fri papal response to luther
 
So you’ve successfully installed SCOM… Now what.
So you’ve successfully installed SCOM… Now what.So you’ve successfully installed SCOM… Now what.
So you’ve successfully installed SCOM… Now what.
 
Life Sciences at RENCI - Big Data IT to Manage, Decipher, and Inform
Life Sciences at RENCI - Big Data IT to Manage, Decipher, and InformLife Sciences at RENCI - Big Data IT to Manage, Decipher, and Inform
Life Sciences at RENCI - Big Data IT to Manage, Decipher, and Inform
 
The EMC Isilon Scale-Out Data Lake
The EMC Isilon Scale-Out Data LakeThe EMC Isilon Scale-Out Data Lake
The EMC Isilon Scale-Out Data Lake
 
Verizon communication
Verizon communicationVerizon communication
Verizon communication
 
цахим хичээлийн зөвлөмж
цахим хичээлийн зөвлөмжцахим хичээлийн зөвлөмж
цахим хичээлийн зөвлөмж
 

Similar to Windows Debugging and Troubleshooting

Continuous Integration and development environment approach
Continuous Integration and development environment approachContinuous Integration and development environment approach
Continuous Integration and development environment approach
Aleksandr Tsertkov
 
Advanced driver debugging (13005399) copy
Advanced driver debugging (13005399)   copyAdvanced driver debugging (13005399)   copy
Advanced driver debugging (13005399) copy
Burlacu Sergiu
 
Software development windows nutshell
Software development windows nutshellSoftware development windows nutshell
Software development windows nutshell
Himanshu Pareek
 
Introductiontoasp netwindbgdebugging-100506045407-phpapp01
Introductiontoasp netwindbgdebugging-100506045407-phpapp01Introductiontoasp netwindbgdebugging-100506045407-phpapp01
Introductiontoasp netwindbgdebugging-100506045407-phpapp01
Camilo Alvarez Rivera
 
Chap 2 structure of c programming dti2143
Chap 2  structure of c programming dti2143Chap 2  structure of c programming dti2143
Chap 2 structure of c programming dti2143
alish sha
 

Similar to Windows Debugging and Troubleshooting (20)

.Net Debugging Techniques
.Net Debugging Techniques.Net Debugging Techniques
.Net Debugging Techniques
 
.NET Debugging Tips and Techniques
.NET Debugging Tips and Techniques.NET Debugging Tips and Techniques
.NET Debugging Tips and Techniques
 
UVM_Full_Print_n.pptx
UVM_Full_Print_n.pptxUVM_Full_Print_n.pptx
UVM_Full_Print_n.pptx
 
Windows Crash Dump Analysis
Windows Crash Dump AnalysisWindows Crash Dump Analysis
Windows Crash Dump Analysis
 
Continuous Integration and development environment approach
Continuous Integration and development environment approachContinuous Integration and development environment approach
Continuous Integration and development environment approach
 
IDAPRO
IDAPROIDAPRO
IDAPRO
 
Software for embedded systems complete
Software for embedded systems completeSoftware for embedded systems complete
Software for embedded systems complete
 
8 Tools for Troubleshooting Windows 8
8 Tools for Troubleshooting Windows 8 8 Tools for Troubleshooting Windows 8
8 Tools for Troubleshooting Windows 8
 
Beyond Static Analysis: Integrating .NET Static Analysis with Unit Testing a...
Beyond Static Analysis: Integrating .NET  Static Analysis with Unit Testing a...Beyond Static Analysis: Integrating .NET  Static Analysis with Unit Testing a...
Beyond Static Analysis: Integrating .NET Static Analysis with Unit Testing a...
 
Advanced driver debugging (13005399) copy
Advanced driver debugging (13005399)   copyAdvanced driver debugging (13005399)   copy
Advanced driver debugging (13005399) copy
 
01. introduction to-programming
01. introduction to-programming01. introduction to-programming
01. introduction to-programming
 
[DevDay 2017] Automation Testing - Speaker: Nghia Khuong - Project Manager at...
[DevDay 2017] Automation Testing - Speaker: Nghia Khuong - Project Manager at...[DevDay 2017] Automation Testing - Speaker: Nghia Khuong - Project Manager at...
[DevDay 2017] Automation Testing - Speaker: Nghia Khuong - Project Manager at...
 
Software development windows nutshell
Software development windows nutshellSoftware development windows nutshell
Software development windows nutshell
 
Sequence Like a Boss - BriForum 2015 Denver
Sequence Like a Boss - BriForum 2015 DenverSequence Like a Boss - BriForum 2015 Denver
Sequence Like a Boss - BriForum 2015 Denver
 
Information sheet PVS-Studio
Information sheet PVS-StudioInformation sheet PVS-Studio
Information sheet PVS-Studio
 
Introductiontoasp netwindbgdebugging-100506045407-phpapp01
Introductiontoasp netwindbgdebugging-100506045407-phpapp01Introductiontoasp netwindbgdebugging-100506045407-phpapp01
Introductiontoasp netwindbgdebugging-100506045407-phpapp01
 
Windows programming
Windows programmingWindows programming
Windows programming
 
Chap 2 structure of c programming dti2143
Chap 2  structure of c programming dti2143Chap 2  structure of c programming dti2143
Chap 2 structure of c programming dti2143
 
Ethical hacking chapter 8 - Windows Vulnerabilities - Eric Vanderburg
Ethical hacking   chapter 8 - Windows Vulnerabilities - Eric VanderburgEthical hacking   chapter 8 - Windows Vulnerabilities - Eric Vanderburg
Ethical hacking chapter 8 - Windows Vulnerabilities - Eric Vanderburg
 
Tool Development 09 - Localization & Testing
Tool Development 09 - Localization & TestingTool Development 09 - Localization & Testing
Tool Development 09 - Localization & Testing
 

More from Microsoft TechNet - Belgium and Luxembourg

More from Microsoft TechNet - Belgium and Luxembourg (20)

Windows 10: all you need to know!
Windows 10: all you need to know!Windows 10: all you need to know!
Windows 10: all you need to know!
 
Configuration Manager 2012 – Compliance Settings 101 - Tim de Keukelaere
Configuration Manager 2012 – Compliance Settings 101 - Tim de KeukelaereConfiguration Manager 2012 – Compliance Settings 101 - Tim de Keukelaere
Configuration Manager 2012 – Compliance Settings 101 - Tim de Keukelaere
 
Windows 8.1 a closer look
Windows 8.1 a closer lookWindows 8.1 a closer look
Windows 8.1 a closer look
 
Data Leakage Prevention
Data Leakage PreventionData Leakage Prevention
Data Leakage Prevention
 
Deploying and managing ConfigMgr Clients
Deploying and managing ConfigMgr ClientsDeploying and managing ConfigMgr Clients
Deploying and managing ConfigMgr Clients
 
Self Service BI anno 2013 – Where Do We Come From and Where Are We Going?
Self Service BI anno 2013 – Where Do We Come From and Where Are We Going?Self Service BI anno 2013 – Where Do We Come From and Where Are We Going?
Self Service BI anno 2013 – Where Do We Come From and Where Are We Going?
 
Hands on with Hyper-V Clustering Maintenance Mode & Cluster Aware Updating
Hands on with Hyper-V Clustering Maintenance Mode & Cluster Aware UpdatingHands on with Hyper-V Clustering Maintenance Mode & Cluster Aware Updating
Hands on with Hyper-V Clustering Maintenance Mode & Cluster Aware Updating
 
SCEP 2012 inside SCCM 2012
SCEP 2012 inside SCCM 2012SCEP 2012 inside SCCM 2012
SCEP 2012 inside SCCM 2012
 
Jump start your application monitoring with APM
Jump start your application monitoring with APMJump start your application monitoring with APM
Jump start your application monitoring with APM
 
What’s new in Lync Server 2013: Persistent Chat
What’s new in Lync Server 2013: Persistent ChatWhat’s new in Lync Server 2013: Persistent Chat
What’s new in Lync Server 2013: Persistent Chat
 
What's new for Lync 2013 Clients & Devices
What's new for Lync 2013 Clients & DevicesWhat's new for Lync 2013 Clients & Devices
What's new for Lync 2013 Clients & Devices
 
Office 365 ProPlus: Click-to-run deployment and management
Office 365 ProPlus: Click-to-run deployment and managementOffice 365 ProPlus: Click-to-run deployment and management
Office 365 ProPlus: Click-to-run deployment and management
 
Office 365 Identity Management options
Office 365 Identity Management options Office 365 Identity Management options
Office 365 Identity Management options
 
SharePoint Installation and Upgrade: Untangling Your Options
SharePoint Installation and Upgrade: Untangling Your Options SharePoint Installation and Upgrade: Untangling Your Options
SharePoint Installation and Upgrade: Untangling Your Options
 
The application model in real life
The application model in real lifeThe application model in real life
The application model in real life
 
Microsoft private cloud with Cisco and Netapp - Flexpod solution
Microsoft private cloud with Cisco and Netapp -  Flexpod solutionMicrosoft private cloud with Cisco and Netapp -  Flexpod solution
Microsoft private cloud with Cisco and Netapp - Flexpod solution
 
Managing Windows RT devices in the Enterprise
Managing Windows RT devices in the Enterprise Managing Windows RT devices in the Enterprise
Managing Windows RT devices in the Enterprise
 
Moving from Device Centric to a User Centric Management
Moving from Device Centric to a User Centric Management Moving from Device Centric to a User Centric Management
Moving from Device Centric to a User Centric Management
 
Network Management in System Center 2012 SP1 - VMM
Network Management in System Center 2012  SP1 - VMM Network Management in System Center 2012  SP1 - VMM
Network Management in System Center 2012 SP1 - VMM
 
Hackers (Not) Halted
Hackers (Not) Halted Hackers (Not) Halted
Hackers (Not) Halted
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Recently uploaded (20)

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 

Windows Debugging and Troubleshooting

  • 1.
  • 2. Introduction to the Debugging Tools for Windows Understanding Windows and x86/x64 Architectures Understanding Application Crashes Introducing Application Verifier Advanced Debugging Techniques
  • 3. 7 years working at Microsoft 3 years at Digital Equipment Corporation Instructor with David Solomon
  • 4.
  • 5. The Debugging Tools install four debuggers Support for all architectures supported by Windows WinDbg is a Windows–based debugging tool
  • 6. Several ways to select a debugging target Must know the name or the identifier of the target Support for noninvasive debugging
  • 7. WinDbg supports the use of workspaces Support included for a command line interface Access to symbols to perform debugging
  • 8. A collection of symbols contained within a single file
  • 9. Can be challenging to locate the required symbols Set the system wide environment variable Troubleshoot symbol loading errors with !sym noisy
  • 10. The most useful information is the Help file Use the .hh command from within the debugger Discovering commands with auto–complete
  • 11. Demo
  • 12.
  • 13. Registers, small areas of extremely fast storage Usually measured by the number of bits they hold x86 architecture provides 16 basic program registers x64 adds an additional 8 general–purpose registers
  • 14. Accessible using the r debugger command
  • 15. Windows provides support for a flat addressed virtual environment Linear address space is divided into fixed–size pages
  • 16. Windows provides support for a flat addressed virtual environment Linear address space is divided into fixed–size pages
  • 17. Accessible using the d debugger commands
  • 18. Process, an instance of a program Thread, a unit of execution within the system A unique identifier is assigned to both
  • 19. Using the !teb debugger command Using the !peb debugger command Using the inbuilt ~ command
  • 20. A storage location used by threads Useful to identify the flow of code in an application A unique stack is allocated to each thread
  • 21. Accessible using the k debugger commands
  • 22. Demo
  • 23.
  • 24. The result of an unhandled exception Windows uses structured exception handling Unhandled exceptions are passed to a system filter
  • 25. Dr Watson replaced with WerFault in Windows Vista A central location is now provided for users Additional support for non–critical events
  • 26. Default configuration is to not take a full dump Ability to exclude reports on a per application basis Doesn’t affect applications with their own support
  • 27. Application not terminated until the filter returns Must know the name or the PID of the application Allows a user to create a dump of the application
  • 28. Demo
  • 29.
  • 30. A runtime verification tool for native code Available as a separate download from Microsoft Injects verification DLLs into the application
  • 31. Configurable using the Application Verifier tool Certain verification layers require a debugger Support for using a command line interface
  • 32. Demo
  • 33.
  • 34. Possible to force dump creation of an application Using the built in Windows Task Manager Using the Debugging Tools for Windows
  • 35. Support for redirection using a kernel debugger The system must be started in debugging mode Useful in several advanced scenarios
  • 36. Demo
  • 37. Windows Internals, 5th Edition Advanced Windows Debugging Windows via C/C++, 5th Edition
  • 38. Memory Dump, Software Trace, Debugging, Malware and Intelligence Analysis Portal Advanced Windows Debugging and Troubleshooting