gdb-gdb.py.in: Fix error when printing range type
authorJoel Brobecker <brobecker@adacore.com>
Tue, 26 Mar 2019 22:30:21 +0000 (17:30 -0500)
committerJoel Brobecker <brobecker@adacore.com>
Tue, 26 Mar 2019 22:30:21 +0000 (18:30 -0400)
commit7f5331a885c2e8b8cb8be5b27dc4bcfa290ad6c0
tree6bc2586b2dba30c5f92bf6825910ff6898c48e05
parent9f9aa85206ab31d2c583e7fef568700d31eb577e
gdb-gdb.py.in: Fix error when printing range type

I noticed that trying to print the contents of a struct main_type
would fail when the type was a TYPE_CODE_RANGE:

    (gdb) p *type.main_type
    $1 = Python Exception <class 'gdb.error'> There is no member named low_undefined.:

And indeed, Python is right, fields "low_undefined" has been removed
from struct range_bounds back in ... 2014! It was done when we introduced
dynamic bounds handling. This patch fixes gdb-gdb.py.in according to
the new structure.

gdb/ChangeLog:

* gdb-gdb.py.in (StructMainTypePrettyPrinter.bound_img): New method.
(StructMainTypePrettyPrinter.bounds_img): Use new "bound_img"
method to compute the bounds of range types. Also print "[evaluated]"
if the bounds' values come from a dynamic evaluation.
gdb/ChangeLog
gdb/gdb-gdb.py.in
This page took 0.02838 seconds and 4 git commands to generate.