The Expressions view in the graphical debugger will format char arrays as strings in most cases. However, if you want to do this from the command line, then the following python script should do it (I apologise for the terseness, but you can make it prettier if you want):
from arm_ds.debugger_v1 import Debugger import sys import string printable = string.ascii_letters + string.digits + string.punctuation + ' ' def intStrToChar(i): c = chr(int(i)) if (c in printable): return c else: return '\\x%02x' % ord(c) print '"' + "".join([intStrToChar(c) for c in Debugger().getCurrentExecutionContext().executeDSCommand("output /u " + sys.argv)[1:-1].split(", ")]) + '"'
Be careful to get the single and double quotes correct there (probably best to cut & paste). So what this is doing is capturing the output of the output command and converting the numeric values back into a string. This also attempts to escape non-printable characters. Save it to a file such as print.py and use it like:
source "/somedir/print.py" foo
Where foo is the name of the variable that you want to print.
This was confirmed as a bug, and actually only occurs when the type of variable being printed is const; plain char arrays do print fine. Thanks for reporting it. This is scheduled for fixing in the DS-5 5.19 release.