diff --git a/docs/src/dev/debugging.md b/docs/src/dev/debugging.md index 22894ece9..ff9498403 100644 --- a/docs/src/dev/debugging.md +++ b/docs/src/dev/debugging.md @@ -31,19 +31,7 @@ This will automatically compile and run the `tests/c/simple.c` test under GDB. This would be ideal if you have a crashing trace, as it will dump you into a GDB shell at the time of the crash. -The tool has some other switches which are useful for other situations, e.g.: - -``` -bin/gdb_c_test -j -s -b10 simple.c -``` - -compiles and runs `tests/c/simple.c` test under GDB with [JIT state -debugging](runtime_config.md#ykd_print_jitstate) -enabled, with [compilation -serialised](runtime_config.md#ykd_serialise_compilation), setting a -breakpoint on the first 10 traces compiled. - -For a list of all switches available, run: +To see what else you can do with `gdb_c_test`, run: ``` bin/gdb_c_test --help diff --git a/tests/src/bin/gdb_c_test.rs b/tests/src/bin/gdb_c_test.rs index bd10b5ec5..2883c5128 100644 --- a/tests/src/bin/gdb_c_test.rs +++ b/tests/src/bin/gdb_c_test.rs @@ -13,22 +13,6 @@ struct Args { /// The test to attach gdb to. test_file: PathBuf, - /// Run the test with `YKD_LOG_IR` set to the specified value. - #[arg(short, long)] - log_ir: Option, - - /// Run the test with `YKD_LOG_JITSTATE=-` - #[arg(short = 'j', long)] - log_jitstate: bool, - - /// Run the test with `YKD_SERIALISE_COMPILATION=1` - #[arg(short, long)] - serialise_compilation: bool, - - /// Set breakpoints at the first `N` compiled traces. - #[arg(short = 'b', long)] - num_breaks: Option, - /// Don't immediately run the program. #[arg(short = 'n', long)] wait_at_prompt: bool, @@ -76,25 +60,6 @@ fn main() { let mut gdb = Command::new("gdb"); gdb.arg(&binpath); - if args.serialise_compilation { - gdb.env("YKD_SERIALISE_COMPILATION", "1"); - } - - if args.log_jitstate { - gdb.env("YKD_LOG_JITSTATE", "1"); - } - - if let Some(irs) = args.log_ir { - gdb.env("YKD_LOG_IR", irs); - } - - if let Some(num_breaks) = args.num_breaks { - gdb.args(["-ex", "set breakpoint pending on"]); // don't prompt for pending breaks. - for i in 0..num_breaks { - gdb.args(["-ex", &format!("b __yk_compiled_trace_{i}")]); - } - } - if !args.wait_at_prompt { gdb.args(["-ex", "run"]); } diff --git a/ykrt/src/compile/jitc_yk/codegen/x64/mod.rs b/ykrt/src/compile/jitc_yk/codegen/x64/mod.rs index 2f2936706..3ffd16e51 100644 --- a/ykrt/src/compile/jitc_yk/codegen/x64/mod.rs +++ b/ykrt/src/compile/jitc_yk/codegen/x64/mod.rs @@ -907,7 +907,7 @@ impl<'a> Assemble<'a> { [ // 64-bit (or 32-bit) signed division with idiv operates on RDX:RAX // (EDX:EAX) and stores the remainder in RDX (EDX). We ignore the - // remainder stored into RAX (EAX). + // quotient stored into RAX (EAX). RegConstraint::InputIntoRegAndClobber(lhs, Rq::RAX), RegConstraint::Input(rhs), RegConstraint::OutputFromReg(Rq::RDX),