# OpenOCD prints only the last command's result in terminal

I'm using a fresh build of OpenOCD (Open On-Chip Debugger 0.10.0+dev-01047-g09ac9ab1 (2020-02-05-18:51)) on Raspbian, trying to read a few register values (http://openocd.org/doc-release/html/General-Commands.html#Memory-access-commands) from a microcontroller, using the configuration file openocd.cfg in the cwd (i.e. no telnet session). This works only partially though, as OpenOCD only shows the output of the last command.

My openocd.cfg ends with the read commands, e.g.:

...
init
targets
reset halt
mdw 0x00 1
mdw 0x04 1


The commands are read and there are no errors, as the debug output option (-d) shows, only there is no output for earlier commands:

Debug: 637 1251 command.c:143 script_debug(): command - mdw mdw 0x00 1
Debug: 639 1258 command.c:143 script_debug(): command - mdw mdw 0x04 1
User : 641 1265 options.c:63 configuration_output_handler(): 0x00000004: 00f10100
User : 642 1266 options.c:63 configuration_output_handler():


I have not yet been able to find documentation on possible configuration options to have all commands print their respective output, and I am not able to find that info in the source code - probably somewhere around here:

So: while it's probably generally intended to connect to OpenOCD via Telnet to issue commands, how can multiple commands be run from a configuration file after a connection to the target is established?