You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For UI:s that wrap GDB, the current design of the pretty printer loading library makes it cumbersome and very unergonomic to debug rust applications. This is highly unfortunate.
The problem is the rust-gdb wrapper script and the design of the python pretty printers; one can't simply do
This basically means that, for instance a GUI needs to know what language is being debugged before actually starting debugging.
Instead, for a GUI, once the debuggee has been loaded it can query the language (via the DWARF debug info) and then take action on what to do. But this requires that gdb_load_rust_pretty_printers.py is "source'able" from GDB, after GDB has been spawned - which it currently is not. An upcoming PR will solve this issue.
The text was updated successfully, but these errors were encountered:
gdb generally has a problem with static linking and pretty-printer registration. There's no really good solution we've found.
For Rust I think a way to move away from rust-gdb would be to change cargo to create an appropriately-named gdbinit file next to the executables it creates. The gdbinit it creates could source ones from the various libraries that go into the final product, including the toolchain's. Then with the appropriate auto-load safety setting, plain gdb would pick this up automatically.
…ulacrum
Make GDB Python Pretty Printers loadable after spawning GDB, avoiding required `rust-gdb`
Fixesrust-lang#111961
Makes the Python pretty printer library source'able from within GDB after spawn, making the wrapper script `rust-gdb` become not the required approach to use the pretty printer library.
Allows for integration into GUI:s that wrap GDB extremely easy. The previous design complicates this feature.
…ulacrum
Make GDB Python Pretty Printers loadable after spawning GDB, avoiding required `rust-gdb`
Fixesrust-lang#111961
Makes the Python pretty printer library source'able from within GDB after spawn, making the wrapper script `rust-gdb` become not the required approach to use the pretty printer library.
Allows for integration into GUI:s that wrap GDB extremely easy. The previous design complicates this feature.
For UI:s that wrap GDB, the current design of the pretty printer loading library makes it cumbersome and very unergonomic to debug rust applications. This is highly unfortunate.
The problem is the
rust-gdb
wrapper script and the design of the python pretty printers; one can't simply doThis basically means that, for instance a GUI needs to know what language is being debugged before actually starting debugging.
Instead, for a GUI, once the debuggee has been loaded it can query the language (via the DWARF debug info) and then take action on what to do. But this requires that
gdb_load_rust_pretty_printers.py
is "source'able" from GDB, after GDB has been spawned - which it currently is not. An upcoming PR will solve this issue.The text was updated successfully, but these errors were encountered: