-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
architecture-agnostic injection supported
- issue #81 partially resolved - x64/x86 processes can be now attached to; - injector functionality is moved to a separate DLL - an ipc server ran via sandbox; - injector DLLs unloads itself upon completion; - vsix installers updated; - injector/process class is no longer an interface.
- Loading branch information
Showing
29 changed files
with
588 additions
and
185 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
if(NOT ANDROID_ABI OR ANDROID_ABI MATCHES "x86.*") | ||
if(CMAKE_SIZEOF_VOID_P EQUAL 4) | ||
if(WIN32) | ||
set(archid "Win32") | ||
else() | ||
set(archid "x86") | ||
endif() | ||
else() | ||
set(archid "x64") | ||
endif() | ||
elseif(ANDROID_ABI MATCHES "arm.*") | ||
set(archid "arm") | ||
endif() |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
// Copyright (c) 2011-2022 by Artem A. Gevorkyan (gevorkyan.org) | ||
// | ||
// Permission is hereby granted, free of charge, to any person obtaining a copy | ||
// of this software and associated documentation files (the "Software"), to deal | ||
// in the Software without restriction, including without limitation the rights | ||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
// copies of the Software, and to permit persons to whom the Software is | ||
// furnished to do so, subject to the following conditions: | ||
// | ||
// The above copyright notice and this permission notice shall be included in | ||
// all copies or substantial portions of the Software. | ||
// | ||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
// THE SOFTWARE. | ||
|
||
#pragma once | ||
|
||
#include <string> | ||
|
||
namespace micro_profiler | ||
{ | ||
enum injector_messages_id { | ||
request_injection, | ||
response_injected, | ||
}; | ||
|
||
struct injection_info | ||
{ | ||
std::string collector_path; | ||
std::string frontend_endpoint_id; | ||
unsigned int pid; | ||
}; | ||
|
||
|
||
|
||
template <typename ArchiveT> | ||
inline void serialize(ArchiveT &archive, injection_info &info) | ||
{ | ||
archive(info.collector_path); | ||
archive(info.frontend_endpoint_id); | ||
archive(info.pid); | ||
} | ||
|
||
template <typename ArchiveT> | ||
inline void serialize(ArchiveT &archive, injector_messages_id &data) | ||
{ archive(reinterpret_cast<int &>(data)); } | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,16 @@ | ||
cmake_minimum_required(VERSION 2.8) | ||
|
||
set(INJECTOR_SOURCES | ||
add_definitions(-DMP_EXPORT_PREFIX=__declspec\(dllexport\)) | ||
|
||
set(INJECTOR_LIB_SOURCES | ||
process_win32.cpp | ||
) | ||
set(INJECTOR_SOURCES | ||
injector.cpp | ||
) | ||
|
||
add_library(injector STATIC ${INJECTOR_SOURCES}) | ||
add_library(injector.lib STATIC ${INJECTOR_LIB_SOURCES}) | ||
add_library(${injector} SHARED ${INJECTOR_SOURCES}) | ||
|
||
target_link_libraries(injector psapi.lib) | ||
target_link_libraries(injector.lib psapi.lib) | ||
target_link_libraries(${injector} injector.lib ipc common logger scheduler) |
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.