Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Reintroduce tapasco-debug with new interface in Rust #290

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
f3a9bef
Add first mockup of `tapasco-debug` in Rust
zyno42 Mar 14, 2022
097d8d1
Modify `libtapasco` to acquire a PE without a job
zyno42 Mar 14, 2022
3e45744
Add `env_logger` crate for logging
zyno42 Mar 14, 2022
af8cc07
Print snafu's backtrace in Display format
zyno42 Mar 14, 2022
4d79685
Restructure module imports in `main.rs`
zyno42 Mar 14, 2022
ebf946a
Modify `libtapasco` to acquire a PE read-only
zyno42 Mar 14, 2022
ce68549
Fix `CMakeLists` for `tapasco-debug` in debug mode
zyno42 Mar 14, 2022
6743388
Implement Monitor, Debug and Unsafe Mode
zyno42 Mar 14, 2022
9aa8082
Apply clippy lints and ruftfmt
zyno42 Mar 14, 2022
a26a6bc
Adds the option to treat a platform component as PE
jahofmann Mar 14, 2022
9024d6f
Update DMAEngine Statistics to use the new API
zyno42 Mar 14, 2022
6b6ebad
Remove a cast that can panic
zyno42 Mar 14, 2022
2d7ffd9
Remove exclusive access from Unsafe Mode
zyno42 Mar 14, 2022
335d715
Simplify `tapasco-debug` directory layout
zyno42 Mar 14, 2022
5161212
Disable debug mode and add comment for Issue #296
zyno42 Mar 14, 2022
774fdf3
Update `tapasco-debug` dependencies, add lock file
zyno42 Mar 14, 2022
19e0d2a
Apply rustfmt again
zyno42 Mar 14, 2022
5701fdb
Improve input handling to accept hex values
zyno42 Mar 14, 2022
9dcaaaf
Rename Normal mode to Navigation mode
zyno42 Mar 14, 2022
e104111
Implement starting PEs just like `libtapasco`
zyno42 Mar 14, 2022
0ae916e
Add `tapasco-debug` feature to `libtapasco` to make getters pub
zyno42 Mar 14, 2022
b020de2
Update `Cargo.lock`
zyno42 Mar 14, 2022
a29d975
Improve logging in `src/ui.rs`
zyno42 Mar 14, 2022
287a5d7
Implement `tapasco-debug` message view
zyno42 Mar 14, 2022
4370005
Update `Cargo.lock`
zyno42 Mar 14, 2022
22b195c
Update Rust edition from 2018 to 2021
zyno42 Mar 14, 2022
40fdcb2
Remove unnecessary import
zyno42 Mar 14, 2022
9e4df7d
Improve inline comments and TODOs
zyno42 Mar 14, 2022
3bad6ea
Improve code quality and UI
zyno42 Mar 14, 2022
f5f24ef
Improve code for Registers and Local Memory panes
zyno42 Mar 14, 2022
de9051e
Apply lints and make subtraction saturating
zyno42 Mar 14, 2022
a54c48a
Remove resolved TODOs and refactor comments
zyno42 Mar 14, 2022
ba0a3e6
Apply `rustfmt` formatting
zyno42 Mar 14, 2022
7c59523
Fix compilation errors after rebasing on develop
zyno42 Mar 18, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,5 @@ Cargo.lock

*.sublime-project
*.sublime-workspace

.vscode/
1 change: 1 addition & 0 deletions runtime/examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ add_subdirectory(C++/svm)

add_subdirectory(Rust/libtapasco_tests)
add_subdirectory(Rust/libtapasco_svm)
add_subdirectory(Rust/tapasco-debug)
1 change: 1 addition & 0 deletions runtime/examples/Rust/tapasco-debug/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/target
57 changes: 57 additions & 0 deletions runtime/examples/Rust/tapasco-debug/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Copyright (c) 2014-2021 Embedded Systems and Applications, TU Darmstadt.
#
# This file is part of TaPaSCo
# (see https://github.com/esa-tu-darmstadt/tapasco).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

cmake_minimum_required(VERSION 3.5.1 FATAL_ERROR)
project(tapasco-debug)

# Add a Rust/Cargo project to CMake watching all files in the current directory because Cargo already doesn't do anything if nothing has changed.
add_executable(tapasco-debug .)

# Use Cargo to build this project in debug mode by defining a custom target running after the tapasco target has been built.
add_custom_target(tapasco_debug_cargo_build_debug
COMMAND CARGO_TARGET_DIR=${CMAKE_CURRENT_BINARY_DIR} cargo build -q
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
DEPENDS tapasco
COMMENT "Building tapasco-debug with Cargo")

# Use Cargo to build this project in release mode by defining a custom target running after the tapasco target has been built.
add_custom_target(tapasco_debug_cargo_build_release
COMMAND CARGO_TARGET_DIR=${CMAKE_CURRENT_BINARY_DIR} cargo build -q --release
WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}
DEPENDS tapasco
COMMENT "Building tapasco-debug with Cargo")

# Check if building should be in Debug or Release mode
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
set(TARGET_DIR "debug")
add_dependencies(tapasco-debug tapasco_debug_cargo_build_debug)
else()
set(TARGET_DIR "release")
add_dependencies(tapasco-debug tapasco_debug_cargo_build_release)
endif()


# This tells CMake that this is a C++ executable (but it's Rust) because CMake really wants to know how to link this executable
set_target_properties(tapasco-debug PROPERTIES CXX_STANDARD 11 CXX_STANDARD_REQUIRED ON LINKER_LANGUAGE CXX)
# but it has already been linked by Cargo, so we then tell CMake to use the most failure-proof linker available (none, it's just /usr/bin/true).
# You can't tell CMake not to link this at all, so this is the dirty workaround:
set(CMAKE_CXX_LINK_EXECUTABLE "true")

# Install the executable in the TaPaSCo PATH
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${TARGET_DIR}/tapasco-debug
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/Tapasco/bin)
Loading