想了解我可以使用windbg作为Windows服务的验尸debugging器吗?的新动态吗?本文将为您提供详细的信息,此外,我们还将为您介绍关于c#–构建一个简单的Web服务器,我可以作为Window
想了解我可以使用windbg作为Windows服务的验尸debugging器吗?的新动态吗?本文将为您提供详细的信息,此外,我们还将为您介绍关于c# – 构建一个简单的Web服务器,我可以作为Windows服务运行、Debugging using Windbg : Symbols loading、debugging – 是否有Windowsdebugging器的检查点function?、debugging/解决WinDbg扩展问题(SwishDbgExt)的新知识。
本文目录一览:- 我可以使用windbg作为Windows服务的验尸debugging器吗?
- c# – 构建一个简单的Web服务器,我可以作为Windows服务运行
- Debugging using Windbg : Symbols loading
- debugging – 是否有Windowsdebugging器的检查点function?
- debugging/解决WinDbg扩展问题(SwishDbgExt)
我可以使用windbg作为Windows服务的验尸debugging器吗?
我将Windbg设置为默认的死后debugging器。 我通过运行windbg -I我做到了这一点。 但是,这似乎只捕获我login的用户运行的应用程序的未处理exception,而不是Windows服务。 有谁知道我怎么可以configurationwindbg来抓这些呢?
如果您计划从执行开始调试服务应用程序(包括其初始化代码),则需要执行此准备步骤。 http://msdn.microsoft.com/en-us/library/windows/hardware/ff553427(v=vs.85).aspx
您应该能够使用WinDbg附加或启动任何服务,即使那些不是由用户运行的: http : //support.microsoft.com/kb/824344
当WinDbg作为事后调试程序运行时,会由正在崩溃的进程启动。 在服务的情况下,它由运行在会话0中的进程启动,并且不能访问桌面。
您可以配置AeDebug注册表来启动一个创建崩溃转储和调试崩溃转储的进程。 您可以使用ntsd -server并连接到服务器。
总结
以上是小编为你收集整理的我可以使用windbg作为Windows服务的验尸debugging器吗?全部内容。
如果觉得小编网站内容还不错,欢迎将小编网站推荐给好友。
c# – 构建一个简单的Web服务器,我可以作为Windows服务运行
我想构建一个轻量级的Web服务器,它可以处理传入的请求并将它们传递给COM端口.我希望能够将它作为一个exe分发,将服务器安装为Windows服务.
您认为最好的语言是什么?什么IDE最适合所说的语言?
谢谢,
赛斯
解决方法
Debugging using Windbg : Symbols loading
This post explains how to use program symbol files to debug applications or kernel drivers on Windows operating system. On Windows platform, the program symbols are stored in a separate file. These files are referred as pdb files and has the extension .pdb. When debugging a program in windbg, we need these symbol files otherwise what we see in the stack trace is just numerical addresses instead of function names and variable names. We won’t be able to make out anything from these numerical addresses. The symbols stored in pdb files are function names, local variable names, global variable names etc.
Setting symbol path
To use the symbols for debugging, we need to tell windbg which directories it should look into, to find the symbols. To do this, click on File menu and then Symbol File Path. You can enter the path as shown in the below image.
The symbol path in this example is srv*c:\symbols*http://msdl.microsoft.com/download/symbols.
The first path is a local directory and the second path is the Microsoft’s symbol server path. This path is required to get the symbols for Windows libraries like shell32.dll, gdi32.dll, advapi32.dll, kernel32.dll, ntdll.dll and many more libraries. The application we need to debug might be using these libraries.
We can specify the symbol search path in windbg prompt also. The command for this is.sympath
For example to set the above search path we need to run the below command.
.sympath srv*c:\symbols*http://msdl.microsoft.com/download/symbols
To print the current symbol search path just run .sympath command.
.sympath
Loading symbols after setting the path
After setting the symbol search path we need to load the symbols for all the loaded modules in memory. For this run the below command.
.reload /f
To load symbols for a particular binary we can specify the binary file name in the .reload command. For example to load symbols for myapplication.exe you can run the below command.
.reload /f myapplication.exe
In this command you need to provide the full name of the binary name along with the extension. Otherwise you might see the message like below.
“Myapplication” was not found in the image list.
Debugger will attempt to load “Myapplication” at given base 00000000`00000000.Please provide the full image name, including the extension (i.e. kernel32.dll)
for more reliable results.
Issues with symbols loading
If none of the symbol files match with the binary file then .reload command fails with the below error message.
0:041> .reload /f MyApplication.exe
*** ERROR: Module load completed but symbols could not be loaded for MyApplication.exe
When you get this do the following. Enable verbose mode for symbols loading by running the command!sym noisy. And run the .reload command again. Check for the error messages it prints.
0:041> !sym noisy
noisy mode – symbol prompts on
0:041> .reload /f myapplication.exe
SYMSRV: c:\symbols\myapplication.pdb\38266E74B06B4EF3BCC16713A4A1E5E82\myapplication.pdb not found
SYMSRV: http://msdl.microsoft.com/download/symbols/myapplication.pdb/38266E74B06B4EF3BCC16713A4A1E5E82/myapplication.pdb not found
*** WARNING: Unable to verify checksum for myapplication.exe
*** ERROR: Module load completed but symbols could not be loaded for myapplication.exe
DBGHELP: myapplication – no symbols loaded
As you can see none of the symbol search paths have the Myapplication.pdb file. Before looking at how to fix this issue, let’s understand how windbg interpretes the symbol server path.
Understanding ‘SRV’ in symbol server path
Another thing you can notice in the above error is that, Windbg looks for the symbols files in a sub directory with the name myapplication.pdb/38266E74B06B4EF3BCC16713A4A1E5E82. This is because we used the keyword SRV in the symbol search path which indicates that this path need to be used as a symbol server path. For symbol servers, to identify the files path easily, Windbg uses the formatbinaryname.pdb/GUID. Each binary is given a unique GUID when the application is built and this GUID can be printed by the command!lmi binaryname. For example, to print GUID information for MyApplication.exe I need to run the command!lmi myapplication.
Now back to the symbol loading issue for Myapplication.exe. As the existing paths does not have this file, we need to add the path where the file is present. Let’s say the file is located at C:\localsymbls. Then we can add this path to the symbols search using.sympath+command. In our example, we need to run.symapth+ C:\localsymbols. This is a normal directory which directly stores pdb files, it’s not a server path. So we don’t prefix the path with SRV.
0:041> .sympath+ c:\localsymbols
DBGHELP: Symbol Search Path: srv*c:\symbols*http://msdl.microsoft.com/download/symbols;c:\localsymbols
DBGHELP: Symbol Search Path: srv*c:\symbols*http://msdl.microsoft.com/download/symbols;c:\localsymbols
Symbol search path is: srv*c:\symbols*http://msdl.microsoft.com/download/symbols;c:\localsymbols
Expanded Symbol search path is: srv*c:\symbols*http://msdl.microsoft.com/download/symbols;c:\localsymbols
0:041> .reload /f myapplication.exe
SYMSRV: c:\symbols\myapplication.pdb\38266E74B06B4EF3BCC16713A4A1E5E82\myapplication.pdb not found
SYMSRV: http://msdl.microsoft.com/download/symbols/myapplication.pdb/38266E74B06B4EF3BCC16713A4A1E5E82/myapplication.pdb not found
DBGHELP: c:\localsymbols\myapplication.pdb – mismatched pdb
DBGHELP: c:\localsymbols\exe\myapplication.pdb – file not found
DBGHELP: c:\localsymbols\symbols\exe\myapplication.pdb – file not foundDBGHELP: Couldn’t load mismatched pdb for myapplication.exe
*** ERROR: Module load completed but symbols could not be loaded for myapplication.exeDBGHELP: myapplication – no symbols loaded
Now we are into another problem. Windbg detected the symbol file but it says that the symbol file is not matching with the exe file. Let’s see how to fix this in the next section.
Symbol file not matching
If you see this issue, you need to crosscheck with your build numbers and pick up the right pdb file. If you are sure that the pdb file you are using is the right one, but still seeing this message, then you can use /i switch to load the symbols even if there is no match.
0:041> .reload /i myapplication.exe
SYMSRV: c:\symbols\myapplication.pdb\38266E74B06B4EF3BCC16713A4A1E5E82\myapplication.pdb not found
SYMSRV: http://msdl.microsoft.com/download/symbols/myapplication.pdb/38266E74B06B4EF3BCC16713A4A1E5E82/myapplication.pdb not found
DBGHELP: c:\localsymbols\myapplication.pdb – mismatched pdb
DBGHELP: c:\localsymbols\exe\myapplication.pdb – file not found
DBGHELP: c:\localsymbols\symbols\exe\myapplication.pdb – file not foundDBGHELP: Loaded mismatched pdb for myapplication.exe
DBGENG: myapplication.exe has mismatched symbols – type “.hh dbgerr003″ for details
DBGHELP: myapplication – private symbols & lines
c:\localsymbols\myapplication.pdb – unmatched
As you can see it looks for a matching pdb in all the search paths. As it does not find any, it loads the mismatched pdb in the end.
I hope this post has helped you in understanding how symbols loading works in Windbg. If something is not clear to you, or if you have any other questions, please share it in the comments below.
debugging – 是否有Windowsdebugging器的检查点function?
有一个窗口(win32,.net)debugging器可以做一些像gdb检查点?
http://sourceware.org/gdb/current/onlinedocs/gdb/Checkpoint_002fRestart.html
在我的新窗口安装Image.FromStream不以相同的方式工作
什么是控件的“On_Load”等效表单?
当窗体位于主监视器的上方和左方时,光标变为对angular线resize
.Net Windows服务和FileSystemWatcher问题
获取当前在Windows任务栏中可见的应用程序(或窗口)列表
我在Windows上听到的最接近的功能是IntelliTrace 。 另一个文档在这里: http : //msdn.microsoft.com/en-us/library/dd264915%28VS.100%29.aspx
该功能有很多限制 – 没有64位本地代码,脚本或sql CLR支持
debugging/解决WinDbg扩展问题(SwishDbgExt)
我目前正在学习Windows内存转储分析,我想使用称为SwishDbgExt的 WinDbg的开源扩展。
但是,当我运行WinDbg,与扩展加载,然后我尝试使用任何命令,打印此例外。
0: kd> !load C:UsersMartinDesktopSwishDbgExt-masterbinx64SwishDbgExt.dll SwishDbgExt v0.6.2.20150116 (Mar 27 2015) - Incident Response & Digital Forensics Debugging Extension SwishDbgExt copyright (C) 2014 MoonSols Ltd SwishDbgExt copyright (C) 2014 Matthieu Suiche (@msuiche) - http://msuiche.net This program comes with ABSOLUTELY NO NARRANTY; for details type 'show w'. This is free software,and you are welcome to redistribute it under certain conditions; type 'show c' for details. 0: kd> !SwishDbgExt.help Commands for C:UsersMartinDesktopSwishDbgExt-masterbinx64SwishDbgExt.dll: !help - displays information on available extension commands !ms_callbacks - display callback functions !ms_consoles - display console command's history !ms_credentials - display user's credentials (based on gentilwiki's mimikatz) !ms_drivers — display list of drivers !ms_dump - Dump memory space on disk !ms_exqueue - display Ex queued workers !ms_gdt — display GDT !ms_hivelist - display list of registry hives !ms_idt - display IDT !ms_malscore — Analyze a memory space and returns a Malware score Index (MSI) - (based on Frank Bo1dewin's work) !ms_mbr - Scan Master Boot Record (MBR) !ms_netstat — display network information (sockets,connections,...) !ms_object - display list of object !ms_process - display list of processes !ms_readkcb — Read key control block !ms_readknode - Read key node !ms_readkvalue - Read key value !ms_scanndishook — Scan and display suspicIoUs Ndis hooks !ms_services - display list of services !ms_ssdt - display service descriptor table (SDT) functions !ms_store — display information related to the Store Manager (ReadyBoost) !ms_timers - display list of KTIMER !ms_vacbs — display list of cached VACBs !help <cmd> will give more information for a particular command 0: kd> !ms_drivers ERROR: !ms_drivers: extension exception 0x80004005. "ExtRemoteTyped::ArrayElement: unable to retrieve element 0"
你知道人们如何解决或debugging吗?
PS:我的经验与C或大会是有限的,我只有在C#编程经验。
在PE文件中跳转存根
__imp_符号的语义
AR Drone 2.0中使用的dev / ttyO0 – 逆向工程
PE文件格式中的基本重定位表是什么?
.rdata和.idata片段有什么区别?
使用IDA Pro 5反向工程简单应用程序
使用DLL .NET内部方法
识别和拦截函数调用
在可执行二进制文件中更改一个特定的共享库
执行直到用户代码不起作用
我们今天的关于我可以使用windbg作为Windows服务的验尸debugging器吗?的分享就到这里,谢谢您的阅读,如果想了解更多关于c# – 构建一个简单的Web服务器,我可以作为Windows服务运行、Debugging using Windbg : Symbols loading、debugging – 是否有Windowsdebugging器的检查点function?、debugging/解决WinDbg扩展问题(SwishDbgExt)的相关信息,可以在本站进行搜索。
本文标签: