corrosion
corrosion copied to clipboard
Edits not reflected in debug mode
With the code:
fn main() {
let mut a = "first";
println!("Hello, world!");
println!("The value of x is: {}", a);
}
- Put a breakpoint on the
println!("Hello, world!");line - Debug the program
- Change the value of a to
second - Continue running the program
Expected
Prints The value of x is: second
Actual
Prints The value of x is: first
Reaching a road block with this issue. Able to update the variables within the variables view, and it does effect the debug and able to update the code and it updates the source in the Disassembly view, but it won't cause an update to the debugger. Any input on what I might be missing here?
It can be some specifics of the GDB integration requiring a flag for some level hot reload; or maybe it's that hot reload is not available at all in GDB's family? cc @akurtakov
So I tried with a being an i32 and I can change the value in debugger and it works properly. So it works with primitives but not with other types.
Yet another observation - I can no longer change the value of a string now. It probably has smth to do with prettyprinters applied by rust-gdb