binutils-gdb/gdb/testsuite/gdb.ada
Paul N. Hilfinger 82d049abf1 Allow 'thread' to be used as a variable name in expressions.
GDB treats the identifiers 'if', 'thread', and 'task' unconditionally
as expression delimiters in Ada mode, which is correct for 'if' and 'task',
but wrong for 'thread' in cases such as

      print thread

Borrowing from c-exp.y, we observe that 'thread' must be followed by
numerals, whereas identifiers never are and treat them as delimiters
only in that case.

In the process, the current also refactors and incidentally fixes the
code for rewinding the input to before the delimiting tokens.  For
example, the code

      watch expr if i > 2

fails because the input is only rewound to just before the 'i',
leaving the 'if' as part of the expression (and thus making the
rest look like trailing junk rather than a conditional clause).

gdb/ChangeLog:

    * ada-lex.l (rules): Only recognize 'thread' as a
    delimiter when followed by numerals, as for c-exp.y.
    Use new rewind_to_char function to rewind the input for
    expression-delimiting tokens.
    (rewind_to_char): New function.

gdb/testsuite/ChangeLog:

    * gdb.ada/expr_delims.exp: New file.
    * gdb.ada/expr_delims/foo.adb: New file.
    * gdb.ada/expr_delims/pck.ads: New file.
    * gdb.ada/expr_delims/pck.adb: New file.
2013-03-12 09:03:11 +00: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 Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +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
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_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_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
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
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
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 Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
arrayparam.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
arrayptr.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +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 Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +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
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_locals_renaming.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
info_types.c Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
info_types.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +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 Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00: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 Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00:00
null_record.exp Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +00: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
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 Update years in copyright notice for the GDB files. 2013-01-01 06:33:28 +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