This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
gdb and binutils branch master updated. df7752b044d8ed316827f3887e5afe675d3d243a
- From: brobecke at sourceware dot org
- To: gdb-cvs at sourceware dot org
- Date: 19 Nov 2013 02:45:22 -0000
- Subject: gdb and binutils branch master updated. df7752b044d8ed316827f3887e5afe675d3d243a
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gdb and binutils".
The branch, master has been updated
via df7752b044d8ed316827f3887e5afe675d3d243a (commit)
from 4a0a886ab6202ef83d74063aa9fe3467f815dd4e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=df7752b044d8ed316827f3887e5afe675d3d243a
commit df7752b044d8ed316827f3887e5afe675d3d243a
Author: Joel Brobecker <brobecker@adacore.com>
Date: Mon Nov 18 12:05:02 2013 +0400
Fix int() builtin with range type gdb.Value objects.
Consider the following variable:
type Small is range -128 .. 127;
SR : Small := 48;
Trying to get its value as an integer within Python code yields:
(gdb) python sr = gdb.parse_and_eval('sr')
(gdb) python print int(sr)
Traceback (most recent call last):
File "<string>", line 1, in <module>
gdb.error: Cannot convert value to int.
Error while executing Python code.
This is happening because our variable is a range type, and
py-value's is_intlike does not handle TYPE_CODE_RANGE. This
patch fixes this.
gdb/ChangeLog:
* python/py-value.c (is_intlike): Add TYPE_CODE_RANGE handling.
gdb/testsuite/ChangeLog:
* gdb.ada/py_range: New testcase.
-----------------------------------------------------------------------
Summary of changes:
gdb/ChangeLog | 4 ++
gdb/python/py-value.c | 1 +
gdb/testsuite/ChangeLog | 4 ++
gdb/testsuite/gdb.ada/py_range.exp | 40 ++++++++++++++++++++
gdb/testsuite/gdb.ada/py_range/foo.adb | 32 ++++++++++++++++
.../gdb.ada/{fixed_cmp => py_range}/pck.adb | 0
.../gdb.ada/{fixed_cmp => py_range}/pck.ads | 0
7 files changed, 81 insertions(+), 0 deletions(-)
create mode 100644 gdb/testsuite/gdb.ada/py_range.exp
create mode 100644 gdb/testsuite/gdb.ada/py_range/foo.adb
copy gdb/testsuite/gdb.ada/{fixed_cmp => py_range}/pck.adb (100%)
copy gdb/testsuite/gdb.ada/{fixed_cmp => py_range}/pck.ads (100%)
hooks/post-receive
--
gdb and binutils