windbg

VB6 Debugging - compiled

六眼飞鱼酱① 提交于 2019-11-28 14:40:58
My scenario is I'm supporting a VB6 app at the place I work and in the last few weeks it has started crashing more often than it ever used to. It uses both a local Access MDB database and a remote SQL Server DB for different types of storage. The good news is we are writing a replacement app, the band news I need to support this one in the meantime and the vendor is long gone from this world. What are some ways I could try and diagnose what is causing the crash? For example so far I've tried ODBC tracing (For the MDB component), SQL Profiler tracing and ProcMon on a client PC. Is there

WinDbg常用命令系列---!address

梦想的初衷 提交于 2019-11-28 12:41:12
!address 这个!address扩展命令显示有关目标进程或目标计算机使用的内存的信息。 用户模式: !address Address !address -summary !address [-f:F1,F2,...] {[-o:{csv | tsv | 1}] | [-c:"Command"]} !address -? | -help 内核模式: !address Address !address 参数: Address 仅显示包含地址的地址空间区域。 -summary 仅显示摘要信息。 -f:F1, F2, ... 仅显示由筛选器f1、f2等指定的区域。 以下筛选器值通过目标进程使用内存区域的方式指定内存区域。 筛选器值 显示的内存区域 VAR 繁忙地区。这些区域包括所有虚拟分配块、sbh堆、来自自定义分配程序的内存以及地址空间中不属于其他分类的所有其他区域。 Free 自由内存。这包括所有尚未保留的内存。 Image 映射到作为可执行映像一部分的文件的内存。 Stack 用于线程堆栈的内存。 Teb 用于线程环境块 (Teb) 的内存。 Peb 使用进程环境块 (PEB) 内存。 Heap 使用的堆内存量。 PageHeap 用于在整页堆的内存区域。 CSR CSR 共享内存。 Actx 用于激活上下文数据的内存。 NLS 用于区域语言支持 (NLS) 的表的内存。

WinDbg常用命令系列---!analyze

这一生的挚爱 提交于 2019-11-28 12:40:54
!analyze命令简介 这个 !analyze扩展显示有关当前异常或错误检查的信息。 用户模式: !analyze [-v] [-f | -hang] [-D BucketID] !analyze -c [-load KnownIssuesFile | -unload | -help ] 内核模式: !analyze [-v] [-f | -hang] [-D BucketID] !analyze -c [-load KnownIssuesFile | -unload | -help ] !analyze -show BugCheckCode [BugParameters] 参数: -v 显示详细输出。 -f 生成!analyze异常输出。 即使调试器未检测到异常,也可以使用此参数查看异常分析。 -hang 生成!analyze -hang的应用程序输出。当目标遇到错误检查或异常,但分析应用程序挂起的原因与您的问题更相关时,请使用此参数。在内核模式下,!analyze-hang调查系统持有的锁,然后扫描dpc队列链。在用户模式下,!analyze-hang分析线程堆栈,以确定是否有任何线程正在阻塞其他线程。在以用户模式运行此扩展之前,请考虑将当前线程更改为您认为已停止响应的线程(即挂起),因为异常可能已将当前线程更改为其他线程。 -D BucketID

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

◇◆丶佛笑我妖孽 提交于 2019-11-28 12:40:42
.effmach (Effective Machine) .effmach命令显示或更改调试器使用的处理器模式。 .effmach [MachineType] 参数: MachineType 指定调试器用于此会话的处理器类型。如果省略此参数,调试器将显示当前计算机类型。 您可以输入下列机器类型之一。 计算机类型 说明 . 使用目标计算机的本机处理器模式的处理器模式。 # 使用为最近事件执行的代码的处理器模式。 x86 使用基于 x86 的处理器模式。 amd64 使用基于 x64 的处理器模式。 ebc 使用 EFI 字节代码处理器模式。 arm 使用 ARM64 处理器模式。 chpe 使用 CHPE 处理器模式。 环境: 模式 用户模式下,内核模式 目标 实时、 崩溃转储 平台 全部 处理器模式影响许多调试器功能: 哪个处理器用于堆栈跟踪。 进程是使用32位指针还是64位指针。 哪个处理器的寄存器集是活动的。 来源: http://www.cnblogs.com/yilang/p/11563225.html

WinDbg常用命令系列---?*

