(gdb) source script.py
loaded script file to GDB
How to unload that script? How to unload all loaded script or view all script that loaded ?
(gdb) source script.py
loaded script file to GDB
How to unload that script? How to unload all loaded script or view all script that loaded ?
How to unload that script? How to unload all loaded script or view all script that loaded ?
Think of (gdb)
prompt as a shell. You can't "unload" a script anymore than you can "untype" a command you type into the shell:
$ FOO="bar"
$ source script.sh
Neither of above commands can be "unloaded".
If you need to reset the state of shell or gdb
, start a new instance of it.
The script is "sourced", not "loaded". The script executed and exited. Hence you can't unload it. It may have left something after itself (pretty-printers, commands, breakpoints, changes in configuration etc). You can't unload them all as a group, you have to find them and undo one-by-one.