Skip to content

Commit

Permalink
change source code to unified layout
Browse files Browse the repository at this point in the history
  • Loading branch information
eyck committed May 21, 2022
1 parent 5a19e01 commit 1dd870d
Show file tree
Hide file tree
Showing 37 changed files with 29 additions and 25 deletions.
24 changes: 14 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,23 @@ if(WITH_LLVM)
endif()

set(LIB_SOURCES
src/dbgsrvbase.cpp
src/gdb_session.cpp
src/vm_base.cpp
src/cmdhandler.cpp
src/target_adapter_base.cpp
src/encoderdecoder.cpp
src/loader.cpp
src/iss/debugger/gdb_session.cpp
src/iss/debugger/encoderdecoder.cpp
src/iss/debugger/target_adapter_base.cpp
src/iss/debugger/cmdhandler.cpp
src/iss/debugger/server_base.cpp
src/iss/vm_base.cpp
src/iss/plugin/loader.cpp
)
if(WITH_LLVM)
list(APPEND LIB_SOURCES src/iss/llvm/jit_helper.cpp src/iss/llvm/vm_base.cpp)
endif()
if(WITH_TCC)
list(APPEND LIB_SOURCES src/tcc_jit_helper.cpp)
list(APPEND LIB_SOURCES src/iss/tcc/jit_helper.cpp)
endif()

add_library(${PROJECT_NAME} STATIC ${LIB_SOURCES})
target_include_directories(${PROJECT_NAME} PUBLIC src)
if (MSVC)
target_compile_definitions(${PROJECT_NAME} PUBLIC NOMINMAX)
endif()
Expand Down Expand Up @@ -86,7 +90,7 @@ else()
endif()
target_link_libraries(${PROJECT_NAME} PUBLIC ${CMAKE_DL_LIBS})

set(LIB_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/incl/dbt_rise_common.h)
set(LIB_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/src/dbt_rise_common.h)
set_target_properties(${PROJECT_NAME} PROPERTIES
VERSION ${PROJECT_VERSION}
FRAMEWORK FALSE
Expand All @@ -103,7 +107,7 @@ install(TARGETS ${PROJECT_NAME} COMPONENT ${PROJECT_NAME}
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} # headers
)

install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/incl/iss COMPONENT ${PROJECT_NAME}
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/src/iss COMPONENT ${PROJECT_NAME}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} # target directory
FILES_MATCHING # install only matched files
PATTERN "*.h" # select header files
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions src/cmdhandler.cpp → src/iss/debugger/cmdhandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@
* eyck@minres.com - initial API and implementation
******************************************************************************/

#include "iss/debugger/cmdhandler.h"
#include "iss/log_categories.h"
#include "util/ities.h"
#include "cmdhandler.h"
#include <iss/log_categories.h>
#include <util/ities.h>

#include <boost/tokenizer.hpp>
#include <cstdarg>
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* eyck@minres.com - initial API and implementation
******************************************************************************/

#include "iss/debugger/encoderdecoder.h"
#include "encoderdecoder.h"

#include <iomanip>
#include <sstream>
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/gdb_session.cpp → src/iss/debugger/gdb_session.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
******************************************************************************/

// clang-format off
#include <iss/debugger/gdb_session.h>
#include "gdb_session.h"
#include <algorithm>
#include <exception>
#include <iomanip>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/dbgsrvbase.cpp → src/iss/debugger/server_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

// switch off warning C4996: 'std::copy': Function call with parameters that may
// be unsafe
#include "iss/debugger/server_base.h"
#include "server_base.h"
#include <functional>
#include <future>
#include <iss/debugger_if.h>
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* eyck@minres.com - initial API and implementation
******************************************************************************/

#include <iss/debugger/target_adapter_base.h>
#include "target_adapter_base.h"

using namespace iss::debugger;

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/llvm_jit_helper.cpp → src/iss/llvm/jit_helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* eyck@minres.com - initial API and implementation
******************************************************************************/

#include <iss/llvm/jit_helper.h>
#include "jit_helper.h"
#include <iss/log_categories.h>
#include <llvm/Support/Debug.h> //EnableDebugBuffering
#include <llvm/Support/Error.h>
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/llvm_vm_base.cpp → src/iss/llvm/vm_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
******************************************************************************/

#include <iss/iss.h>
#include <iss/llvm/vm_base.h>
#include "vm_base.h"
#include <iss/vm_plugin.h>
#include <util/logging.h>

Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/loader.cpp → src/iss/plugin/loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

#include <iss/plugin/loader.h>
#include "loader.h"

using namespace iss::plugin;
std::unordered_map<std::string, std::shared_ptr<loader::plugin_data>> loader::_cache;
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/tcc_jit_helper.cpp → src/iss/tcc/jit_helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* eyck@minres.com - initial API and implementation
******************************************************************************/

#include <iss/tcc/jit_helper.h>
#include "jit_helper.h"
#include <iss/log_categories.h>
#include <fmt/format.h>
#include <array>
Expand Down
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions src/vm_base.cpp → src/iss/vm_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@
* eyck@minres.com - initial API and implementation
******************************************************************************/

#include <iss/arch_if.h>
#include <iss/iss.h>
#include <iss/vm_if.h>
#include <iss/vm_plugin.h>
#include "arch_if.h"
#include "iss.h"
#include "vm_if.h"
#include "vm_plugin.h"
#include <util/logging.h>

using namespace iss;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 1dd870d

Please sign in to comment.