On Thu, Jun 6, 2019 at 8:18 PM Christopher Head <open...@chead.ca> wrote:
>
> Hi folks,
> I want to fix a bug I discovered, but I’m not sure how. Here’s the problem: 
> the “mwd” command calls a chain of functions. On a Cortex-M, this eventually 
> calls men_ap_write, which returns ERROR_TARGET_UNALIGNED_ACCESS because it 
> does not support 64-bit writes (this may not be the ideal choice of error 
> code, but that’s beside the point). That status code is propagates up the 
> call stack all the way to (and even returned from) the command handler. The 
> problem is, in Telnet, it doesn’t print anything! Who is supposed to do the 
> printing of an error message? Is the command handler supposed to print it, or 
> should the framework that calls the handler be printing a message if the 
> command handler returns nonzero?

It should be the command that fails to print the error message through
command_print()
mwX was not doing it!
Try patch http://openocd.zylin.com/5220
The message is very generic, but as you already noticed the error code
received is also not always appropriate. Better this generic text than
something incorrect.

Antonio


_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to