corrosion icon indicating copy to clipboard operation
corrosion copied to clipboard

Edits not reflected in debug mode

Open LucasBullen opened this issue 7 years ago • 4 comments

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

LucasBullen avatar Mar 15 '18 21:03 LucasBullen

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?

LucasBullen avatar Mar 29 '18 18:03 LucasBullen

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

mickaelistria avatar Mar 30 '18 06:03 mickaelistria

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.

akurtakov avatar May 15 '18 13:05 akurtakov

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

akurtakov avatar May 15 '18 14:05 akurtakov