Support for write_crash on netbsd (#788)
This commit is contained in:
parent
6dc7cc2f59
commit
be0ae3a55e
@ -387,12 +387,28 @@ fn write_crash<W: Write>(
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(all(target_os = "netbsd", target_arch = "x86_64"))]
|
||||||
|
fn write_crash<W: Write>(
|
||||||
|
writer: &mut BufWriter<W>,
|
||||||
|
signal: Signal,
|
||||||
|
ucontext: &ucontext_t,
|
||||||
|
) -> Result<(), std::io::Error> {
|
||||||
|
writeln!(
|
||||||
|
writer,
|
||||||
|
"Received signal {} at {:#016x}, fault address: {:#016x}",
|
||||||
|
signal, ucontext.uc_mcontext.__gregs[21], ucontext.uc_mcontext.__gregs[16]
|
||||||
|
)?;
|
||||||
|
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
||||||
#[cfg(not(any(
|
#[cfg(not(any(
|
||||||
target_vendor = "apple",
|
target_vendor = "apple",
|
||||||
target_os = "linux",
|
target_os = "linux",
|
||||||
target_os = "android",
|
target_os = "android",
|
||||||
target_os = "freebsd",
|
target_os = "freebsd",
|
||||||
target_os = "openbsd"
|
target_os = "openbsd",
|
||||||
|
target_os = "netbsd"
|
||||||
)))]
|
)))]
|
||||||
fn write_crash<W: Write>(
|
fn write_crash<W: Write>(
|
||||||
writer: &mut BufWriter<W>,
|
writer: &mut BufWriter<W>,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user