old-cross-binutils/gdb/testsuite/gdb.ada
Joel Brobecker 9ac7f98e7c [Ada] Breakpoints on task bodies
Consider the following declaration:

    package Pck is
       task Dummy_Task is
          entry Start;
       end Dummy_Task;
    end Pck;

Inserting a breakpoint on the body of that task does not currently
work:

    (gdb) b pck.dummy_task
    "pck.dummy_task" is not a function
    Make breakpoint pending on future shared library load? (y or [n]) n

What happens here is that the compiler generates two symbols:

  (a) Symbol `pck__dummy_task' which is a *variable* referencing
      the task;

  (b) Symbol `pck__dummy_taskTKB' which is the subprogram implementing
      the body of the task.

The symbol lookup only finds the variable before of the TKB suffix in
the subprogram name. This patch fixes the problem by adjusting the
ada-lang.c:is_name_suffix routine to recognize "TKB" suffixes.  But
that's not enough, because the search in the symtab is performed via
the block dictionary, using a hashing algorithm. So, for the search
to find `pck__dummy_taskTKB', I had to modify the hashing function
to ignore TKB suffixes as well.

gdb/ChangeLog:

        * ada-lang.c (is_name_suffix): Add handling of "TKB" suffixes.
        Update function documentation.
        * dictionary.c (dict_hash): Ignore "TKB" suffixes in hash
        computation.

gdb/testsuite/ChangeLog:

        * gdb.ada/task_bp: New testcase.
2011-12-21 07:10:59 +00:00
..
array_bounds run copyright.sh for 2011. 2011-01-01 15:34:07 +00:00
array_return run copyright.sh for 2011. 2011-01-01 15:34:07 +00:00
array_subscript_addr run copyright.sh for 2011. 2011-01-01 15:34:07 +00:00
arrayidx run copyright.sh for 2011. 2011-01-01 15:34:07 +00:00
arrayparam run copyright.sh for 2011. 2011-01-01 15:34:07 +00:00
arrayptr extend scope of testing in gdb.ada/arrayptr 2011-04-01 17:03:52 +00:00
atomic_enum run copyright.sh for 2011. 2011-01-01 15:34:07 +00:00
call_pn run copyright.sh for 2011. 2011-01-01 15:34:07 +00:00
catch_ex run copyright.sh for 2011. 2011-01-01 15:34:07 +00:00
char_enum handle character-based enumeration typedefs 2011-07-01 18:25:17 +00:00
char_param run copyright.sh for 2011. 2011-01-01 15:34:07 +00:00
complete Add copyright header to some Ada files (testsuite) 2011-01-06 06:27:44 +00:00
cond_lang run copyright.sh for 2011. 2011-01-01 15:34:07 +00:00
dyn_loc run copyright.sh for 2011. 2011-01-01 15:34:07 +00:00
exec_changed run copyright.sh for 2011. 2011-01-01 15:34:07 +00:00
exprs run copyright.sh for 2011. 2011-01-01 15:34:07 +00:00
fixed_cmp run copyright.sh for 2011. 2011-01-01 15:34:07 +00:00
fixed_points run copyright.sh for 2011. 2011-01-01 15:34:07 +00:00
formatted_ref run copyright.sh for 2011. 2011-01-01 15:34:07 +00:00
frame_args run copyright.sh for 2011. 2011-01-01 15:34:07 +00:00
fullname_bp wrong value returned by ada-lang.c:compare_names 2011-11-29 01:00:52 +00:00
fun_addr run copyright.sh for 2011. 2011-01-01 15:34:07 +00:00
fun_in_declare run copyright.sh for 2011. 2011-01-01 15:34:07 +00:00
funcall_param run copyright.sh for 2011. 2011-01-01 15:34:07 +00:00
homonym Make sure all types in gdb.ada/homonym testcase are used... 2011-12-01 23:16:44 +00:00
int_deref run copyright.sh for 2011. 2011-01-01 15:34:07 +00:00
interface run copyright.sh for 2011. 2011-01-01 15:34:07 +00:00
lang_switch run copyright.sh for 2011. 2011-01-01 15:34:07 +00:00
mi_catch_ex improve Ada exception catchpoint MI notification 2011-04-01 16:59:58 +00:00
mi_task_info [Ada] Fix number of lines in -ada-task-info output 2011-10-21 18:46:06 +00:00
mod_from_name run copyright.sh for 2011. 2011-01-01 15:34:07 +00:00
nested run copyright.sh for 2011. 2011-01-01 15:34:07 +00:00
null_array run copyright.sh for 2011. 2011-01-01 15:34:07 +00:00
null_record Avoid the use of gdb_start_cmd in gdb.ada/*.exp testcases. 2011-01-06 10:33:38 +00:00
packed_array [Ada] Fix unconstrained packed array size 2011-02-17 06:42:57 +00:00
packed_tagged run copyright.sh for 2011. 2011-01-01 15:34:07 +00:00
print_chars Add copyright header to some Ada files (testsuite) 2011-01-06 06:27:44 +00:00
ptr_typedef missing type description for typedef to pointer value 2011-07-01 18:26:22 +00:00
ptype_field run copyright.sh for 2011. 2011-01-01 15:34:07 +00:00
ptype_tagged_param run copyright.sh for 2011. 2011-01-01 15:34:07 +00:00
rec_return run copyright.sh for 2011. 2011-01-01 15:34:07 +00:00
ref_param run copyright.sh for 2011. 2011-01-01 15:34:07 +00:00
ref_tick_size run copyright.sh for 2011. 2011-01-01 15:34:07 +00:00
same_enum treat identical enum types as the same type 2011-07-01 18:26:50 +00:00
small_reg_param read_frame_register_value and big endian arches 2011-11-10 17:14:41 +00:00
start Avoid the use of gdb_start_cmd in gdb.ada/*.exp testcases. 2011-01-06 10:33:38 +00:00
str_ref_cmp run copyright.sh for 2011. 2011-01-01 15:34:07 +00:00
sym_print_name gdb/testsuite/ 2011-03-28 20:07:12 +00:00
taft_type run copyright.sh for 2011. 2011-01-01 15:34:07 +00:00
tagged run copyright.sh for 2011. 2011-01-01 15:34:07 +00:00
task_bp [Ada] Breakpoints on task bodies 2011-12-21 07:10:59 +00:00
tasks run copyright.sh for 2011. 2011-01-01 15:34:07 +00:00
tick_last_segv run copyright.sh for 2011. 2011-01-01 15:34:07 +00:00
type_coercion run copyright.sh for 2011. 2011-01-01 15:34:07 +00:00
uninitialized_vars Avoid the use of gdb_start_cmd in gdb.ada/*.exp testcases. 2011-01-06 10:33:38 +00:00
variant_record_packed_array run copyright.sh for 2011. 2011-01-01 15:34:07 +00:00
watch_arg fix incorrect assumption in gdb.ada/watch_arg 2011-12-06 14:00:37 +00:00
widewide new testcase for Ada Wide Wide Characters and Strings 2011-01-14 19:33:19 +00:00
array_bounds.exp [testsuite/gdb.ada] simplify some testcases by using clean_restart. 2011-01-06 10:35:00 +00:00
array_return.exp [testsuite/gdb.ada] simplify some testcases by using clean_restart. 2011-01-06 10:35:00 +00:00
array_subscript_addr.exp [testsuite/gdb.ada] simplify some testcases by using clean_restart. 2011-01-06 10:35:00 +00:00
arrayidx.exp [testsuite/gdb.ada] simplify some testcases by using clean_restart. 2011-01-06 10:35:00 +00:00
arrayparam.exp gdb/testsuite/ 2011-03-28 20:07:12 +00:00
arrayptr.exp variables whose type is a typedef to an array pointer 2011-07-01 18:25:49 +00:00
assign_1.exp run copyright.sh for 2011. 2011-01-01 15:34:07 +00:00
atomic_enum.exp [testsuite/gdb.ada] simplify some testcases by using clean_restart. 2011-01-06 10:35:00 +00:00
boolean_expr.exp run copyright.sh for 2011. 2011-01-01 15:34:07 +00:00
call_pn.exp [testsuite/gdb.ada] simplify some testcases by using clean_restart. 2011-01-06 10:35:00 +00:00
catch_ex.exp Warn if missing debug info for Ada exception catchpoints 2011-12-11 17:36:10 +00:00
char_enum.exp handle character-based enumeration typedefs 2011-07-01 18:25:17 +00:00
char_param.exp [testsuite/gdb.ada] simplify some testcases by using clean_restart. 2011-01-06 10:35:00 +00:00
complete.exp [testsuite/gdb.ada] simplify some testcases by using clean_restart. 2011-01-06 10:35:00 +00:00
cond_lang.exp run copyright.sh for 2011. 2011-01-01 15:34:07 +00:00
dyn_loc.exp run copyright.sh for 2011. 2011-01-01 15:34:07 +00:00
exec_changed.exp Avoid the use of gdb_start_cmd in gdb.ada/*.exp testcases. 2011-01-06 10:33:38 +00:00
exprs.exp [testsuite/gdb.ada] simplify some testcases by using clean_restart. 2011-01-06 10:35:00 +00:00
fixed_cmp.exp [testsuite/gdb.ada] simplify some testcases by using clean_restart. 2011-01-06 10:35:00 +00:00
fixed_points.exp [testsuite/gdb.ada] simplify some testcases by using clean_restart. 2011-01-06 10:35:00 +00:00
formatted_ref.exp [testsuite/gdb.ada] simplify some testcases by using clean_restart. 2011-01-06 10:35:00 +00:00
frame_args.exp [testsuite/gdb.ada] simplify some testcases by using clean_restart. 2011-01-06 10:35:00 +00:00
fullname_bp.exp the "ambiguous linespec" series 2011-12-06 18:54:43 +00:00
fun_addr.exp [testsuite/gdb.ada] simplify some testcases by using clean_restart. 2011-01-06 10:35:00 +00:00
fun_in_declare.exp [testsuite/gdb.ada] simplify some testcases by using clean_restart. 2011-01-06 10:35:00 +00:00
funcall_param.exp [testsuite/gdb.ada] simplify some testcases by using clean_restart. 2011-01-06 10:35:00 +00:00
gnat_ada.gpr gdb/testsuite/ 2011-01-02 07:32:34 +00:00
homonym.exp the "ambiguous linespec" series 2011-12-06 18:54:43 +00:00
info_types.c run copyright.sh for 2011. 2011-01-01 15:34:07 +00:00
info_types.exp run copyright.sh for 2011. 2011-01-01 15:34:07 +00:00
int_deref.exp [testsuite/gdb.ada] simplify some testcases by using clean_restart. 2011-01-06 10:35:00 +00:00
interface.exp [testsuite/gdb.ada] simplify some testcases by using clean_restart. 2011-01-06 10:35:00 +00:00
lang_switch.exp [testsuite/gdb.ada] simplify some testcases by using clean_restart. 2011-01-06 10:35:00 +00:00
Makefile.in 2011-02-22 Michael Snyder <msnyder@vmware.com> 2011-02-22 20:52:49 +00:00
mi_catch_ex.exp Warn if missing debug info for Ada exception catchpoints 2011-12-11 17:36:10 +00:00
mi_task_info.exp [Ada] Fix number of lines in -ada-task-info output 2011-10-21 18:46:06 +00:00
mod_from_name.exp [testsuite/gdb.ada] simplify some testcases by using clean_restart. 2011-01-06 10:35:00 +00:00
nested.exp [testsuite/gdb.ada] simplify some testcases by using clean_restart. 2011-01-06 10:35:00 +00:00
null_array.exp [testsuite/gdb.ada] simplify some testcases by using clean_restart. 2011-01-06 10:35:00 +00:00
null_record.exp [testsuite/gdb.ada] simplify some testcases by using clean_restart. 2011-01-06 10:35:00 +00:00
packed_array.exp Fix printing address of packed array 2011-07-01 18:27:25 +00:00
packed_tagged.exp [testsuite/gdb.ada] simplify some testcases by using clean_restart. 2011-01-06 10:35:00 +00:00
print_chars.exp [testsuite/gdb.ada] simplify some testcases by using clean_restart. 2011-01-06 10:35:00 +00:00
print_pc.exp [testsuite/gdb.ada] simplify some testcases by using clean_restart. 2011-01-06 10:35:00 +00:00
ptr_typedef.exp missing type description for typedef to pointer value 2011-07-01 18:26:22 +00:00
ptype_arith_binop.exp run copyright.sh for 2011. 2011-01-01 15:34:07 +00:00
ptype_field.exp [testsuite/gdb.ada] simplify some testcases by using clean_restart. 2011-01-06 10:35:00 +00:00
ptype_tagged_param.exp [testsuite/gdb.ada] simplify some testcases by using clean_restart. 2011-01-06 10:35:00 +00:00
rec_return.exp [testsuite/gdb.ada] simplify some testcases by using clean_restart. 2011-01-06 10:35:00 +00:00
ref_param.exp [testsuite/gdb.ada] simplify some testcases by using clean_restart. 2011-01-06 10:35:00 +00:00
ref_tick_size.exp [testsuite/gdb.ada] simplify some testcases by using clean_restart. 2011-01-06 10:35:00 +00:00
same_enum.exp treat identical enum types as the same type 2011-07-01 18:26:50 +00:00
small_reg_param.exp read_frame_register_value and big endian arches 2011-11-10 17:14:41 +00:00
start.exp 2011-05-16 Pedro Alves <pedro@codesourcery.com> 2011-05-16 13:56:41 +00:00
str_ref_cmp.exp gdb/testsuite/ 2011-03-28 20:07:12 +00:00
sym_print_name.exp gdb/testsuite/ 2011-03-28 20:07:12 +00:00
taft_type.exp [testsuite/gdb.ada] simplify some testcases by using clean_restart. 2011-01-06 10:35:00 +00:00
tagged.exp [testsuite/gdb.ada] simplify some testcases by using clean_restart. 2011-01-06 10:35:00 +00:00
task_bp.exp [Ada] Breakpoints on task bodies 2011-12-21 07:10:59 +00:00
tasks.exp [Ada] Re-implement `info tasks' command using ui-out 2011-09-16 19:09:57 +00:00
tick_last_segv.exp [testsuite/gdb.ada] simplify some testcases by using clean_restart. 2011-01-06 10:35:00 +00:00
type_coercion.exp [testsuite/gdb.ada] simplify some testcases by using clean_restart. 2011-01-06 10:35:00 +00:00
uninitialized_vars.exp [testsuite/gdb.ada] simplify some testcases by using clean_restart. 2011-01-06 10:35:00 +00:00
variant_record_packed_array.exp [testsuite/gdb.ada] simplify some testcases by using clean_restart. 2011-01-06 10:35:00 +00:00
watch_arg.exp [testsuite/gdb.ada] simplify some testcases by using clean_restart. 2011-01-06 10:35:00 +00:00
widewide.exp new testcase for Ada Wide Wide Characters and Strings 2011-01-14 19:33:19 +00:00