熟悉C++并尝试了C++ 11提供的一些新功能之后,我决定更熟悉C#.
正如所料,编程原理类似,但有些功能不同.差异和相似之处正是我所关注的,因此我决定问C#是否与C++ 11中的decltype相当?
int x = 4;
decltype(x) y = 16;
Run Code Online (Sandbox Code Playgroud) 这是我想要解决的问题.我有谷歌Chrome的崩溃转储.
我打开windbg说文件 - >符号文件路径:"SRV*c:\ code\symbols*http://msdl.microsoft.com/download/symbols; SRV*c:\ code\symbols*https:// chromium -browser-symsrv.commondatastorage.googleapis.com"我想从头到右寻找调试符号,最后应该从google中获取它们.我从http://www.chromium.org/developers/how-tos/debugging复制了它.
我将崩溃转储拖放到windbg中
然后...
Microsoft (R) Windows Debugger Version 6.2.8400.0 AMD64
Copyright (c) Microsoft Corporation. All rights reserved.
Loading Dump File [C:\Users\cburgdorf\Desktop\Chrome-last.dmp]
User Mini Dump File: Only registers, stack and portions of memory are available
Symbol search path is: SRV*c:\code\symbols*http://msdl.microsoft.com/download/symbols;SRV*c:\code\symbols*https://chromium-browser-symsrv.commondatastorage.googleapis.com
Executable search path is:
Windows 7 Version 7601 (Service Pack 1) MP (8 procs) Free x86 compatible
Product: WinNt, suite: SingleUserTS
Machine Name:
Debug session time: Wed May 16 16:25:24.000 2012 …
Run Code Online (Sandbox Code Playgroud) TerminateProcess 的文档部分指出:
This function stops execution of all threads within the process and requests
cancellation of all pending I/O.
...
TerminateProcess is asynchronous; it initiates termination and returns
immediately. If you need to be sure the process has terminated, call the
WaitForSingleObject function with a handle to the process.
Run Code Online (Sandbox Code Playgroud)
如果您使用 TerminateProcess 来自杀进程,会发生什么,这留下了一些模糊性,如下所示:
TerminateProcess(GetCurrentProcess(), exit_code)
Run Code Online (Sandbox Code Playgroud)
从逻辑上讲,这应该足够了,但文档说执行之后可能会继续,如果由于错误使进程处于不确定状态而调用 TerminateProcess,则这是危险的。
我发现最接近确认不需要等待自杀的是 _invoke_watson 的源代码:
C:\Program Files (x86)\Windows Kits\10\Source\10.0.10240.0\ucrt\misc\invalid_parameter.cpp
Run Code Online (Sandbox Code Playgroud)
该函数所做的最后一件事是调用 TerminateProcess 本身 - 无需等待。
最好能得到确定性,我想在这里问这个问题,以便答案可以作为文档的补充。
gcc通常将构建ID嵌入到共享对象中,以允许自动检索符号(以及共享对象本身).该计划在此记录:
http://fedoraproject.org/wiki/Releases/FeatureBuildId
我有一个我想分析的用户模式核心转储,我知道,根据上面的文章,它很可能包含我关心的所有共享对象的构建ID(总共几十个).如果我可以从核心转储中提取构建ID,那么我可以在我们的存档中找到正确的版本,并能够调试此核心转储(以及未来的核心转储).
核心转储来自另一台我无法访问的计算机,我无法信任该计算机上的用户,以便向我提供有关该计算机上的哪些模块的其他信息.
所以...任何想法gdb命令或read-elf魔法会找到我这些构建ID?