old-cross-binutils/gdb/testsuite/gdb.ada
Joel Brobecker df7752b044 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.
2013-11-19 06:44:40 +04:00
..
aliased_array Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
array_bounds Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
array_return Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
array_subscript_addr Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
arrayidx Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
arrayparam Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
arrayptr [testsuite/Ada] Add testing of access to packed arrays. 2013-07-10 00:35:01 +00:00
atomic_enum Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
bad-task-bp-keyword Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
bp_enum_homonym Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
bp_on_var Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
bp_range_type Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
bp_reset Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
call_pn Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
catch_ex Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
char_enum Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
char_param Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
complete Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
cond_lang Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
dyn_loc Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
enum_idx_packed Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
exec_changed Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
expr_delims Allow 'thread' to be used as a variable name in expressions. 2013-03-12 09:03:11 +00:00
exprs Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
fixed_cmp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
fixed_points Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
float_param [dwarf] Mark all functions as prototyped except C functions. 2013-05-20 09:45:13 +00:00
formatted_ref Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
frame_args Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
fullname_bp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
fun_addr Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
fun_in_declare Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
funcall_param Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
homonym Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
info_exc gdb.ada/info_exc.exp,mi_exc_info.exp: Use more unique exception name. 2013-11-16 06:45:57 +04:00
info_locals_renaming Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
int_deref Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
interface Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
iwide Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
lang_switch Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
mi_catch_ex Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
mi_ex_cond Dandling memory pointers in Ada catchpoints with GDB/MI. 2013-11-11 19:19:07 +04:00
mi_exc_info gdb.ada/info_exc.exp,mi_exc_info.exp: Use more unique exception name. 2013-11-16 06:45:57 +04:00
mi_task_arg Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
mi_task_info Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
mod_from_name Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
nested Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
null_array Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
null_record Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
O2_float_param Fix DW_OP_GNU_regval_type with FP registers 2013-11-14 22:38:48 -05:00
operator_bp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
optim_drec Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
packed_array Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
packed_tagged Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
print_chars Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
ptr_typedef Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
ptype_field Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
ptype_tagged_param Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
py_range Fix int() builtin with range type gdb.Value objects. 2013-11-19 06:44:40 +04:00
rdv_wait Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
rec_return Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
ref_param Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
ref_tick_size Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
same_enum Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
set_pckd_arr_elt Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
set_wstr Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
small_reg_param Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
start Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
str_ref_cmp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
sym_print_name Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
taft_type Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
tagged Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
tagged_not_init Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
task_bp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
tasks Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
tick_last_segv Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
type_coercion Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
unc_arr_ptr_in_var_rec Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
uninitialized_vars Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
variant_record_packed_array Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
watch_arg Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
whatis_array_val Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
widewide Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
win_fu_syms Ignore __fu<digits>__ symbols from COFF symbol tables 2013-03-29 02:04:15 +00:00
aliased_array.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
array_bounds.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
array_return.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
array_subscript_addr.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
arrayidx.exp gdb/testsuite/ 2013-03-14 13:34:06 +00:00
arrayparam.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
arrayptr.exp [testsuite/Ada] Add testing of access to packed arrays. 2013-07-10 00:35:01 +00:00
assign_1.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
atomic_enum.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
bad-task-bp-keyword.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
boolean_expr.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
bp_enum_homonym.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
bp_on_var.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
bp_range_type.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
bp_reset.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
call_pn.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
catch_ex.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
char_enum.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
char_param.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
complete.exp gdb.ada/complete.exp: Fix FIXME. 2013-05-16 10:13:33 +00:00
cond_lang.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
dyn_loc.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
enum_idx_packed.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
exec_changed.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
expr_delims.exp Allow 'thread' to be used as a variable name in expressions. 2013-03-12 09:03:11 +00:00
exprs.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
fixed_cmp.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
fixed_points.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
float_param.exp [dwarf] Mark all functions as prototyped except C functions. 2013-05-20 09:45:13 +00:00
formatted_ref.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
frame_args.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
fullname_bp.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
fun_addr.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
fun_in_declare.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
funcall_param.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
gnat_ada.gpr Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
homonym.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
info_exc.exp gdb.ada/info_exc.exp,mi_exc_info.exp: Use more unique exception name. 2013-11-16 06:45:57 +04:00
info_locals_renaming.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
info_types.c Fix formating in copyright headers. 2013-06-07 14:39:33 +00:00
info_types.exp simple test suite fix in gdb.ada 2013-07-16 18:52:18 +00:00
int_deref.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
interface.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
iwide.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
lang_switch.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
Makefile.in * Makefile.in (clean): Remove Fission .dwo and .dwp files. 2012-05-17 19:03:59 +00:00
mi_catch_ex.exp Adjust gdb.ada/mi_catch_ex.exp to use GDB/MI catch commands... 2013-10-11 13:49:36 +00:00
mi_ex_cond.exp Dandling memory pointers in Ada catchpoints with GDB/MI. 2013-11-11 19:19:07 +04:00
mi_exc_info.exp gdb.ada/info_exc.exp,mi_exc_info.exp: Use more unique exception name. 2013-11-16 06:45:57 +04:00
mi_task_arg.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
mi_task_info.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
mod_from_name.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
nested.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
null_array.exp gdb/testsuite/ 2013-03-14 13:34:06 +00:00
null_record.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
O2_float_param.exp Fix DW_OP_GNU_regval_type with FP registers 2013-11-14 22:38:48 -05:00
operator_bp.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
optim_drec.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
packed_array.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
packed_tagged.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
print_chars.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
print_pc.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
ptr_typedef.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
ptype_arith_binop.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
ptype_field.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
ptype_tagged_param.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
py_range.exp Fix int() builtin with range type gdb.Value objects. 2013-11-19 06:44:40 +04:00
rdv_wait.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
rec_return.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
ref_param.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
ref_tick_size.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
same_enum.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
set_pckd_arr_elt.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
set_wstr.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
small_reg_param.exp Fix FAIL: gdb.ada/small_reg_param.exp: continue to call_me 2013-07-10 00:10:37 +00:00
start.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
str_ref_cmp.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
sym_print_name.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
taft_type.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
tagged.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
tagged_not_init.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
task_bp.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
tasks.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
tick_last_segv.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
type_coercion.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
unc_arr_ptr_in_var_rec.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
uninitialized_vars.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
variant_record_packed_array.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
watch_arg.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
whatis_array_val.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
widewide.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
win_fu_syms.exp Ignore __fu<digits>__ symbols from COFF symbol tables 2013-03-29 02:04:15 +00:00