mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 21:39:07 +00:00
inline dbg
This commit is contained in:
parent
dcb530d3af
commit
e7f3c6f281
18 changed files with 192 additions and 21 deletions
|
@ -939,7 +939,11 @@ fn roc_dev_native(
|
|||
expect_metadata: ExpectMetadata,
|
||||
) -> ! {
|
||||
use roc_repl_expect::run::ExpectMemory;
|
||||
use signal_hook::{consts::signal::SIGCHLD, consts::signal::SIGUSR1, iterator::Signals};
|
||||
use signal_hook::{
|
||||
consts::signal::SIGCHLD,
|
||||
consts::signal::{SIGUSR1, SIGUSR2},
|
||||
iterator::Signals,
|
||||
};
|
||||
|
||||
let ExpectMetadata {
|
||||
mut expectations,
|
||||
|
@ -947,7 +951,7 @@ fn roc_dev_native(
|
|||
layout_interner,
|
||||
} = expect_metadata;
|
||||
|
||||
let mut signals = Signals::new(&[SIGCHLD, SIGUSR1]).unwrap();
|
||||
let mut signals = Signals::new(&[SIGCHLD, SIGUSR1, SIGUSR2]).unwrap();
|
||||
|
||||
// let shm_name =
|
||||
let shm_name = format!("/roc_expect_buffer_{}", std::process::id());
|
||||
|
@ -993,6 +997,11 @@ fn roc_dev_native(
|
|||
)
|
||||
.unwrap();
|
||||
}
|
||||
SIGUSR2 => {
|
||||
// this is the signal we use for a dbg
|
||||
|
||||
println!("I need to dbg something");
|
||||
}
|
||||
_ => println!("received signal {}", sig),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue