binutils-gdb/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
array_return
array_subscript_addr
arrayidx
arrayparam
arrayptr extend scope of testing in gdb.ada/arrayptr 2011-04-01 17:03:52 +00:00
atomic_enum
call_pn
catch_ex
char_enum handle character-based enumeration typedefs 2011-07-01 18:25:17 +00:00
char_param
complete
cond_lang
dyn_loc
exec_changed
exprs
fixed_cmp
fixed_points
formatted_ref
frame_args
fullname_bp wrong value returned by ada-lang.c:compare_names 2011-11-29 01:00:52 +00:00
fun_addr
fun_in_declare
funcall_param
homonym Make sure all types in gdb.ada/homonym testcase are used... 2011-12-01 23:16:44 +00:00
int_deref
interface
lang_switch
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
nested
null_array
null_record
packed_array [Ada] Fix unconstrained packed array size 2011-02-17 06:42:57 +00:00
packed_tagged
print_chars
ptr_typedef missing type description for typedef to pointer value 2011-07-01 18:26:22 +00:00
ptype_field
ptype_tagged_param
rec_return
ref_param
ref_tick_size
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
str_ref_cmp
sym_print_name gdb/testsuite/ 2011-03-28 20:07:12 +00:00
taft_type
tagged
task_bp [Ada] Breakpoints on task bodies 2011-12-21 07:10:59 +00:00
tasks
tick_last_segv
type_coercion
uninitialized_vars
variant_record_packed_array
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
Makefile.in 2011-02-22 Michael Snyder <msnyder@vmware.com> 2011-02-22 20:52:49 +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
atomic_enum.exp [testsuite/gdb.ada] simplify some testcases by using clean_restart. 2011-01-06 10:35:00 +00:00
boolean_expr.exp
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
dyn_loc.exp
exec_changed.exp
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
homonym.exp the "ambiguous linespec" series 2011-12-06 18:54:43 +00:00
info_types.c
info_types.exp
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
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
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