- Display TIB(Thread Information Block) in watch:
- (_TEB*)$tib
Pokazywanie postów oznaczonych etykietą tools. Pokaż wszystkie posty
Pokazywanie postów oznaczonych etykietą tools. Pokaż wszystkie posty
środa, 31 lipca 2013
sobota, 22 czerwca 2013
piątek, 29 marca 2013
Collecting User-Mode Dumps
http://msdn.microsoft.com/en-us/library/windows/desktop/bb787181%28v=vs.85%29.aspx
http://blogs.microsoft.co.il/blogs/sasha/archive/2009/10/19/configuring-automatic-crash-dumps.aspx
Starting with Windows Server 2008 and Windows Vista with Service Pack 1 (SP1), Windows Error Reporting (WER) can be configured so that full user-mode dumps are collected and stored locally after a user-mode application crashes. Applications that do their own custom crash reporting, including .NET applications, are not supported by this feature.
This feature is not enabled by default. Enabling the feature requires administrator privileges. To enable and configure the feature, use the following registry values under the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps key.
| Value | Description | Type | Default value |
|---|---|---|---|
| DumpFolder | The path where the dump files are to be stored. If you do not use the default path, then make sure that the folder contains ACLs that allow the crashing process to write data to the folder. For service crashes, the dump is written to service specific profile folders depending on the service account used. For example, the profile folder for System services is %WINDIR%\System32\Config\SystemProfile. For Network and Local Services, the folder is %WINDIR%\ServiceProfiles. | REG_EXPAND_SZ | %LOCALAPPDATA%\CrashDumps |
| DumpCount | The maximum number of dump files in the folder. When the maximum value is exceeded, the oldest dump file in the folder will be replaced with the new dump file. | REG_DWORD | 10 |
| DumpType | Specify one of the following dump types:
| REG_DWORD | 1 |
| CustomDumpFlags | The custom dump options to be used. This value is used only when DumpType is set to 0. The options are a bitwise combination of the MINIDUMP_TYPE enumeration values. | REG_DWORD | MiniDumpWithDataSegs | MiniDumpWithUnloadedModules | MiniDumpWithProcessThreadData. |
These registry values represent the global settings. You can also provide per-application settings that override the global settings. To create a per-application setting, create a new key for your application under HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Windows Error Reporting\LocalDumps (for example, HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Windows Error Reporting\LocalDumps\MyApplication.exe). Add your dump settings under the MyApplication.exe key. If your application crashes, WER will first read the global settings, and then will override any of the settings with your application-specific settings.
After an application crashes and prior to its termination, the system will check the registry settings to determine whether a local dump is to be collected. After the dump collection has completed, the application will be allowed to terminate normally. If the application supports recovery, the local dump is collected before the recovery callback is called.
These dumps are configured and controlled independently of the rest of the WER infrastructure. You can make use of the local dump collection even if WER is disabled or if the user cancels WER reporting. The local dump can be different than the dump sent to Microsoft.
To have it working on my Windows 7 x64 I had to set auto="0" in:
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\Windows NT\CurrentVersion\AeDebugwtorek, 5 lutego 2013
Poor Man’s Visual Studio Cppcheck Integration (By Aleksey Vitebskiy, 9 Oct 2012)
http://www.codeproject.com/Tips/472065/Poor-Man-s-Visual-Studio-Cppcheck-Integration
This article is a re-post from http://avitebskiy.blogspot.com/2012/10/poor-mans-visual-studio-cppcheck.html.



Introduction
Cppcheck is a good tool to have in your arsenal. Anything that helps me avoid stupid mistakes is very welcome. The problem is that if you use Visual Studio, you either have to use the separate Cppcheck GUI or pay an arm and a leg for something like Visual Lint. If you want a more convenient way to run Cppcheck on your code, but don't want to shell out $200 for the privilege, there's a fairly easy way to do a simple integration.This article is a re-post from http://avitebskiy.blogspot.com/2012/10/poor-mans-visual-studio-cppcheck.html.
Getting Started
First things first, download the latest version Cppcheck from http://cppcheck.sourceforge.net/ and install it. This will give you both the command line version and the GUI version of Cppcheck.Create a Visual Studio External Tool
In Visual Studio, open menu Tools→External Tools...- Click the Add button
- Set the Title, for example Cppcheck
- Set Command to C:\Program Files (x86)\Cppcheck\cppcheck.exe
- Set Arguments to --quiet --verbose --template=vs $(ItemPath)
- Set Initial Directory to $(ItemDir)
- Make sure Use Output window checkbox is enabled
- Click on the Move Up button repeatedly until your entry is at the top of the list, this will make it easier to identify you new command as you can count on it being called Tools.ExternalCommand1
- Click OK.
Use the Tool
You can now use select the Cppcheck menu entry any time you want to run Cppcheck on a file. The cool thing about the --template=vs switch is that you can click on a Cppcheck error and Visual Studio will automatically take you to that line of code:Automate Cppcheck to Run on File Save
Now that we have created a command to run Cppcheck, we can have it run automatically after a file save:- Go to menu Tools→Macros→Macros IDE, this will bring up a the Macros IDE
- On the left hand side there should be a Project Explorer panel
- In the Project Explorer panel, double click on EnvironmentEvents module
- Insert the following code in the module:
Private Sub DocumentEvents_DocumentSaved(ByVal Document As EnvDTE.Document) Handles DocumentEvents.DocumentSaved
If Document.Language = "C/C++" Then
DTE.ExecuteCommand("Tools.ExternalCommand1")
Document.Activate()
End If
End Sub
- Now save the module, close the Macros IDE, and you're good to go
License
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)
About the Author
|
|
Aleksey Vitebskiy |
No Biography provided
Subskrybuj:
Posty (Atom)