Files
Pierre-Marie de Rodat 8aaaa124c2 misc/coerce-array: new testcase
Change-Id: I32152a0e657aa0568e04d29c41d35c55e0bd9913
TN: RC14-025
2018-12-17 11:49:00 +01:00

17 lines
413 B
Python

from gnatdbg.debug import print_type_tree
from gnatdbg.utils import coerce_array
def run(var):
print('== {} =='.format(var))
value = gdb.parse_and_eval(var)
try:
value = coerce_array(value)
except ValueError as exc:
value = '<ValueError: {}>'.format(exc)
else:
if value is not None:
print_type_tree(value.type)
value = str(value)
print(value)