diff options
author | Joel Brobecker <brobecker@adacore.com> | 2014-02-06 23:44:20 -0500 |
---|---|---|
committer | Joel Brobecker <brobecker@adacore.com> | 2014-02-10 13:15:43 +0400 |
commit | aa4fb036e90f5c976f57cd08f2c024cb0fe24897 (patch) | |
tree | 60e0046ff631e59ebd0bef7cd86a68956fe4d617 /gdb/event-top.c | |
parent | 9dee8cc6aa668228309de7d0e23e1775beb7d12f (diff) | |
download | gdb-aa4fb036e90f5c976f57cd08f2c024cb0fe24897.zip gdb-aa4fb036e90f5c976f57cd08f2c024cb0fe24897.tar.gz gdb-aa4fb036e90f5c976f57cd08f2c024cb0fe24897.tar.bz2 |
Wrong type for 'Length result.
Consider the following code:
type Color is (Black, Red, Green, Blue, White);
type Primary_Table is array (Color range Red .. Blue) of Boolean;
Prim : Primary_Table := (True, False, False);
GDB prints the length of arrays in a fairly odd way:
(gdb) p prim'length
$2 = blue
The length returned should be an integer, not the array index type,
and this patch fixes this.
gdb/ChangeLog:
* ada-lang.c (ada_evaluate_subexp): Set the type of the value
returned by the 'Length attribute to integer.
testsuite/ChangeLog:
* gdb.ada/tick_length_array_enum_idx: New testcase.
Diffstat (limited to 'gdb/event-top.c')
0 files changed, 0 insertions, 0 deletions