X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=doc%2Fopenocd.texi;h=16aa26bf546179606adccefb215f805885ec311f;hb=5e13e0114105c51a8afa6ac2cb40523ac269ad78;hp=43ebf8cb28a8b0658b646b354ea1ca3922928f9b;hpb=a51ab8ddf63a0d60eaaf3b8f3eedcada1e773c20;p=openocd diff --git a/doc/openocd.texi b/doc/openocd.texi index 43ebf8cb..16aa26bf 100644 --- a/doc/openocd.texi +++ b/doc/openocd.texi @@ -7390,6 +7390,19 @@ Useful in connection with script files Close the OpenOCD server, disconnecting all clients (GDB, telnet, other). If option @option{error} is used, OpenOCD will return a non-zero exit code to the parent process. + +Like any TCL commands, also @command{shutdown} can be redefined, e.g.: +@example +# redefine shutdown +rename shutdown original_shutdown +proc shutdown @{@} @{ + puts "This is my implementation of shutdown" + # my own stuff before exit OpenOCD + original_shutdown +@} +@end example +If user types CTRL-C or kills OpenOCD, either the command @command{shutdown} +or its replacement will be automatically executed before OpenOCD exits. @end deffn @anchor{debuglevel}