11 releases
0.2.0 | Jan 7, 2023 |
---|---|
0.1.9 | Jan 7, 2023 |
0.1.8 | Jun 1, 2022 |
0.1.7 | May 18, 2022 |
0.1.4 | Mar 31, 2022 |
#22 in #gdb
38 downloads per month
510KB
GDB breakpoint like python's breakpoint
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.
set ptrace_scope
echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope
Make gdb to attach to the program.
Recommendation
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"
Dependencies
~1.5MB
~36K SLoC