The Python error is because Rust binaries contain a gdb auto-load section for pretty printer scripts, which rely on a custom module shipped with Rust. If you run rust-gdb script (from Rust distro's /etc folder) instead of plain gdb, it will set up module search paths correctly, and this should work.
The stepping-over-a-macro problem should be already fixed in the nightly channel.
The variables are allocated stack space in prologue of the function, but aren't initialized until you step past their declarations/assignments. (Yes, ideally they wouldn't be in scope until declaration. I think rustc actually tries to do the right thing here, not sure why it isn't working).
I am guessing that the closing function brace corresponds to a point in code after the epilogue, so the variables don't exist anymore. We should probably adjust this.
There is also a file rust-gdb which I suppose a shell script and can be run using that. I did it in windows using git-bash. But as of now I did not understand what it suppose to do
It gave me error like this:
nisu@NWISU02 MINGW64 /c/Users/nisu/.cargo/rustc-1.11.0/src/etc
$ sh rust-gdb
GNU gdb (GDB) 7.9.1
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-w64-mingw32".
Type "show configuration" for configuration details.
For bug reporting instructions, please see: http://www.gnu.org/software/gdb/bugs/.
Find the GDB manual and other documentation resources online at: http://www.gnu.org/software/gdb/documentation/.
For help, type "help".
Type "apropos word" to search for commands related to "word".
---- Loading Rust pretty-printers ----
Traceback (most recent call last):
File "", line 4, in
ImportError: No module named gdb_rust_pretty_printing
c:\rustdebug\gdb64\bin../bin/gdbinit:18: Error in sourced command file:
Error while executing Python code.
Warning: C:\Program Files\Rust stable GNU 1.11/lib/rustlib/etc: No such file or directory.
(gdb)
That probably won't work. In a similar way to Eclipse/RustDT, the IDE will usually need to start the gdb executable directly. It probably doesn't support starting a bash script (in part because it needs to control the stdin/stdout of the GDB process). So if you want to enable pretty printers you need to set them up in a way like described here: How to set up GDB for debugging Rust programs in Windows? - Stack Overflow
Yo, I noticed you have step "10. Install Python". I don't think this is necessary. The TDM-GDB download that was mentioned here already includes Python support. See: tdm-gcc , it says gdb-7.9.1-tdm64-2.zip 12.3 MB · gdb 7.9.1 GNU debugger — includes Python support..
I got my pretty printers to work without having to install Python separately.