binutils-gdb/gdb/python
Joel Brobecker 8503d6e1e5 gdb/python: exception trying to create empty array
The following python command fails:

    (gdb) python print gdb.lookup_type('char').array(1, 0)
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
    ValueError: Array length must not be negative
    Error while executing Python code.

The above is trying to create an empty array, which is fairly command
in Ada.

gdb/ChangeLog:

        * python/py-type.c (typy_array_1): Do not raise negative-length
        exception if N2 is equal to N1 - 1.

gdb/testsuite/ChangeLog:

        * gdb.python/py-type.exp: Add a couple test about empty
        array creation, and negative-length array creation.
2015-01-06 19:07:12 +04:00
..
lib/gdb Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-arch.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-auto-load.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-block.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-bpevent.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-breakpoint.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-cmd.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-continueevent.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-event.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-event.h Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-events.h Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-evtregistry.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-evts.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-exitedevent.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-finishbreakpoint.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-frame.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-framefilter.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-function.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-gdb-readline.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-inferior.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-infevents.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-infthread.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-lazy-string.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-linetable.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-newobjfileevent.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-objfile.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-param.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-prettyprint.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-progspace.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-signalevent.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-stopevent.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-stopevent.h Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-symbol.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-symtab.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-threadevent.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-type.c gdb/python: exception trying to create empty array 2015-01-06 19:07:12 +04:00
py-utils.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-value.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-varobj.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
py-xmethods.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
python-config.py Add support for Python 3. 2012-12-12 16:47:30 +00:00
python-internal.h Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
python.c Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00
python.h Update year range in copyright notice of all files owned by the GDB project. 2015-01-01 13:32:14 +04:00