Crates.io | gdb_breakpoint |
lib.rs | gdb_breakpoint |
version | 0.2.0 |
source | src |
created_at | 2022-03-30 05:35:05.745422 |
updated_at | 2023-01-07 02:43:28.033974 |
description | Call gdb to the current process and atatch in a new tmux window |
homepage | |
repository | https://github.com/fx-kirin/rust_gdb_breakpoint |
max_upload_size | |
id | 558998 |
size | 513,672 |
Launch ugdb
and attach to current process with new tmux window.
use gdb_breakpoint::breakpoint;
pub fn main() {
let x = 3 + 4;
breakpoint();
}
Require nightly.
echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope
Make gdb to attach to the program.
Multithreadding rust programs can call SIGSTOP
many times. I recommend you to add following command into your .gdbinit
file. So I used SIGINT
instead of SIGSTOP
on the second and later breakpoint
calls.
handle SIGSTOP "nostop" "pass" "noprint"