On 19.06.2019 11:23, Antonio Borneo wrote: > On Mon, Jun 17, 2019 at 2:47 PM Leonard Crestez <[email protected]> > wrote:
>> This is a continuation of my questions on irc. There were some recent >> changes regarding how OpenOCD handles command output and as far as I can >> tell the default was switched so that all commands will "return" instead >> of "display" by default. > > Yes, I participated at this change. > For me the change was necessarily to remove the old crust of printing > everything and returning nothing, with the "ocd_" prefix to "try" to > get a return value. I tried playing with ocd_ prefix in older releases but all I remember is confusion. The right solution for grabbing the output of a command is the `capture` function, correct? > But the job is not terminated, as you mention for the commands mdX > >> This doesn't make much sense to me because most commands have >> human-readable output which is not intended for machine consumption. For >> example "mdw" does pretty alignments, "targets" shows a table and "reg" >> shows register names. > Yes, the commands mdX should printout the value with all the nice and > funny format, and only return the eventual error value. > For reading a value from memory we already have mem2array and the > wrappers mrX, so no need to use mdX. > I think the proper function for printing in mdX (and in most other > places) should be command_output_text(). This prints only to the > terminal that issued the command without polluting the other terminals > (in case you have several telnet and gdb connections to a single > openocd). So you're saying that patches switching mdX back to "display" would be welcome, correct? -- Regards, Leonard _______________________________________________ OpenOCD-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openocd-devel
