remove debug

This commit is contained in:
Rebekah 2019-06-20 13:37:04 -04:00
parent 4dd5814b91
commit 637175c4d3
2 changed files with 3 additions and 3 deletions

View File

@ -7,8 +7,9 @@ file(GLOB_RECURSE NEKOHACK_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp")
add_library(nekohack STATIC ${NEKOHACK_SOURCES})
target_include_directories(nekohack PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/include/hack")
target_include_directories(nekohack PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include/")
target_link_libraries(nekohack PUBLIC dl)
add_library(nekohack-dummy SHARED "${CMAKE_CURRENT_SOURCE_DIR}/example/dummy.cpp")
add_executable(nekohack-example "${CMAKE_CURRENT_SOURCE_DIR}/example/main.cpp")
target_include_directories(nekohack-example PRIVATE nekohack)
target_link_libraries(nekohack-example PRIVATE nekohack nekohack-dummy dl)
target_link_libraries(nekohack-example PRIVATE nekohack nekohack-dummy)

View File

@ -18,7 +18,7 @@
*/
#include <cstring>
#include <iostream>
#include "memory.hpp"
#include "sharedlibrary.hpp"
@ -47,7 +47,6 @@ void SharedLibrary::Init(std::string_view _name){
Passthrough pass;
pass.name = '/' + std::string(_name) + '.';
if (!dl_iterate_phdr([](struct dl_phdr_info* info, size_t, void* _pass) {
std::cout << "Lib: " << info->dlpi_name << std::endl;
auto* pass = reinterpret_cast<Passthrough*>(_pass);
if (!strstr(info->dlpi_name, pass->name.c_str()))
return 0;