old-cross-binutils/gdb/testsuite/gdb.ada
Joel Brobecker 4ae24af054 wrong language used when re-setting breakpoint
The debugger sometimes fails to re-set a breakpoint as follow,
causing it to become disabled:

    (gdb) b nested_sub
    Breakpoint 1 at 0x401cec: file foo.adb, line 7.
    (gdb) b do_nothing
    Breakpoint 2 at 0x401cdc: file pck.adb, line 4.
    (gdb) run
    Starting program: /[...]/foo
    Error in re-setting breakpoint 1: Function "nested_sub" not defined.

    Breakpoint 2, pck.do_nothing () at pck.adb:4
    4             null;

This only happens on machines where the debug-file-directory is
a valid directory name.

The reason behind the error is that the linespec code that re-sets
the breakpoints uses the current_language global when iterating
over a symtab's symbols. However, the that global gets switched from
Ada to C during the startup phase, probably as a side-effect of stopping
in some system code for which debugging info is available. The fix
is to make sure that we use the correct language.

gdb/ChangeLog:

        * linespec.c (iterate_over_all_matching_symtabs): Use the correct
        language when iterating over symbols.

gdb/testsuite/ChangeLog:

        * gdb.ada/bp_reset: New testcase.
2012-09-18 16:52:19 +00:00
..
aliased_array
array_bounds
array_return
array_subscript_addr
arrayidx
arrayparam
arrayptr
atomic_enum
bad-task-bp-keyword
bp_enum_homonym
bp_on_var
bp_range_type
bp_reset
call_pn
catch_ex
char_enum
char_param
complete
cond_lang
dyn_loc
enum_idx_packed
exec_changed
exprs
fixed_cmp
fixed_points
formatted_ref
frame_args
fullname_bp
fun_addr
fun_in_declare
funcall_param
homonym
info_locals_renaming
int_deref
interface
lang_switch
mi_catch_ex
mi_task_arg
mi_task_info
mod_from_name
nested
null_array
null_record
operator_bp
optim_drec
packed_array
packed_tagged
print_chars
ptr_typedef
ptype_field
ptype_tagged_param
rdv_wait
rec_return
ref_param
ref_tick_size
same_enum
set_pckd_arr_elt
small_reg_param
start
str_ref_cmp
sym_print_name
taft_type
tagged
tagged_not_init
task_bp
tasks
tick_last_segv
type_coercion
uninitialized_vars
variant_record_packed_array
watch_arg
whatis_array_val
widewide
aliased_array.exp
array_bounds.exp
array_return.exp
array_subscript_addr.exp
arrayidx.exp
arrayparam.exp
arrayptr.exp
assign_1.exp
atomic_enum.exp
bad-task-bp-keyword.exp
boolean_expr.exp
bp_enum_homonym.exp
bp_on_var.exp
bp_range_type.exp
bp_reset.exp
call_pn.exp
catch_ex.exp
char_enum.exp
char_param.exp
complete.exp
cond_lang.exp
dyn_loc.exp
enum_idx_packed.exp
exec_changed.exp
exprs.exp
fixed_cmp.exp
fixed_points.exp
formatted_ref.exp
frame_args.exp
fullname_bp.exp
fun_addr.exp
fun_in_declare.exp
funcall_param.exp
gnat_ada.gpr
homonym.exp
info_locals_renaming.exp
info_types.c
info_types.exp
int_deref.exp
interface.exp
lang_switch.exp
Makefile.in
mi_catch_ex.exp
mi_task_arg.exp
mi_task_info.exp
mod_from_name.exp
nested.exp
null_array.exp
null_record.exp
operator_bp.exp
optim_drec.exp
packed_array.exp
packed_tagged.exp
print_chars.exp
print_pc.exp
ptr_typedef.exp
ptype_arith_binop.exp
ptype_field.exp
ptype_tagged_param.exp
rdv_wait.exp
rec_return.exp
ref_param.exp
ref_tick_size.exp
same_enum.exp
set_pckd_arr_elt.exp
small_reg_param.exp
start.exp
str_ref_cmp.exp
sym_print_name.exp
taft_type.exp
tagged.exp
tagged_not_init.exp
task_bp.exp
tasks.exp
tick_last_segv.exp
type_coercion.exp
uninitialized_vars.exp
variant_record_packed_array.exp
watch_arg.exp
whatis_array_val.exp
widewide.exp