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

Add support for GDB JIT debugging #1212

Merged
merged 29 commits into from
Feb 27, 2020
Merged
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
800b2a4
Add debug prototype 2 (fork of wasmtime-debug)
Jan 31, 2020
42132c4
Restructure to use external crate, add integration
Feb 4, 2020
0564000
Add wip debugging code
Feb 11, 2020
5e3c5f7
Fix validation issue, cast to the correct type
Feb 12, 2020
e34e0bb
Clean up, everything works
Feb 13, 2020
923e4ac
Add command line flag, make debug crate optional, clean up API
Feb 14, 2020
3653a44
Clean up code, add documentation, implement pieces properly
Feb 19, 2020
1ac59a3
Add various small improvements, update attributions file
Feb 19, 2020
68af917
Update field names in wasm-debug types
Feb 19, 2020
a2e531b
Update to use published wasm-debug; make dep optional in clif-backend
Feb 19, 2020
64cc591
Merge branch 'master' into feature/debug-prototype2
MarkMcCaskey Feb 20, 2020
3bca20d
Add changelog entry, clean up
Feb 20, 2020
65a9e04
Add updates from feedback
Feb 20, 2020
0ec08b5
Add updates from feedback
Feb 20, 2020
7c5f825
Flatten tuple in return type, conditionally remove more jit debug code
Feb 21, 2020
3d6e915
Merge branch 'master' into feature/debug-prototype2
MarkMcCaskey Feb 21, 2020
40e4ddd
Add updates from feedback
Feb 21, 2020
d7fca53
Make JitCodeDebugInfoEntryHandleInner Send and Sync
Feb 21, 2020
6f5ebb5
Allow building clif-backend without wasm-debug
Feb 26, 2020
52d4dac
Rename `feed_event`'s `loc` to `source_loc`
Feb 26, 2020
cb20cd9
Merge branch 'master' into feature/debug-prototype2
Feb 26, 2020
56e47c1
Revert Wasm parsing to improved old style, fixing singlepass
Feb 27, 2020
0c8464e
Update changelog entry for gdb jit PR
Feb 27, 2020
3691c80
Add generate_debug_info field to test
Feb 27, 2020
a089cf5
Link GDB JIT exposed global and fn as "linkonce"
Feb 27, 2020
dbb2ece
Work around unstable linkage attribute
Feb 27, 2020
b5cbb9d
Fix test and build for musl
Feb 27, 2020
0593965
Make gdb jit symbol weak linking default in llvm-backend features
Feb 27, 2020
91808b9
Update test-rest to explicitly test each crate
Feb 27, 2020
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
5 changes: 2 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -80,7 +80,7 @@ serde = { version = "1", features = ["derive"] } # used by the plugin example
typetag = "0.1" # used by the plugin example

[features]
default = ["fast-tests", "wasi", "backend-cranelift", "wabt", "wasmer-runtime-core/generate-debug-information"]
default = ["fast-tests", "wasi", "backend-cranelift", "wabt"]
"loader-kernel" = ["wasmer-kernel-loader"]
debug = ["fern", "log/max_level_debug", "log/release_max_level_debug"]
trace = ["fern", "log/max_level_trace", "log/release_max_level_trace"]
@@ -98,8 +98,7 @@ backend-llvm = [
"wasmer-llvm-backend",
"wasmer-runtime/llvm",
"wasmer-middleware-common-tests/llvm",
"wasmer-runtime-core/generate-debug-information",
"wasmer-runtime-core/generate-debug-information-no-export-symbols",
"wasmer-runtime-core/generate-debug-information-no-export-symbols"
]
backend-singlepass = [
"wasmer-singlepass-backend",
24 changes: 9 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
@@ -142,21 +142,15 @@ test-capi: test-capi-singlepass test-capi-cranelift test-capi-llvm test-capi-ems
capi-test: test-capi

test-rest:
cargo test --release \
--all \
--exclude wasmer-runtime-c-api \
--exclude wasmer-emscripten \
--exclude wasmer-spectests \
--exclude wasmer-wasi \
--exclude wasmer-middleware-common \
--exclude wasmer-middleware-common-tests \
--exclude wasmer-singlepass-backend \
--exclude wasmer-clif-backend \
--exclude wasmer-llvm-backend \
--exclude wasmer-wasi-tests \
--exclude wasmer-emscripten-tests \
--exclude wasmer-runtime-core-tests

cargo test --release -p wasmer-dev-utils
cargo test --release -p wasmer-interface-types
cargo test --release -p wasmer-kernel-loader
cargo test --release -p kernel-net
cargo test --release -p wasmer-llvm-backend-tests
cargo test --release -p wasmer-runtime
cargo test --release -p wasmer-runtime-core
cargo test --release -p wasmer-wasi-experimental-io-devices
cargo test --release -p wasmer-win-exception-handler

test: spectests emtests middleware wasitests test-rest examples

2 changes: 2 additions & 0 deletions lib/runtime-core/src/jit_debug.rs
Original file line number Diff line number Diff line change
@@ -93,7 +93,9 @@ static mut __jit_debug_descriptor: JitDebugDescriptor = JitDebugDescriptor {

#[cfg(feature = "generate-debug-information-no-export-symbols")]
extern "C" {
#[no_mangle]
static mut __jit_debug_descriptor: JitDebugDescriptor;
#[no_mangle]
fn __jit_debug_register_code();
}