-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revise approach for exporting consistent trace store type information.
- Loading branch information
Showing
21 changed files
with
613 additions
and
738 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<ItemGroup Label="ProjectConfigurations"> | ||
<ProjectConfiguration Include="Debug|Win32"> | ||
<Configuration>Debug</Configuration> | ||
<Platform>Win32</Platform> | ||
</ProjectConfiguration> | ||
<ProjectConfiguration Include="PGOptimize|Win32"> | ||
<Configuration>PGOptimize</Configuration> | ||
<Platform>Win32</Platform> | ||
</ProjectConfiguration> | ||
<ProjectConfiguration Include="PGOptimize|x64"> | ||
<Configuration>PGOptimize</Configuration> | ||
<Platform>x64</Platform> | ||
</ProjectConfiguration> | ||
<ProjectConfiguration Include="Release|Win32"> | ||
<Configuration>Release</Configuration> | ||
<Platform>Win32</Platform> | ||
</ProjectConfiguration> | ||
<ProjectConfiguration Include="Debug|x64"> | ||
<Configuration>Debug</Configuration> | ||
<Platform>x64</Platform> | ||
</ProjectConfiguration> | ||
<ProjectConfiguration Include="Release|x64"> | ||
<Configuration>Release</Configuration> | ||
<Platform>x64</Platform> | ||
</ProjectConfiguration> | ||
<ProjectConfiguration Include="PGInstrument|Win32"> | ||
<Configuration>PGInstrument</Configuration> | ||
<Platform>Win32</Platform> | ||
</ProjectConfiguration> | ||
<ProjectConfiguration Include="PGInstrument|x64"> | ||
<Configuration>PGInstrument</Configuration> | ||
<Platform>x64</Platform> | ||
</ProjectConfiguration> | ||
<ProjectConfiguration Include="PGUpdate|Win32"> | ||
<Configuration>PGUpdate</Configuration> | ||
<Platform>Win32</Platform> | ||
</ProjectConfiguration> | ||
<ProjectConfiguration Include="PGUpdate|x64"> | ||
<Configuration>PGUpdate</Configuration> | ||
<Platform>x64</Platform> | ||
</ProjectConfiguration> | ||
</ItemGroup> | ||
<PropertyGroup Label="Globals"> | ||
<ProjectGuid>{17D8DCFB-E29E-4E53-9AB2-1E01CC811833}</ProjectGuid> | ||
<RootNamespace>ModuleLoaderExe</RootNamespace> | ||
<TargetPlatformVersion>10.0.14393.0</TargetPlatformVersion> | ||
<PlatformToolset>v140</PlatformToolset> | ||
</PropertyGroup> | ||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> | ||
<PropertyGroup Label="Configuration"> | ||
<ConfigurationType>Application</ConfigurationType> | ||
</PropertyGroup> | ||
<Import Project="..\Tracer.props" /> | ||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> | ||
<ImportGroup Label="ExtensionSettings"> | ||
</ImportGroup> | ||
<ImportGroup Label="Shared"> | ||
</ImportGroup> | ||
<ImportGroup Label="PropertySheets" Condition="'$(Platform)'=='Win32'"> | ||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | ||
</ImportGroup> | ||
<ImportGroup Label="PropertySheets" Condition="'$(Platform)'=='x64'"> | ||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | ||
</ImportGroup> | ||
<PropertyGroup Label="UserMacros" /> | ||
<PropertyGroup> | ||
<TargetName>ModuleLoader</TargetName> | ||
<TargetExt>.exe</TargetExt> | ||
</PropertyGroup> | ||
<ItemDefinitionGroup> | ||
<Link> | ||
<SubSystem>Console</SubSystem> | ||
<AdditionalDependencies>TracerHeapLib.lib;TracerConfigLib.lib;%(AdditionalDependencies)</AdditionalDependencies> | ||
</Link> | ||
<ClCompile> | ||
<PreprocessorDefinitions>_TRACER_HEAP_STATIC_LIB;_TRACER_CONFIG_STATIC_LIB;_TRACER_CORE_NO_API_EXPORT_IMPORT;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
</ClCompile> | ||
</ItemDefinitionGroup> | ||
<ItemGroup> | ||
<ClInclude Include="stdafx.h" /> | ||
<ClInclude Include="targetver.h" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ClCompile Include="ModuleLoaderExeMain.c" /> | ||
<ClCompile Include="stdafx.c"> | ||
<PrecompiledHeader>Create</PrecompiledHeader> | ||
</ClCompile> | ||
<ClCompile Include="main.c" /> | ||
</ItemGroup> | ||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> | ||
<ImportGroup Label="ExtensionTargets"> | ||
</ImportGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<ItemGroup> | ||
<Filter Include="Source Files"> | ||
<UniqueIdentifier>{AB3707CE-FC84-4F71-AE08-CD0D62850648}</UniqueIdentifier> | ||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> | ||
</Filter> | ||
<Filter Include="Header Files"> | ||
<UniqueIdentifier>{2B34BB95-0D79-4DF4-889B-A02E5CBC8000}</UniqueIdentifier> | ||
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions> | ||
</Filter> | ||
<Filter Include="Resource Files"> | ||
<UniqueIdentifier>{568315A1-4F7E-420B-A3BB-0AB45C2BC800}</UniqueIdentifier> | ||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions> | ||
</Filter> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ClInclude Include="targetver.h"> | ||
<Filter>Header Files</Filter> | ||
</ClInclude> | ||
<ClInclude Include="stdafx.h"> | ||
<Filter>Header Files</Filter> | ||
</ClInclude> | ||
<ClInclude Include="..\Rtl\__C_specific_handler.h"> | ||
<Filter>Header Files</Filter> | ||
</ClInclude> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ClCompile Include="main.c"> | ||
<Filter>Source Files</Filter> | ||
</ClCompile> | ||
<ClCompile Include="stdafx.c"> | ||
<Filter>Source Files</Filter> | ||
</ClCompile> | ||
<ClCompile Include="..\Rtl\__C_specific_handler.c"> | ||
<Filter>Source Files</Filter> | ||
</ClCompile> | ||
<ClCompile Include="ModuleLoaderExeMain.c"> | ||
<Filter>Source Files</Filter> | ||
</ClCompile> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
/*++ | ||
Copyright (c) 2017 Trent Nelson <[email protected]> | ||
Module Name: | ||
ModuleLoaderExeMain.c | ||
Abstract: | ||
This module implements ModuleLoaderExeMain(). It is intended to be | ||
called from the mainCRTStartup() routine of an executable. | ||
--*/ | ||
|
||
#include "stdafx.h" | ||
|
||
ULONG | ||
ModuleLoaderExeMain(VOID) | ||
{ | ||
PRTL Rtl; | ||
ALLOCATOR Allocator; | ||
PTRACER_CONFIG TracerConfig; | ||
PUNICODE_STRING RegistryPath; | ||
|
||
// | ||
// Initialize the default heap allocator. This is a thin wrapper around | ||
// the generic Win32 Heap functions. | ||
// | ||
|
||
if (!DefaultHeapInitializeAllocator(&Allocator)) { | ||
goto Error; | ||
} | ||
|
||
// | ||
// Initialize TracerConfig and Rtl. | ||
// | ||
|
||
RegistryPath = (PUNICODE_STRING)&TracerRegistryPath; | ||
|
||
CHECKED_MSG( | ||
CreateAndInitializeTracerConfigAndRtl( | ||
&Allocator, | ||
RegistryPath, | ||
&TracerConfig, | ||
&Rtl | ||
), | ||
"CreateAndInitializeTracerConfigAndRtl()" | ||
); | ||
|
||
// | ||
// Load all known tracer modules. | ||
// | ||
|
||
if (!LoadAllTracerModules(TracerConfig)) { | ||
goto Error; | ||
} | ||
|
||
// | ||
// Sleep until killed. | ||
// | ||
|
||
return SleepEx(INFINITE, TRUE); | ||
|
||
Error: | ||
|
||
return 1; | ||
} | ||
|
||
// vim:set ts=8 sw=4 sts=4 tw=80 expandtab : |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/*++ | ||
Copyright (c) 2017 Trent Nelson <[email protected]> | ||
Module Name: | ||
main.c | ||
Abstract: | ||
This module is the main entry point for the tracer executable. | ||
It implements mainCRTStartup(), which simply calls LoadModulesExeMain(). | ||
--*/ | ||
|
||
#include "stdafx.h" | ||
|
||
LONG ModuleLoaderExeMain(VOID); | ||
|
||
DECLSPEC_NORETURN | ||
VOID | ||
WINAPI | ||
mainCRTStartup() | ||
{ | ||
ExitProcess(ModuleLoaderExeMain()); | ||
} | ||
|
||
// vim:set ts=8 sw=4 sts=4 tw=80 expandtab : |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#include "stdafx.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/*++ | ||
Copyright (c) 2017 Trent Nelson <[email protected]> | ||
Module Name: | ||
stdafx.h | ||
Abstract: | ||
This is the precompiled header file for the ModuleLoaderExe component. | ||
--*/ | ||
|
||
#pragma once | ||
|
||
#include "targetver.h" | ||
|
||
#include <Windows.h> | ||
#include "../Rtl/Rtl.h" | ||
#include "../Rtl/__C_specific_handler.h" | ||
#include "../TracerHeap/TracerHeap.h" | ||
#include "../TracerConfig/TracerConfig.h" | ||
#include "../TracerConfig/TracerConfigPrivate.h" | ||
|
||
// vim:set ts=8 sw=4 sts=4 tw=80 expandtab : |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#include <SDKDDKVer.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.