windbg

Can I install both x86/x64 windbg on my x64 WIN7?

你离开我真会死。 提交于 2019-12-30 06:21:17
问题 I need to analysis some x86 dump file, So I want to install the x86 windbg on my computer. or if I can use the x64 windbg to analysis the x86 dump file? 回答1: Yes, and it is a good idea to do so since you'll need the 32 bit version to debug 32 bit applications/dumps. All the files are located in the install directory, so you can have any number of installations side by side. Also, keep in mind that if you use a 64 bit tool to create a dump, you'll get a 64 bit dump - even if the process is 32

SOS Debugging Extensions for Microsoft.NET.CoreRuntime

风格不统一 提交于 2019-12-30 05:23:28
问题 While trying to track down a fatal null pointer language exceptions (c000027b) in a UWP C#/XAML store project with WinDbg, I cannot get to the CLR Exception object because of a missing SOS debugging extention for Microsoft.NET.CoreRuntime. I was unable to locate a matching sos.dll. What am I missing? Note: The app crash is reproducible, but only happens when not debugging. So running the project under the Visual Studio debugger is unfortunately not a solutions in this case. [...] 0:009> dt

windbg debug memory leakage

只愿长相守 提交于 2019-12-30 04:23:54
program: #include "stdlib.h" #include <crtdbg.h> void testLeak1() { new int; } void testLeak2() { malloc(123); } int _tmain(int argc, _TCHAR* argv[]) { _CrtSetDbgFlag( _CrtSetDbgFlag(_CRTDBG_REPORT_FLAG) | _CRTDBG_LEAK_CHECK_DF | _CRTDBG_CHECK_ALWAYS_DF | _CRTDBG_CHECK_CRT_DF ); malloc(100); testLeak1(); testLeak2(); return 0; } CommandLine: D:\ctest\test\Debug\test.exe CommandLine: D:\ctest\test\Debug\test.exe Unable to deliver callback, Unable to deliver callback, 127127 Symbol search path is: Symbol search path is: SRV*C:\MyLocalSymbols*http://msdl.microsoft.com/download/symbols SRV*C:

How can I extract DLL file from memory dump?

橙三吉。 提交于 2019-12-29 07:36:09
问题 I have a memory dump (unmanaged process) . How can I extract (using windbg) one of the dlls loaded into the process ? I mean actually saving the dll file into the disk 回答1: You can use the sos.dll inside windbg directory. First, load the sos.dll in windbg: .load clr10\sos.dll Then use !sam OR !SaveAllModule to extract the modules on specific disk location: !sam c:\notepad 回答2: To extract a DLL without using SOS, use the .writemem extension as follows: discover the module start and end

Breakpoint set by sosex.mbp or sosex.mbm not working

扶醉桌前 提交于 2019-12-29 06:10:26
问题 I am using VS.NET 2010. I compiled a very simple .NET 4.0 application. using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace TestWindbg { class Program { static void Main(string[] args) { Console.ReadLine(); Func1(); } static void Func1() { int i = 0; int j = i + 2; Console.WriteLine(j); } } } I open the compiled executable by windbg 6.12.0002.633. Typed in the following commands to load sosex .loadby sosex clr Then, type in the following command to

Breakpoint set by sosex.mbp or sosex.mbm not working

情到浓时终转凉″ 提交于 2019-12-29 06:10:21
问题 I am using VS.NET 2010. I compiled a very simple .NET 4.0 application. using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace TestWindbg { class Program { static void Main(string[] args) { Console.ReadLine(); Func1(); } static void Func1() { int i = 0; int j = i + 2; Console.WriteLine(j); } } } I open the compiled executable by windbg 6.12.0002.633. Typed in the following commands to load sosex .loadby sosex clr Then, type in the following command to

Breakpoint set by sosex.mbp or sosex.mbm not working

丶灬走出姿态 提交于 2019-12-29 06:10:12
问题 I am using VS.NET 2010. I compiled a very simple .NET 4.0 application. using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace TestWindbg { class Program { static void Main(string[] args) { Console.ReadLine(); Func1(); } static void Func1() { int i = 0; int j = i + 2; Console.WriteLine(j); } } } I open the compiled executable by windbg 6.12.0002.633. Typed in the following commands to load sosex .loadby sosex clr Then, type in the following command to

Breakpoint set by sosex.mbp or sosex.mbm not working

旧时模样 提交于 2019-12-29 06:10:09
问题 I am using VS.NET 2010. I compiled a very simple .NET 4.0 application. using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace TestWindbg { class Program { static void Main(string[] args) { Console.ReadLine(); Func1(); } static void Func1() { int i = 0; int j = i + 2; Console.WriteLine(j); } } } I open the compiled executable by windbg 6.12.0002.633. Typed in the following commands to load sosex .loadby sosex clr Then, type in the following command to

Understanding CLR object size between 32 bit vs 64 bit

半世苍凉 提交于 2019-12-29 03:57:24
问题 I am trying to understand the object size difference between 32 bit and 64 bit processors. Let’s say I have a simple class class MyClass { int x; int y; } So on a 32 bit machine, an integer is 4 bytes. If I add the Syncblock into it ( another 4 bytes), the object size will be 12 bytes. Why is it showing 16 bytes? 0:000> !do 0x029d8b98 Name: ConsoleApplication1.Program+MyClass MethodTable: 000e33b0 EEClass: 000e149c Size: 16(0x10) bytes (C:\MyTemp\ConsoleApplication1\ConsoleApplication1\bin

how to set breakpoint and show source code when using cdb to debug c++ programs?

六眼飞鱼酱① 提交于 2019-12-26 18:23:21
问题 why bp main failed? how to list source code as gdb's list command does? this question is not the same as CDB command for setting a breakpoint based on a line number seems cdb can be used with windbg, but is that possible to use cdb a bit similar to gdb? 回答1: cdb allows 3 different commands to set breakpoints: bp, bm, and bu bp accepts arguments that are numeric addresses bm accepts arguments that are textual symbols in a module that is already loaded bu accepts arguments that are textual