筅森魡賤 提交于 2019-11-28 12:40:31
? (Command Help) 问号(?)字符显示所有命令和运算符的列表。问号本身显示命令帮助。 环境 模式 用户模式下,内核模式 目标 实时、 崩溃转储 平台 全部 0:000> ? Open debugger.chm for complete debugger documentation B[C|D|E][<bps>] - clear/disable/enable breakpoint(s) BL - list breakpoints BA <access> <size> <addr> - set processor breakpoint BP <address> - set soft breakpoint D[type][<range>] - dump memory DT [-n|y] [[mod!]name] [[-n|y]fields] [address] [-l list] [-a[]|c|i|o|r[#]|v] - dump using type information DV [<name>] - dump local variables DX [-r[#]] <expr> - display C++ expression using extension model (e.g.: NatVis) E[type] <address> [<values>] -

When is a divide by zero not a divide by zero? A puzzle in the debugger (static variable issues)

岁酱吖の 提交于 2019-11-28 11:58:22
I'm very confused and I think my debugger is lying to me. I have the following loop in my code: MyClass::UploadFile(CString strFile) { ... static DWORD dwLockWaitTime = EngKey::GetDWORD(DNENG_SERVER_UPLOAD_LOCK_WAIT_TIME, DNENG_SERVER_UPLOAD_LOCK_WAIT_TIME_DEFAULT); static DWORD dwLockPollInterval = EngKey::GetDWORD(DNENG_SERVER_UPLOAD_LOCK_POLL_INTERVAL, DNENG_SERVER_UPLOAD_LOCK_POLL_INTERVAL_DEFAULT); LONGLONG llReturnedOffset(0LL); BOOL bLocked(FALSE); for (DWORD sanity = 0; (sanity == 0 || status == RESUMABLE_FILE_LOCKED) && sanity < (dwLockWaitTime / dwLockPollInterval); sanity++) { ...

Using windbg from Visual Studio

时光总嘲笑我的痴心妄想 提交于 2019-11-28 11:32:23
Is it possible to use windbg commands like !locks and .loadby sos mscorwks from the Visual Studio command window (in a debug session)? I've noticed I can use eg k to print a stack trace, so I was wondering if there is some way to get access to the other commands. ferosekhanj Yes you can do this. Attach Visual studio 2008 to your process for debugging. Break at some code. Go to immediate window type !load sos Now you are free to use any of the windbg commands like !EEHeap,!DumpHeap There are some conditions. You need to enable unmanaged code debugging in your project properties. Normally in 64

How to get Qt Creator to work with CDB?

前提是你 提交于 2019-11-28 11:12:37
I'm using Qt Creator 2.01 32-bit with Qt 4.7.1 on Windows 7 64-bit. I compiled my Qt library using Microsoft Visual C++ 2010. Now I want to use CDB with Qt Creator (or GDB if that works, or whatever is the best option). What exactly do I need to do to be able to debug with CDB (so I can set break points and see symbols)? Please don't just point me to http://qt-project.org/doc/qtcreator-2.8/creator-debugger-engines.html because I've been there and I'm still missing something. I have Windows SDK installed with debugger tools (but I think it's the 64-bit version). What I'm looking for is what

How to get a Windows symbol server set up

限于喜欢 提交于 2019-11-28 09:20:41
I have a spare server on the network that I'd like to have host all of our build symbols. I already know how to set up a symbol cache on my local development system and pointing my debugger (e.g. Windbg) to that path in 'Symbol File Path'. I presumed that I could do the same with another system on the network that has its own symbol cache (e.g. \\host\symbols). I set up the server and enabled file sharing on the directory, so I'm able to access it remotely through Windows Explorer. However, when I try pointing to it in WinDbg, it doesn't seem to pick up the symbols there. The Symbol File Path

How to check if the Microsoft symbol server is available, and contact them if not?

烈酒焚心 提交于 2019-11-28 09:12:30
问题 When I use WinDbg command .reload /f /v ntdll.dll to download symbol from microsoft symbol server the request always fails as below: AddImage: C:\Windows\System32\ntdll.dll DllBase = 00007ffc`27850000 Size = 001ce000 Checksum = 001ca321 TimeDateStamp = 57dcb78c SYMSRV: BYINDEX: 0x10D d:\symbols*http://msdl.microsoft.com/download/symbols ntdll.pdb 70F83B45D56645FD962606D8D09AF5971 SYMSRV: d:\symbols\ntdll.pdb\70F83B45D56645FD962606D8D09AF5971\ntdll.pdb - file not found SYMSRV: HTTPGET: