Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ jobs:
- name: Fetch
run: cargo fetch --target ${{ matrix.job.target }}
- name: Build
run: cargo test --target ${{ matrix.job.target }} --release --no-run
run: cargo test --target ${{ matrix.job.target }} --no-run
- name: Test
run: cargo test --target ${{ matrix.job.target }} --release
run: cargo test --target ${{ matrix.job.target }}

# This job builds non-tier1 targets that aren't already tested
build_lower_tier:
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

<!-- next-header -->
## [Unreleased] - ReleaseDate
### Changed
- [PR#65](https://github.com/rust-minidump/minidump-writer/pull/65) updated `crash-context` to 0.5, which has support for a custom `capture_context` to replace `RtlCaptureContext` on Windows, due to improper bindings and deficiencies, resolving [#63](https://github.com/rust-minidump/minidump-writer/issues/63).

## [0.6.0] - 2022-11-15
### Changed
- [PR#60](https://github.com/rust-minidump/minidump-writer/pull/60) removed the dependency on `windows-sys` due the massive version churn, resolving [#58](https://github.com/rust-minidump/minidump-writer/issues/58). This should allow projects to more easily integrate this crate into their project without introducing multiple versions of transitive dependencies.
Expand Down
8 changes: 7 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ license = "MIT"
[dependencies]
byteorder = "1.3.2"
cfg-if = "1.0"
crash-context = "0.4"
crash-context = "0.5"
memoffset = "0.7"
minidump-common = "0.14"
scroll = "0.11"
Expand All @@ -35,6 +35,12 @@ nix = { version = "0.25", default-features = false, features = [
# Binds some additional mac specifics not in libc
mach2 = "0.4"

# Additional bindings to Windows specific APIs. Note we don't use windows-sys
# due to massive version churn
[target.'cfg(target_os = "windows")'.dependencies.winapi]
version = "0.3"
features = ["minwindef", "processthreadsapi", "winnt"]

[dev-dependencies]
# Minidump-processor is async so we need an executor
futures = { version = "0.3", features = ["executor"] }
Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,13 @@ fn write_minidump(crash_context: crash_context::CrashContext) {
- ⭕️ Unimplemented, but could be implemented in the future
- ❌ Unimplemented, and unlikely to ever be implemented

| Arch | unknown-linux-gnu | unknown-linux-musl | linux-android | pc-windows-msvc | apple-darwin | apple-ios
--- | --- | --- | --- | --- | --- | --- |
`x86_64` | ✅ | ✅ | ⚠️ | ✅ | ✅ | ⭕️ |
`i686` | ✅ | ✅ | ❌ | ⚠️ | ❌ | ❌ | ⭕️ |
`arm` | ⚠️ | ⚠️ | ⚠️ | ⭕️ | ❌ | ❌ |
`aarch64` | ⚠️ | ⚠️ | ⚠️ | ⭕️ | ✅ | ⭕️ |
`mips` | ⭕️ | ⭕️ | ❌ | ❌ | ❌ | ❌ |
`mips64` | ⭕️ | ⭕️ | ❌ | ❌ | ❌ | ❌ |
`powerpc` | ⭕️ | ⭕️ | ❌ | ❌ | ❌ | ❌ |
`powerpc64` | ⭕️ | ⭕️ | ❌ | ❌ | ❌ | ❌ |
| Arch | unknown-linux-gnu | unknown-linux-musl | linux-android | pc-windows-msvc | apple-darwin | apple-ios |
----------- | ----------------- | ------------------ | ------------- | --------------- | ------------ | --------- |
`x86_64` | ✅ | ✅ | ⚠️ | ✅ | ✅ | ⭕️ |
`i686` | ✅ | ✅ | ❌ | ⭕️ | ❌ | ❌ |
`arm` | ⚠️ | ⚠️ | ⚠️ | ⭕️ | ❌ | ❌ |
`aarch64` | ⚠️ | ⚠️ | ⚠️ | ⭕️ | ✅ | ⭕️ |
`mips` | ⭕️ | ⭕️ | ❌ | ❌ | ❌ | ❌ |
`mips64` | ⭕️ | ⭕️ | ❌ | ❌ | ❌ | ❌ |
`powerpc` | ⭕️ | ⭕️ | ❌ | ❌ | ❌ | ❌ |
`powerpc64` | ⭕️ | ⭕️ | ❌ | ❌ | ❌ | ❌ |
12 changes: 6 additions & 6 deletions src/bin/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ mod linux {
#[cfg(target_os = "windows")]
mod windows {
use minidump_writer::ffi::{
GetCurrentProcessId, GetCurrentThread, GetCurrentThreadId, GetThreadContext, CONTEXT,
GetCurrentProcessId, GetCurrentThread, GetCurrentThreadId, GetThreadContext,
EXCEPTION_POINTERS, EXCEPTION_RECORD,
};

Expand All @@ -305,20 +305,20 @@ mod windows {

#[inline(never)]
pub(super) fn real_main(args: Vec<String>) -> Result<()> {
let exception_code = u32::from_str_radix(&args[0], 16).unwrap() as i32;
let exception_code = u32::from_str_radix(&args[0], 16).unwrap();

// Generate the exception and communicate back where the exception pointers
// are
unsafe {
let mut exception_record: EXCEPTION_RECORD = mem::zeroed();
let mut exception_context: CONTEXT = mem::zeroed();
exception_context.ContextFlags =
minidump_common::format::ContextFlagsAmd64::CONTEXT_AMD64_ALL.bits();
let mut exception_context = std::mem::MaybeUninit::uninit();

let pid = GetCurrentProcessId();
let tid = GetCurrentThreadId();

GetThreadContext(GetCurrentThread(), &mut exception_context);
GetThreadContext(GetCurrentThread(), exception_context.as_mut_ptr());

let mut exception_context = exception_context.assume_init();

let exception_ptrs = EXCEPTION_POINTERS {
ExceptionRecord: &mut exception_record,
Expand Down
Loading