Closed
Description
I tried this code:
foo.rs
:
#![debugger_visualizer(gdb_script_file = "foo.py")]
fn main() {
let x = 1;
println!("breakpoint");
}
foo.py
:
def lookup(val):
print('hello!')
gdb.current_objfile().pretty_printers.append(lookup)
- Build the binary:
rustc -Cincremental=incremental -g foo.rs
- Check the behavior:
a.gdb -iex "add-auto-load-safe-path ." ./foo
b.b foo.rs:5
c.r
d.p x
e. Seehello!
printed. - Modify
foo.py
and change hello to "hello world" - Run rustc as in step 1.
- Run verification as in step 2.
- Notice that it still just says "hello".
I expected to see this happen: It should print "hello world".
Instead, this happened: Any changes to a gdb script are not picked up when rebuilding with incremental.
This is likely related to #111227.
Meta
rustc --version --verbose
:
rustc 1.71.0-nightly (f9a6b7158 2023-05-05)
binary: rustc
commit-hash: f9a6b71580cd53dd4491d9bb6400f7ee841d9c22
commit-date: 2023-05-05
host: x86_64-unknown-linux-gnu
release: 1.71.0-nightly
LLVM version: 16.0.2