summaryrefslogtreecommitdiff
path: root/gdb/breakpoint.h
Commit message (Collapse)AuthorAgeFilesLines
...
* 2011-06-22 Pedro Alves <pedro@codesourcery.com>Pedro Alves2011-06-221-13/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * breakpoint.c (bpstat_stop_status): Call the check_status breakpoint_ops method. (print_one_breakpoint_location): Also print the condition for Ada exception catchpoints. (allocate_bp_location): New, factored out from allocate_bp_location. (allocate_bp_location): Adjust. Call the owner breakpoint's allocate_location method, if there is one. (free_bp_location): Call the locations's dtor method, if there is one. (init_raw_breakpoint_without_location): New breakpoint_ops parameter. Use it. (set_raw_breakpoint_without_location): Adjust. (init_raw_breakpoint): New breakpoint_ops parameter. Pass it down. (set_raw_breakpoint): Adjust. (catch_fork_breakpoint_ops, catch_vfork_breakpoint_ops) (catch_syscall_breakpoint_ops): Install NULL allocate_location, re_set and check_status methods. (init_catchpoint): Don't memset, initialize thread, addr_string and enable_state. Pass the ops down to init_raw_breakpoint. (install_catchpoint): Rename to ... (install_breakpoint): ... this, and make extern. (create_fork_vfork_event_catchpoint): Adjust. (catch_exec_breakpoint_ops): Install NULL allocate_location, re_set and check_status methods. (create_syscall_event_catchpoint): Adjust. (ranged_breakpoint_ops, watchpoint_breakpoint_ops) (masked_watchpoint_breakpoint_ops): Install NULL allocate_location, re_set and check_status methods. (catch_exec_command_1): Adjust. (gnu_v3_exception_catchpoint_ops): Install NULL allocate_location, re_set and check_status methods. (create_ada_exception_breakpoint): Rename to ... (init_ada_exception_breakpoint): ... this. Add a struct breakpoint parameter, and delete the exp_string, cond_string and cond parameters. Use init_raw_breakpoint, and don't install or mention the breakpoint yet. Don't clear breakpoint fields that init_raw_breakpoint already clears. (re_set_breakpoint): Delete, split into ... (breakpoint_re_set_default, prepare_re_set_context): ... these new functions. (breakpoint_re_set_one): Call the breakpoint's breakpoint_ops->re_set implementation, if there's one. Adjust. * breakpoint.h: Forward declare struct bpstats and struct bp_location. (struct bp_location_ops): New type. (struct bp_location): New field `ops'. (struct breakpoint_ops): New `allocate_location', `re_set' and `check_status' fields. Make `breakpoint_hit''s description match reality. (init_bp_location): Declare. (breakpoint_re_set_default): Declare. (create_ada_exception_breakpoint): Rename to ... (init_ada_exception_breakpoint): ... this. Add a struct breakpoint parameter, and delete the exp_string, cond_string and cond parameters. (install_breakpoint): Declare. * ada-lang.c: Include exceptions.h. <Ada exceptions description>: Update. (struct ada_catchpoint_location): New type. (ada_catchpoint_location_dtor): New function. (ada_catchpoint_location_ops): New global. (ada_catchpoint): New type. (create_excep_cond_exprs): New function. (dtor_exception, allocate_location_exception, re_set_exception) (should_stop_exception, check_status_exception): New functions. (print_one_exception, print_mention_exception) (print_recreate_exception): Adjust. (dtor_catch_exception, allocate_location_catch_exception) (re_set_catch_exception, check_status_catch_exception): New functions. (catch_exception_breakpoint_ops): Install them. (dtor_catch_exception_unhandled) (allocate_location_catch_exception_unhandled) (re_set_catch_exception_unhandled) (check_status_catch_exception_unhandled): New functions. (catch_exception_unhandled_breakpoint_ops): Install them. (dtor_catch_assert, allocate_location_catch_assert) (re_set_catch_assert, check_status_catch_assert): New functions. (catch_assert_breakpoint_ops): Install them. (ada_exception_catchpoint_p): Delete. (catch_ada_exception_command_split) (ada_exception_catchpoint_cond_string): Rename exp_string parameter to excep_string. Adjust. (ada_parse_catchpoint_condition): Delete. (ada_exception_sal): Rename the exp_string parameter to excep_string. Delete the cond_string and cond parameters. Adjust. (ada_decode_exception_location): Rename the exp_string parameter to excep_string. Delete the cond_string and cond parameters. Adjust. (create_ada_exception_catchpoint): New function. (catch_ada_exception_command, ada_decode_assert_location) (catch_assert_command): Adjust. * ada-lang.h (ada_exception_catchpoint_p): Delete declaration.
* 2011-06-22 Pedro Alves <pedro@codesourcery.com>Pedro Alves2011-06-221-0/+30
| | | | | | | | | | | | | | | | | | | | | | | * ada-lang.c: Include arch-utils.h. (ada_decode_exception_location): Make static. (catch_ada_exception_command): Moved here from breakpoint.c. (ada_decode_assert_location): Make static. (catch_assert_command): Moved here from breakpoint.c. (_initialize_ada_lang): Install the exception and assert catchpoint commands here. * ada-lang.h (ada_decode_exception_location) (ada_decode_assert_location): Delete declarations. * breakpoint.c (CATCH_PERMANENT, CATCH_TEMPORARY): Moved to breakpoint.h. (create_ada_exception_breakpoint): Make extern. (catch_ada_exception_command, catch_assert_command): Moved to ada-lang.c. (add_catch_command): Make extern. (_initilize_breakpoint): Don't install the exception and assert catchpoint commands here. * breakpoint.h (CATCH_PERMANENT, CATCH_TEMPORARY): Moved from breakpoint.c (add_catch_command, create_ada_exception_breakpoint): Declare.
* 2011-06-22 Pedro Alves <pedro@codesourcery.com>Pedro Alves2011-06-221-5/+0
| | | | | | | | | | | | * breakpoint.h (struct breakpoint): Delete field `exec_pathname'. * breakpoint.c (init_raw_breakpoint_without_location): Remove reference to exec_pathname. (struct exec_catchpoint): New type. (dtor_catch_exec): New function. (insert_catch_exec, print_it_catch_exec, print_one_catch_exec): Adjust. (catch_exec_breakpoint_ops): Install dtor_catch_syscall. (catch_exec_command_1): Adjust to use init_catchpoint. (delete_breakpoint): Remove reference to exec_pathname.
* 2011-06-22 Pedro Alves <pedro@codesourcery.com>Pedro Alves2011-06-221-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | * breakpoint.h (struct breakpoint_ops): New field `dtor'. (struct breakpoint): Delete field `syscalls_to_be_caught'. * breakpoint.c (init_raw_breakpoint_without_location): Remove reference to syscalls_to_be_caught. (catch_fork_breakpoint_ops, catch_vfork_breakpoint_ops): Install a NULL `dtor'. (struct syscall_catchpoint): New type. (dtor_catch_syscall): New function. (insert_catch_syscall, remove_catch_syscall) (breakpoint_hit_catch_syscall, print_one_catch_syscall) (print_recreate_catch_syscall): Adjust. (catch_syscall_breakpoint_ops): Install dtor_catch_syscall. (catch_exec_breakpoint_ops): Install a NULL `dtor'. (create_syscall_event_catchpoint): Adjust to use init_catchpoint. (ranged_breakpoint_ops, watchpoint_breakpoint_ops) (masked_watchpoint_breakpoint_ops) (gnu_v3_exception_catchpoint_ops): Install a NULL `dtor'. (delete_breakpoint): Call the `dtor' breakpoint_ops method, if there is one. Remove references to syscalls_to_be_caught. (catching_syscall_number): Adjust. * ada-lang.c (catch_exception_breakpoint_ops) (catch_exception_unhandled_breakpoint_ops) (catch_assert_breakpoint_ops): Install a NULL `dtor'.
* 2011-06-22 Pedro Alves <pedro@codesourcery.com>Pedro Alves2011-06-221-5/+0
| | | | | | | | | | | | | * breakpoint.h (struct breakpoint): Delete forked_inferior_pid field. * breakpoint.c (init_raw_breakpoint_without_location): Remove reference to forked_inferior_pid. (struct fork_catchpoint): New type. (breakpoint_hit_catch_fork, print_it_catch_fork) (print_one_catch_fork, breakpoint_hit_catch_vfork) (print_it_catch_vfork, print_one_catch_vfork): Adjust. (create_fork_vfork_event_catchpoint): Adjust to use init_catchpoint.
* Various spelling fixes.Joel Brobecker2011-06-031-2/+2
| | | | | | | | | | | | | | gdb/ChangeLog: From Stephen Kitt <steve@sk2.org> * breakpoint.c, breakpoint.h, cli/cli-dump.c, dwarf2expr.c, gdbarch.c, gdbarch.sh, remote.c: Various spelling fixes. gdb/testsuite/ChangeLog: From Stephen Kitt <steve@sk2.org> * gdb.base/help.exp: Adjust following some spelling corrections in GDB.
* 2011-05-27 Pedro Alves <pedro@codesourcery.com>Pedro Alves2011-05-271-0/+1
| | | | | | | | | | gdb/ * defs.h (struct thread_info, struct inferior): Delete forward declarations. * breakpoint.h (struct thread_info): New forward declaration. * observer.sh (struct inferior): New forward declaration. * python/python-internal.h (struct inferior): New forward declaration.
* 2011-05-26 Pedro Alves <pedro@codesourcery.com>Pedro Alves2011-05-261-4/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gdb/ * breakpoint.h (enum bptype) <bp_hp_step_resume>: New. (enum bpstat_what_main_action): Move BPSTAT_WHAT_STEP_RESUME before BPSTAT_WHAT_STOP_SILENT. Add BPSTAT_WHAT_HP_STEP_RESUME at the end. * breakpoint.c (update_breakpoints_after_exec): Also delete hp step-resume breakpoints. (print_it_typical): Handle bp_hp_step_resume. (bpstat_what): Ditto. (bptype_string): Ditto. (print_one_breakpoint_location): Ditto. (allocate_bp_location): Ditto. (mention): Ditto. (breakpoint_re_set_one): Ditto. * infrun.c (handle_inferior_event): Adjust. Split BPSTAT_WHAT_STEP_RESUME handling in BPSTAT_WHAT_STEP_RESUME and BPSTAT_WHAT_HP_STEP_RESUME. (insert_step_resume_breakpoint_at_sal): Rename to ... (insert_step_resume_breakpoint_at_sal_1): ... this. Add bptype parameter. Handle it. (insert_step_resume_breakpoint_at_sal): Reimplement on top of insert_step_resume_breakpoint_at_sal_1. (insert_step_resume_breakpoint_at_frame): Rename to ... (insert_hp_step_resume_breakpoint_at_frame): ... this. Adjust to set a high-priority step-resume breakpoint. (insert_step_resume_breakpoint_at_frame): Adjust comment. (insert_step_resume_breakpoint_at_caller): Ditto. gdb/testsuite/ * gdb.reverse/next-reverse-bkpt-over-sr.exp: New test.
* * breakpont.c (remove_hw_watchpoints): Remove unused function.Thiago Jung Bauermann2011-05-241-4/+0
| | | | * breakpoint.h remove_hw_watchpoints(): Remove prototype.
* 2011-05-06 Sergio Durigan Junior <sergiodj@linux.vnet.ibm.com>Thiago Jung Bauermann2011-05-061-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Thiago Jung Bauermann <bauerman@br.ibm.com> Implement support for PowerPC BookE masked watchpoints. gdb/ * NEWS: Mention masked watchpoint support. Create "Changed commands" section. * breakpoint.h (struct breakpoint_ops) <works_in_software_mode>: New method. Initialize to NULL in all existing breakpoint_ops instances. (struct breakpoint) <hw_wp_mask>: New field. * breakpoint.c (is_masked_watchpoint): Add prototype. (update_watchpoint): Don't set b->val for masked watchpoints. Call breakpoint's breakpoint_ops.works_in_software_mode if available. (watchpoints_triggered): Handle the case of a hardware masked watchpoint trigger. (watchpoint_check): Likewise. (works_in_software_mode_watchpoint): New function. (insert_masked_watchpoint, remove_masked_watchpoint) (resources_needed_masked_watchpoint) (works_in_software_mode_masked_watchpoint, print_it_masked_watchpoint) (print_one_detail_masked_watchpoint, print_mention_masked_watchpoint) (print_recreate_masked_watchpoint, is_masked_watchpoint): New functions. (masked_watchpoint_breakpoint_ops): New structure. (watch_command_1): Check for the existence of the `mask' parameter. Set b->ops according to the type of hardware watchpoint being created. * ppc-linux-nat.c (ppc_linux_insert_mask_watchpoint) (ppc_linux_remove_mask_watchpoint) (ppc_linux_masked_watch_num_registers): New functions. (_initialize_ppc_linux_nat): Initialize to_insert_mask_watchpoint, to_remove_mask_watchpoint and to_masked_watch_num_registers. * target.c (update_current_target): Mention to_insert_mask_watchpoint, to_remove_mask_watchpoint, and to_masked_watch_num_registers. (target_insert_mask_watchpoint, target_remove_mask_watchpoint) (target_masked_watch_num_registers): New functions. * target.h (struct target_ops) <to_insert_mask_watchpoint>, <to_remove_mask_watchpoint>, <to_masked_watch_num_registers>: New methods. (target_insert_mask_watchpoint, target_remove_mask_watchpoint) (target_masked_watch_num_registers): Add prototypes. gdb/doc/ * gdb.texinfo (Set Watchpoints): Document mask parameter. (PowerPC Embedded): Mention support of masked watchpoints.
* improve Ada exception catchpoint MI notificationJoel Brobecker2011-04-011-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | This rewrites the code generating the Ada exception catchpoint hit notification for both the GDB/MI case as well as the non-MI case, by using the relevant ui_out_* functions to generate the output. the MI notifications for Ada exception catchpoints now include the stop reason, and the breakpoint "disp", much like other breakpoint events do. It also introduces a new field "exception-name" for exception catchpoints (excluding "failed assertion catchpoints, where we just want to know that it was a failed assertion). gdb/ChangeLog: * breakpoint.h (bpdisp_text): Add declaration. * breakpoint.c (bpdisp_text): Make non-static. * ada-lang.c: #include "mi/mi-common.h". (print_it_exception): Rewrite to improve GDB/MI output. gdb/doc/ChangeLog: * gdb.texinfo (GDB/MI Ada Exception Information): Document the "exception-name" field in the *stopped async record. gdb/testsuite/ChangeLog: * gdb.ada/mi_catch_ex: New testcase.
* 2011-03-31 Thiago Jung Bauermann <bauerman@br.ibm.com>Thiago Jung Bauermann2011-03-311-3/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sergio Durigan Junior <sergiodj@linux.vnet.ibm.com> Implement support for PowerPC BookE ranged breakpoints. gdb/ * NEWS: Mention support for ranged breakpoints on embedded PowerPC. * breakpoint.h (struct bp_target_info) <length>: New member variable. (struct breakpoint_ops) <breakpoint_hit>: Take struct bp_location instead of struct breakpoint as argument, and also add ASPACE and BP_ADDR arguments. Update all callers. (struct breakpoint_ops) <print_one_detail>: New method. (struct breakpoint) <addr_string_range_end>: New member variable. * breakpoint.c (breakpoint_location_address_match): Add function prototype. (insert_bp_location): Set bl->target_info.length. (breakpoint_here_p): Call breakpoint_location_address_match. (moribund_breakpoint_here_p): Likewise. (regular_breakpoint_inserted_here_p): Likewise. (breakpoint_thread_match): Likewise. (bpstat_stop_status): Likewise. (bpstat_check_location): Move call to breakpoint_ops.breakpoint_hit to the top. (print_one_breakpoint_location): Call breakpoint_ops.print_one_detail if available. (breakpoint_address_match_range): New function. (breakpoint_location_address_match): Likewise. (breakpoint_locations_match): Compare the length field of the locations too. (hw_breakpoint_used_count): Count resources used by all locations in a breakpoint, and use breakpoint_ops.resources_needed if available. (breakpoint_hit_ranged_breakpoint): New function. (resources_needed_ranged_breakpoint): Likewise. (print_it_ranged_breakpoint): Likewise. (print_one_ranged_breakpoint): Likewise. (print_one_detail_ranged_breakpoint): Likewise. (print_mention_ranged_breakpoint): Likewise. (print_recreate_ranged_breakpoint): Likewise. (ranged_breakpoint_ops): New structure. (find_breakpoint_range_end): New function. (break_range_command): Likewise. (delete_breakpoint): Free addr_string_range_end. (update_breakpoint_locations): Add SALS_END argument. Update all callers. Calculate breakpoint length if a non-zero SALS_END is given. Call breakpoint_locations_match instead of breakpoint_address_match. (reset_breakpoint): Find SaL of the end of the range if B is a ranged breakpoint. (_initialize_breakpoint): Register break-range command. * defs.h (print_core_address): Add function prototype. * ppc-linux-nat.c (ppc_linux_ranged_break_num_registers): New function. (ppc_linux_insert_hw_breakpoint): Support ranged breakpoints. (ppc_linux_remove_hw_breakpoint): Likewise. (_initialize_ppc_linux_nat): Initialize to_ranged_break_num_registers. * target.c (update_current_target): Add comment about to_ranged_break_num_registers. (target_ranged_break_num_registers): New function. * target.h (struct target_ops) <to_ranged_break_num_registers>: New method. (target_ranged_break_num_registers): Add function prototype. * ui-out.c (ui_out_field_core_addr): Move address-printing logic to ... * utils.c (print_core_address): ... here. gdb/doc/ * gdb.texinfo (PowerPC Embedded): Document ranged breakpoints.
* gdb/Jan Kratochvil2011-03-281-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Support resolution of STT_GNU_IFUNC via breakpoints. * breakpoint.c (print_it_typical): Support bp_gnu_ifunc_resolver and bp_gnu_ifunc_resolver_return. (bpstat_what): Rename parameter to bs_head, new variable bs, adjust the loop. Support bp_gnu_ifunc_resolver and bp_gnu_ifunc_resolver_return. New comment after the loop. New loop for bp_gnu_ifunc_resolver and bp_gnu_ifunc_resolver_return breakpoints. (bptype_string, print_one_breakpoint_location): Support bp_gnu_ifunc_resolver and bp_gnu_ifunc_resolver_return. (user_settable_breakpoint): Return true also for bp_gnu_ifunc_resolver. (allocate_bp_location): Support bp_gnu_ifunc_resolver and bp_gnu_ifunc_resolver_return. (set_breakpoint_location_function): New parameter explicit_loc, describe it. Call find_pc_partial_function_gnu_ifunc with new variable IS_GNU_IFUNC and adjust the address for STT_GNU_IFUNC if EXPLICIT_LOC is not set. (set_raw_breakpoint): Set EXPLICIT_LOC for set_breakpoint_location_function. (clone_momentary_breakpoint): Use true for EXPLICIT_LOC of set_breakpoint_location_function. (mention): Support bp_gnu_ifunc_resolver and bp_gnu_ifunc_resolver_return. (add_location_to_breakpoint): Set EXPLICIT_LOC for set_breakpoint_location_function. (update_breakpoint_locations): Remove static. (breakpoint_re_set_one): Support bp_gnu_ifunc_resolver and bp_gnu_ifunc_resolver_return. * breakpoint.h (enum bptype): New fields bp_gnu_ifunc_resolver and bp_gnu_ifunc_resolver_return. (update_breakpoint_locations): New declaration. * elfread.c: Include gdbthread.h and regcache.h. (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop): New functions. (elf_gnu_ifunc_fns): Install them. * minsyms.c (stub_gnu_ifunc_resolver_stop) (stub_gnu_ifunc_resolver_return_stop): New functions. (stub_gnu_ifunc_fns): Install them. * symtab.h (struct gnu_ifunc_fns): New fields gnu_ifunc_resolver_stop and gnu_ifunc_resolver_return_stop. (gnu_ifunc_resolver_stop, gnu_ifunc_resolver_return_stop): New.
* * linespec.h (struct linespec_result) <special_display>: NewTom Tromey2011-03-241-0/+2
| | | | | | | | | | | field. * breakpoint.h (struct breakpoint) <display_canonical>: New field. * breakpoint.c (print_breakpoint_location): Respect display_canonical. (create_breakpoint_sal): Add 'display_canonical' parameter. (create_breakpoints_sal): Update. (create_breakpoint): Update.
* * tracepoint.c (trace_actions_command): Update.Tom Tromey2011-03-101-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * thread.c (thread_apply_command): Update. * reverse.c (delete_bookmark_command): Update. (bookmarks_info): Update. * printcmd.c (undisplay_command): Update. * memattr.c (mem_enable_command): Update. (mem_disable_command): Update. (mem_delete_command): Update. * inferior.c (detach_inferior_command): Update. (kill_inferior_command): Update. (remove_inferior_command): Update. * cli/cli-utils.h (struct get_number_or_range_state): New. (init_number_or_range): Declare. (get_number_or_range): Update. * cli/cli-utils.c (init_number_or_range): New function. (get_number_or_range): Change 'pp' parameter to 'state'. Remove static variables. (number_is_in_list): Update. * breakpoint.h (get_tracepoint_by_number): Update. * breakpoint.c (map_breakpoint_numbers): Update for change to get_number_or_range. (find_location_by_number): Use get_number, not get_number_or_range. (trace_pass_set_count): New function. (trace_pass_command): Update for change to get_number_or_range. Rework loop logic. (get_tracepoint_by_number): Remove 'multi_p' parameter; add 'state' parameter.
* * reverse.c: Include cli-utils.h.Tom Tromey2011-02-211-4/+0
| | | | | | | | | | | | | | | | | | | | | | | * printcmd.c: Include cli-utils.h. (string_printf): Use skip_spaces. * cli/cli-utils.h: New file. * cli/cli-utils.c: New file. * cli/cli-dump.h (skip_spaces): Move to cli-utils.h. * cli/cli-dump.c (skip_spaces): Move to cli-utils.c. * breakpoint.h (get_number, get_number_or_range): Move to cli-utils.h. * breakpoint.c: Include cli-utils.h. (get_number_trailer, get_number, get_number_or_range) (ep_skip_leading_whitespace): Move to cli-utils.c. (create_breakpoint_sal, find_condition_and_thread) (decode_static_tracepoint_spec, watch_command_1) (watch_maybe_just_location, ep_parse_optional_if_clause) (catch_fork_command_1, catch_exec_command_1) (catch_syscall_command_1): Use skip_spaces, skip_to_space. * Makefile.in (SUBDIR_CLI_OBS): Add cli-utils.o. (SUBDIR_CLI_SRCS): Add cli-utils.c. (HFILES_NO_SRCDIR): Add cli-utils.h. (cli-utils.o): New target.
* * breakpoint.c (get_number_trailer): No longer accept a NULL PP.Pedro Alves2011-02-181-0/+2
| | | | | | | | * breakpoint.h (get_number_or_range): Declare. * printcmd.c (ALL_DISPLAYS): Declare. (delete_display): Reimplement taking a display pointer. (undisplay_command): Accept a range of displays to delete, using get_number_or_range.
* Fix some typos.Thiago Jung Bauermann2011-02-041-2/+2
| | | | | | | | | | * breakpoint.c (update_watchpoint): Fix name of the update_global_location_list function. (print_one_breakpoint): Fix typo. (_initialize_breakpoint): Remove extra space in hbreak help string. * breakpoint.h (struct bp_location) <length>: Fix field description.
* 2011-01-31 Paul Pluzhnikov <ppluzhnikov@google.com>Paul Pluzhnikov2011-01-311-0/+2
| | | | | | | | | | | | | | | | | | | | | | | * breakpoint.h (remove_jit_event_breakpoints): New prototype. * breakpoint.c (remove_jit_event_breakpoints): New function. * jit.c (jit_descriptor_addr): Delete. (registering_code): Delete. (clear_int): Delete. (jit_inferior_data): New variable. (struct jit_inferior_data): New type. (get_jit_inferior_data): New function. (jit_inferior_data_cleanup): New function. (jit_read_descriptor): Adjust. (jit_register_code): Adjust. (jit_breakpoint_re_set_internal): New function; move code here ... (jit_inferior_init): ... from here. (jit_breakpoint_re_set): Adjust. (jit_reset_inferior_data_and_breakpoints): New function. (jit_inferior_created_observer): Adjust. (jit_inferior_exit_hook): Adjust. (jit_executable_changed_observer): New function. (jit_event_handler): Adjust. (_initialize_jit): Adjust.
* * infcmd.c (finish_backward): Use breakpoint_set_silent.Tom Tromey2011-01-311-3/+6
| | | | | | | | | | | | | | * python/py-breakpoint.c (bppy_set_silent): Use breakpoint_set_silent. (bppy_set_thread): Use breakpoint_set_thread. (bppy_set_task): Use breakpoint_set_task. * breakpoint.h (breakpoint_set_silent, breakpoint_set_thread) (breakpoint_set_task): Declare. (make_breakpoint_silent): Remove. * breakpoint.c (breakpoint_set_silent): New function. (breakpoint_set_thread): Likewise. (breakpoint_set_task): Likewise. (make_breakpoint_silent): Remove.
* * breakpoint.h (user_breakpoint_p): Declare.Tom Tromey2011-01-311-0/+2
| | | | | | * breakpoint.c (user_breakpoint_p): New function. (breakpoint_1): Use it. (save_breakpoints): Likewise.
* 2011-01-11 Sergio Durigan Junior <sergiodj@linux.vnet.ibm.com>Thiago Jung Bauermann2011-01-111-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Thiago Jung Bauermann <bauerman@br.ibm.com> Implement support for PowerPC BookE ranged watchpoints. gdb/ * breakpoint.h (struct breakpoint_ops) <resources_needed>: New method. Initialize to NULL in all existing breakpoint_ops instances. (struct breakpoint) <exact>: New field. (target_exact_watchpoints): Declare external global. * breakpoint.c (target_exact_watchpoints): New global flag. (update_watchpoint): Set b->type to bp_hardware_watchpoint and b->enable_state to bp_enabled before calling hw_watchpoint_used_count. (hw_watchpoint_used_count): Iterate over all bp_locations in a watchpoint. Call breakpoint's breakpoint_ops.resources_needed if available. (insert_watchpoint, remove_watchpoint): Use fixed length of 1 byte if the watchpoint is exact. (resources_needed_watchpoint): New function. (watchpoint_breakpoint_ops): Add resources_needed_watchpoint. (watch_command_1): Set b->exact if the user asked for an exact watchpoint and one can be set. (can_use_hardware_watchpoint): Add exact_watchpoints argument. Pass fixed length of 1 to target_region_ok_for_hw_watchpoint if the user asks for an exact watchpoint and one can be set. Return number of needed debug registers to watch the expression. * gdbtypes.c (is_scalar_type): New function, based on valprint.c:scalar_type_p. (is_scalar_type_recursive): New function. * gdbtypes.h (is_scalar_type_recursive): Declare. * ppc-linux-nat.c (ppc_linux_region_ok_for_hw_watchpoint): Always handle regions when ranged watchpoints are available. (create_watchpoint_request): New function. (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint): Use create_watchpoint_request. * rs6000-tdep.c (show_powerpc_exact_watchpoints): New function. (_initialize_rs6000_tdep): Add `exact-watchpoints' boolean to the `set powerpc' and `show powerpc' commands. * target.h (struct target_ops) <to_region_ok_for_hw_watchpoint>: Mention documentation comment in the target macro. (target_region_ok_for_hw_watchpoint): Document return value. gdb/doc/ * gdb.texinfo (PowerPC Embedded): Document ranged watchpoints and the "set powerpc exact-watchpoints" flag.
* 2010-01-11 Thiago Jung Bauermann <bauerman@br.ibm.com>Thiago Jung Bauermann2011-01-111-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert hardware watchpoints to use breakpoint_ops. gdb/ * breakpoint.h (breakpoint_ops) <insert>: Rename to... <insert_location>: ... this. Return int instead of void. Accept pointer to struct bp_location instead of pointer to struct breakpoint. Adapt all implementations. (breakpoint_ops) <remove>: Rename to... <remove_location>: ... this. Accept pointer to struct bp_location instead of pointer to struct breakpoint. Adapt all implementations. * breakpoint.c (insert_catchpoint): Delete function. (insert_bp_location): Call the watchpoint or catchpoint's breakpoint_ops.insert method. (remove_breakpoint_1): Call the watchpoint or catchpoint's breakpoint_ops.remove method. (insert_watchpoint, remove_watchpoint): New functions. (watchpoint_breakpoint_ops): New structure. (watch_command_1): Initialize the OPS field. * inf-child.c (inf_child_insert_fork_catchpoint) (inf_child_remove_fork_catchpoint, inf_child_insert_vfork_catchpoint) (inf_child_remove_vfork_catchpoint, inf_child_insert_exec_catchpoint) (inf_child_remove_exec_catchpoint, inf_child_set_syscall_catchpoint): Delete functions. (inf_child_target): Remove initialization of to_insert_fork_catchpoint, to_remove_fork_catchpoint, to_insert_vfork_catchpoint, to_remove_vfork_catchpoint, to_insert_exec_catchpoint, to_remove_exec_catchpoint and to_set_syscall_catchpoint. * target.c (update_current_target): Change default implementation of to_insert_fork_catchpoint, to_remove_fork_catchpoint, to_insert_vfork_catchpoint, to_remove_vfork_catchpoint, to_insert_exec_catchpoint, to_remove_exec_catchpoint and to_set_syscall_catchpoint to return_one. (debug_to_insert_fork_catchpoint, debug_to_insert_vfork_catchpoint) (debug_to_insert_exec_catchpoint): Report return value. * target.h (to_insert_fork_catchpoint, to_insert_vfork_catchpoint) (to_insert_exec_catchpoint): Change declaration to return int instead of void. gdb/testsuite/ * gdb.base/foll-exec.exp: Adapt to new error string when the catchpoint type is not supported. * gdb.base/foll-fork.exp: Likewise. * gdb.base/foll-vfork.exp: Likewise.
* run copyright.sh for 2011.Joel Brobecker2011-01-011-1/+2
|
* 2010-12-31 Michael Snyder <msnyder@vmware.com>Michael Snyder2010-12-311-110/+139
| | | | | | | | | | | | | * annotate.c: Comment cleanup, shorten long lines. * arch-utils.c: Ditto. * arch-utils.h: Ditto. * auxv.c: Ditto. * auxv.h: Ditto. * ax-gdb.c: Ditto. * ax-gdb.h: Ditto. * ax-general.c: Ditto. * breakpoint.h: Ditto. * buildsym.h: Ditto.
* gdbTom Tromey2010-12-091-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR c++/9593: * thread.c (clear_thread_inferior_resources): Call delete_longjmp_breakpoint. * infrun.c (handle_inferior_event): Handle exception breakpoints. (handle_inferior_event): Likewise. (insert_exception_resume_breakpoint): New function. (check_exception_resume): Likewise. * inferior.h (delete_longjmp_breakpoint_cleanup): Declare. * infcmd.c (delete_longjmp_breakpoint_cleanup): No longer static. (step_1): Set thread's initiating frame. (until_next_continuation): New function. (until_next_command): Support exception breakpoints. (finish_command_continuation): Delete longjmp breakpoint. (finish_forward): Support exception breakpoints. * gdbthread.h (struct thread_info) <initiating_frame>: New field. * breakpoint.h (enum bptype) <bp_exception, bp_exception_resume, bp_exception_master>: New constants. (struct bpstat_what) <is_longjmp>: New field. (set_longjmp_breakpoint): Update. * breakpoint.c (create_exception_master_breakpoint): New function. (update_breakpoints_after_exec): Handle bp_exception_master. Call create_exception_master_breakpoint. (print_it_typical): Handle bp_exception_master, bp_exception. (bpstat_stop_status): Handle bp_exception_master. (bpstat_what): Handle bp_exception_master, bp_exception, bp_exception_resume. (bptype_string): Likewise. (print_one_breakpoint_location): Likewise. (allocate_bp_location): Likewise. (set_longjmp_breakpoint): Handle exception breakpoints. Change interface. (delete_longjmp_breakpoint): Handle exception breakpoints. (mention): Likewise. (struct until_break_command_continuation_args) <thread_num>: New field. (until_break_command_continuation): Call delete_longjmp_breakpoint. (until_break_command): Support exception breakpoints. (delete_command): Likewise. (breakpoint_re_set_one): Likewise. (breakpoint_re_set): Likewise. gdb/testuite * gdb.java/jnpe.java: New file. * gdb.java/jnpe.exp: New file. * gdb.cp/nextoverthrow.exp: New file. * gdb.cp/nextoverthrow.cc: New file.
* * breakpoint.h: No longer include python.h or python-internal.h.Pedro Alves2010-11-251-6/+2
| | | | | | | | | | (struct breakpoint_object): Forward declare. * defs.h (PyObject) [!HAVE_PYTHON]: Don't define. * varobj.c (PyObject) [!HAVE_PYTHON]: Define. * python/py-breakpoint.c (build_bp_list): Cast py_bp_object to PyObject pointer. (gdbpy_breakpoint_created): Remove casts around py_bp_object accesses.
* 2010-11-11 Phil Muldoon <pmuldoon@redhat.com>pmuldoon2010-11-111-5/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * python/py-breakpoint.c (BPPY_REQUIRE_VALID): Check if bp is NULL. (BPPY_SET_REQUIRE_VALID): Ditto. (bpnum_is_valid): Delete function. (bppy_get_visibility): New function. (bppy_new): Parse for, and validate internal keyword. Pass internal keyword to breakpoint or watchpoint functions. (build_bp_list): New function. (gdbpy_breakpoints): Rewrite. Use build_bp_list and iterate_over_breakpoints. (gdbpy_breakpoint_created): Rewrite. Do not store breakpoints in a look-aside vector. (gdbpy_breakpoint_deleted): Rewrite, defer breakpoint management to internal breakpoint chain. * breakpoint.c (set_breakpoint_number): New function. (breakpoint_1): Check if breakpoint number is more than zero. (set_raw_breakpoint_without_location): Set py_bp_object to NULL. (create_breakpoint_sal): Take a new parameter called internal. Call set_breakpoint_number with internal parameter. Do not mention internal breakpoints. All callers updated. (create_breakpoint): Ditto. (create_breakpoints_sal): Ditto. (watch_command_1): Ditto. (watch_command_wrapper): Take a new parameter called internal. All callers updated. (rwatch_command_wrapper): Ditto. (awatch_command_wrapper): Ditto. (save_breakpoints): Update breakpoint save condition check. (iterate_over_breakpoints): New function. * breakpoint.h: Add conditional python includes. Add py_bp_object and comment to struct breakpoint. Update all callers. * defs.h: Add PyObject definition for GDB builds without Python. 2010-11-11 Phil Muldoon <pmuldoon@redhat.com> * gdb.texinfo (Breakpoints In Python): Document "internal" parameter, and visible attribute. 2010-11-11 Phil Muldoon <pmuldoon@redhat.com> * gdb.python/py-breakpoint.exp: Add internal watchpoint and breakpoint tests.
* gdb/Pedro Alves2010-08-171-11/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2010-08-17 Pedro Alves <pedro@codesourcery.com> PR breakpoints/11371 * breakpoint.c (breakpoint_init_inferior): Decrement the location's reference count instead of deleting right away. (bpstat_free): Decrement the location's reference count. Make static. (bpstat_copy): Increment the location's reference count. (bpstat_find_breakpoint): Adjust. (bpstat_num): Adjust. (print_it_typical): Adjust. Use the breakpoint pointer in the bpstat instead of the location's owner. (bpstat_alloc): Remove const qualifier from the 'bl' parameter. Adjust to record the location's owner in the bpstat. (watchpoint_check): Use the breakpoint pointer in the bpstat instead of the location's owner. (bpstat_check_breakpoint_conditions): Don't handle bp_watchpoint_scope here. Use the breakpoint pointer in the bpstat instead of the location's owner. (bpstat_stop_status): Defer inferior function calls to after building the bpstat list. Handle bp_watchpoint_scope here. Use the breakpoint pointer in the bpstat instead of the location's owner. (bpstat_what): Use the breakpoint pointer in the bpstat instead of the location's owner. (free_bp_location): Don't walk bpstats clearing locations. (incref_bp_location): New. (decref_bp_location): New. (breakpoint_auto_delete): Use the breakpoint pointer in the bpstat instead of the location's owner. (update_global_location_list): Clear the location's owner, and decrement the location's reference count instead of deleting it right away. (breakpoint_retire_moribund): Decrement the location's reference count instead of deleting it right away. (bpstat_remove_bp_location): Delete. (bpstat_remove_breakpoint): New. (bpstat_remove_bp_location_callback): Delete. (bpstat_remove_breakpoint_callback): New. (delete_breakpoint): Iterate over all threads' stop_bpstat's clearing references to the breakpoint that is being deleted. * breakpoint.h (struct bp_location) <refc>: New field. <owner>: Update comments. (bpstat_free): Delete declaration. (struct bpstats): Change the type of the breakpoint_at field to struct breakpoint point, from struct bp_location pointer. Add new field bp_location_at. gdb/testsuite/ 2010-08-17 Jan Kratochvil <jan.kratochvil@redhat.com> Pedro Alves <pedro@codesourcery.com> PR breakpoints/11371 * gdb.base/watch-cond-infcall.exp: New file. * gdb.base/watch-cond-infcall.c: New file.
* gdb/Jan Kratochvil2010-08-161-1/+4
| | | | | | | | | * breakpoint.c (update_watchpoint): Add source empty line. Prefer EXP_STRING_REPARSE to EXP_STRING. (watch_command_1): Set also EXP_STRING_REPARSE. (delete_breakpoint): Free also EXP_STRING_REPARSE. * breakpoint.h (struct breakpoint): New field exp_string_reparse. Update comment for exp_string.
* 2010-07-19 Hui Zhu <teawater@gmail.com>Hui Zhu2010-07-191-0/+1
| | | | | | | | | * breakpoint.c (single_step_breakpoints_inserted): New function. * breakpoint.h (single_step_breakpoints_inserted): Extern. * infrun.c (maybe_software_singlestep): Add check code. * record.c (record_resume): Add code for software single step. (record_wait): Ditto.
* Static tracepoints support, and UST integration.Pedro Alves2010-07-011-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gdb/gdbserver/ * configure.ac: Handle --with-ust. substitute ustlibs and ustinc. * mem-break.c (uninsert_all_breakpoints) (reinsert_all_breakpoints): New. * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints): * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New. (gdb_agent_ust_loaded, helper_thread_id) (gdb_agent_helper_thread_id): New macros. (struct ipa_sym_addresses): Add addr_ust_loaded, addr_helper_thread_id, addr_cmd_buf. (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf. (in_process_agent_loaded_ust): New. (write_e_ust_not_loaded): New. (maybe_write_ipa_ust_not_loaded): New. (struct collect_static_trace_data_action): New. (enum tracepoint_type) <static_tracepoint>: New. (struct tracepoint) <handle>: Mention static tracepoints. (struct static_tracepoint_ctx): New. (CMD_BUF_SIZE): New. (add_tracepoint_action): Handle static tracepoint actions. (unprobe_marker_at): New. (clear_installed_tracepoints): Handle static tracepoints. (cmd_qtdp): Handle static tracepoints. (probe_marker_at): New. (cmd_qtstart): Handle static tracepoints. (response_tracepoint): Handle static tracepoints. (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New. (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat. (get_context_regcache): Handle static tracepoints. (do_action_at_tracepoint): Handle static tracepoint actions. (traceframe_find_block_type): Handle static trace data blocks. (traceframe_read_sdata): New. (download_tracepoints): Download static tracepoint actions. [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h. (GDB_PROBE_NAME): New. (ust_ops): New. (GET_UST_SYM): New. (USTF): New. (dlsym_ust): New. (ust_marker_to_static_tracepoint): New. (gdb_probe): New. (collect_ust_data_at_tracepoint): New. (gdb_ust_probe): New. (UNIX_PATH_MAX, SOCK_DIR): New. (gdb_ust_connect_sync_socket): New. (resume_thread, stop_thread): New. (run_inferior_command): New. (init_named_socket): New. (gdb_ust_socket_init): New. (cstr_to_hexstr): New. (next_st): New. (first_marker, next_marker): New. (response_ust_marker): New. (cmd_qtfstm, cmd_qtsstm): New. (unprobe_marker_at, probe_marker_at): New. (cmd_qtstmat, gdb_ust_thread): New. (gdb_ust_init): New. (initialize_tracepoint_ftlib): Call gdb_ust_init. * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h (ST_REGENTRY): New. (x86_64_st_collect_regmap): New. (X86_64_NUM_ST_COLLECT_GREGS): New. (AMD64_RIP_REGNUM): New. (supply_static_tracepoint_registers): New. * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h (ST_REGENTRY): New. (i386_st_collect_regmap): New. (i386_NUM_ST_COLLECT_GREGS): New. (supply_static_tracepoint_registers): New. * server.c (handle_query): Handle qXfer:statictrace:read. <qSupported>: Report support for StaticTracepoints, and qXfer:statictrace:read features. * server.h (traceframe_read_sdata) (supply_static_tracepoint_registers): Declare. * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex) (unpack_varlen_hex): Include in IPA build. * Makefile.in (ustlibs, ustinc): New. (IPA_OBJS): Add remote-utils-ipa.o. ($(IPA_LIB)): Link -ldl and -lpthread. (UST_CFLAGS): New. (IPAGENT_CFLAGS): Add UST_CFLAGS. * config.in, configure: Regenerate. gdb/ * NEWS: Mention new support for static tracepoints. (New packets): Mention qTfSTM, qTsSTM, qTSTMat and qXfer:statictrace:read. (New features in the GDB remote stub, GDBserver): Mention static tracepoints support using an UST based backend. (New commands): Mention "info static-tracepoint-markers" and "strace". * breakpoint.c (is_marker_spec): New. (is_tracepoint): Handle static tracepoints. (validate_commands_for_breakpoint): Static tracepoints can't do while-stepping. (static_tracepoints_here): New. (bpstat_what): Handle static tracepoints. (print_one_breakpoint_location, allocate_bp_location, mention): Ditto. (create_breakpoint_sal): Ditto. (decode_static_tracepoint_spec): New. (create_breakpoint): Replace `hardwareflag', and `traceflag' with `type_wanted'. Adjust. Handle static tracepoint marker locations. (break_command_1): Adjust. (update_static_tracepoint): New. (update_breakpoint_locations): Handle static tracepoints. (breakpoint_re_set_one): Handle static tracepoint marker locations. (disable_command, enable_command): Handle static tracepoints. (trace_command, ftrace_command): Adjust. (strace_command): New. (create_tracepoint_from_upload): Adjust. (save_breakpoints): Handle static tracepoints. (_initialize_breakpoint): Install the "strace" command. * breakpoint.h (enum bptype): New bp_static_tracepoint type. (struct breakpoint): New fields static_trace_marker_id and static_trace_marker_id_idx. (breakpoints_here_p): Declare. (create_breakpoint): Adjust. (static_tracepoints_here): Declare. * remote.c (struct remote_state) <static_tracepoints>: New field. (PACKET_qXfer_statictrace_read, PACKET_StaticTracepoints): New. (remote_static_tracepoint_marker_at): New. (remote_static_tracepoint_markers_by_strid): New. (remote_static_tracepoint_feature): New. (remote_disconnected_tracing_feature): Handle "StaticTracepoints". (remote_xfer_partial): Handle TARGET_OBJECT_STATIC_TRACE_DATA. (remote_supports_static_tracepoints): New. (remote_download_tracepoint): Download static tracepoints. (init_remote_ops): Install remote_static_tracepoint_marker_at and remote_static_tracepoint_markers_by_strid. (_initialize_remote): Install set|show remote static-tracepoints, and set|show remote read-sdata-object commands. * target.c (update_current_target): Inherit and default to_static_tracepoint_marker_at, and to_static_tracepoint_markers_by_strid. * target.h (static_tracepoint_marker): Forward declare. (enum target_object): New object TARGET_OBJECT_STATIC_TRACE_DATA. (static_tracepoint_marker_p): New typedef. (DEF_VEC_P(static_tracepoint_marker_p)): New VEC type. (struct target_ops): New fields to_static_tracepoint_marker_at and to_static_tracepoint_markers_by_strid. (target_static_tracepoint_marker_at) (target_static_tracepoint_markers_by_strid): New. * tracepoint.c: Include source.h. (validate_actionline): Handle $_sdata. (struct collection_list): New field strace_data. (add_static_trace_data): New. (clear_collection_list): Clear strace_data. (stringify_collection_list): Account for a possible static trace data collection. (encode_actions_1): Encode an $_sdata collection. (parse_tracepoint_definition): Handle static tracepoints. (parse_static_tracepoint_marker_definition): New. (release_static_tracepoint_marker): New. (print_one_static_tracepoint_marker): New. (info_static_tracepoint_markers_command): New. (sdata_make_value): New. (_initialize_tracepoint): Create the $_sdata convenience variable. Add the "info static-tracepoint-markers" command. Mention $_sdata in the "collect" command's help output. * tracepoint.h (struct static_tracepoint_marker): New. (parse_static_tracepoint_marker_definition) (release_static_tracepoint_marker): Declare. * mi/mi-cmd-break.c (mi_cmd_break_insert): Adjust. * python/py-breakpoint.c (bppy_new): Adjust. doc/ * gdb.texinfo (Convenience Variables): Document $_sdata. (Commands to Set Tracepoints): Describe static tracepoints. Add `Listing Static Tracepoint Markers' menu entry. Document "strace". (Tracepoint Action Lists): Document collecting $_sdata. (Listing Static Tracepoint Markers): New subsection. (Tracepoints support in gdbserver): Mention static tracepoints. (remote packets, enabling and disabling): Mention read-sdata-object. (General Query Packets) <qSupported>: Document qXfer:sdata:read and StaticTracepoint. Mention qTfSTM, qTsSTM and qTSTMat as tracepoint packets. Document qXfer:sdata:read. (Tracepoint packets): Document qTfSTM, qTsSTM and qTSTMat.
* gdb/Jan Kratochvil2010-06-241-22/+25
| | | | | | | | | | | | | | | | | | | | | | | Fix PR 9436. * breakpoint.c (handle_jit_event): New function. (bpstat_what): Remove enum class, kc, ss, sn, sgl, slr, clr, sr, shl, jit, err, table and bs_class. New variables shlib_event, jit_event, this_action and bptype. Change bs_class assignments to this_action assignments. new unhandled bptype internal error. Move here shlib_event and jit_event handling from handle_inferior_event. * breakpoint.h (enum bpstat_what_main_action): Extend the comment. Reorder items. Remove BPSTAT_WHAT_CHECK_SHLIBS and BPSTAT_WHAT_CHECK_JIT. * inferior.h (debug_infrun, stop_on_solib_events): New declarations. * infrun.c (debug_infrun, stop_on_solib_events): Remove static. (handle_inferior_event): Reinitialize frame and gdbarch after bpstat_what call. Move BPSTAT_WHAT_CHECK_SHLIBS and BPSTAT_WHAT_CHECK_JIT handling to bpstat_what. Reinitialize even gdbarch when frame gets reinitialized. gdb/testsuite/ Test PR 9436. * gdb.base/nostdlib.exp, gdb.base/nostdlib.c: New.
* ChangeLog:Ulrich Weigand2010-06-231-0/+1
| | | | | | | | | | | | | | | | | | | | * infrun.c (handle_inferior_event): Handle presence of single-step breakpoints for TARGET_WAITKIND_FORKED and TARGET_WAITKIND_VFORKED. Cancel single-step breakpoints for TARGET_WAITKIND_EXITED, TARGET_WAITKIND_SIGNALED, and TARGET_WAITKIND_EXECD. * breakpoint.c (detach_single_step_breakpoints): New function. (detach_breakpoints): Call it. (cancel_single_step_breakpoints): New function. * breakpoint.h (cancel_single_step_breakpoints): Add prototype. * spu-tdep.c (spu_memory_remove_breakpoint): New function. (spu_gdbarch_init): Install it. testsuite/ChangeLog: * gdb.cell/fork.exp: New file. * gdb.cell/fork.c: Likewise. * gdb.cell/fork-spu.c: Likewise.
* gdb/Jan Kratochvil2010-06-071-1/+2
| | | | * breakpoint.h (owner): Extend the comment.
* PR breakpoints/8554.Pedro Alves2010-04-191-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement `save-breakpoints'. gdb/ * breakpoint.c (save_cmdlist): New. (breakpoint_set_cmdlist, breakpoint_show_cmdlist): Moved up close to save_cmdlist. (print_recreate_catch_fork): New. (catch_fork_breakpoint_ops): Install it. (print_recreate_catch_vfork): New. (catch_vfork_breakpoint_ops): Install it. (print_recreate_catch_syscall): New. (catch_syscall_breakpoint_ops): Install it. (print_recreate_catch_exec): New. (catch_exec_breakpoint_ops): Install it. (print_recreate_exception_catchpoint): New. (gnu_v3_exception_catchpoint_ops): Install it. (save_breakpoints): New, based on tracepoint_save_command, but handle all breakpoint types. (save_breakpoints_command): New. (tracepoint_save_command): Rename to... (save_tracepoints_command): ... this, and reimplement using save_breakpoints. (save_command): New. (_initialize_breakpoints): Install the "save" command prefix. Install the "save breakpoints" command. Make "save-tracepoints" a deprecated alias for "save tracepoints". * breakpoint.h (struct breakpoint_ops): New field `print_recreate'. * ada-lang.c (print_recreate_exception): New. (print_recreate_catch_exception): New. (catch_exception_breakpoint_ops): Install it. (print_recreate_catch_exception_unhandled): New. (catch_exception_unhandled_breakpoint_ops): Install it. (print_recreate_catch_assert): New. (catch_assert_breakpoint_ops): Install it. * NEWS: Mention the new `save breakpoints' command. Mention the new `save tracepoints' alias and that `save-tracepoints' is now deprecated. gdb/doc/ * gdb.texinfo (Save Breakpoints): New node. (save-tracepoints): Rename to ... (save tracepoints): ... this. Mention that `save-tracepoints' is a deprecated alias to `save tracepoints'. gdb/testsuite/ * gdb.trace/save-trace.exp: Adjust.
* 2010-04-09 Phil Muldoon <pmuldoon@redhat.com>pmuldoon2010-04-091-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Thiago Jung Bauermann <bauerman@br.ibm.com> Tom Tromey <tromey@redhat.com> * breakpoint.c (condition_command): Simplify. Move condition setting code to ... (set_breakpoint_condition): ... here. New function. * breakpoint.h (set_breakpoint_condition): Declare. * Makefile.in (SUBDIR_PYTHON_OBS): Add py-breakpoint. (SUBDIR_PYTHON_SRCS): Likewise. (py-breakpoint.o): New rule. * python/py-breakpoint.c: New file. * python/python-internal.h (gdbpy_breakpoints) (gdbpy_initialize_breakpoints): Declare. (GDB_PY_SET_HANDLE_EXCEPTION) Define. 2010-04-09 Phil Muldoon <pmuldoon@redhat.com> * gdb.python/py-breakpoint.exp: New File. * gdb.python/py-breakpoint.C: Ditto. 2010-04-09 Phil Muldoon <pmuldoon@redhat.com> Thiago Jung Bauermann <bauerman@br.ibm.com> Tom Tromey <tromey@redhat.com> * gdb.texinfo (Breakpoints In Python): New Node.
* 2010-04-04 Stan Shebs <stan@codesourcery.com>Stan Shebs2010-04-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Nathan Sidwell <nathan@codesourcery.com> * breakpoint.c (breakpoint_1): Add filter argument, return number of breakpoints printed. (is_hardware_watchpoint): Make argument const. (is_watchpoint): Ditto. (is_tracepoint): Merge of tracepoint_type and breakpoint_is_tracepoint, use it everywhere. (breakpoints_info): Pass NULL to breakpoint_1. (maintenance_info_breakpoints): Ditto. (watchpoints_info): New function. (tracepoints_info): Use breakpoint_1 filter. (set_ignore_count): Warn that tracepoint ignore count will be ignored. (_initialize_breakpoint): Make "info watchpoints" its own command. * breakpoint.h (is_tracepoint): Rename from breakpoint_is_tracepoint. * mi/mi-cmd-break.c (mi_cmd_break_commands): Use is_tracepoint. * gdb.texinfo (Setting Breakpoints): "info watch" no longer a synonym. (Setting Watchpoints): Update description of "info watch". (Disabling Breakpoints): Only "info break" lists all. * gdb.base/completion.exp: Update for new "info watchpoints". * gdb.base/default.exp: Ditto. * gdb.base/help.exp: Ditto. * gdb.base/watchpoint.exp: Ditto. * gdb.trace/infotrace.exp: Update "info tracpoints" output.
* gdb/Jan Kratochvil2010-04-041-11/+0
| | | | | * breakpoint.c (bpstat_find_step_resume_breakpoint): Remove. * breakpoint.h (bpstat_find_step_resume_breakpoint): Remove.
* * breakpoint.h (struct counted_command_line): Moved definition toPedro Alves2010-04-021-9/+7
| | | | | | | | | breakpoint.c, and forward declare. (breakpoint_commands): Declare. * breakpoint.c (struct counted_command_line): Moved here. (breakpoint_commands): New. * tracepoint.c (encode_actions): Use breakpoint_commands. * remote.c (remote_download_tracepoint): Ditto.
* PR gdb/11327, PR gdb/11328, PR breakpoints/11368:Tom Tromey2010-03-251-1/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * infrun.c (handle_inferior_event): Change initialization of stop_stack_dummy. (handle_inferior_event): Change assignment to stop_stack_dummy. (normal_stop): Update use of stop_stack_dummy. (struct inferior_status) <stop_stack_dummy>: Change type. * inferior.h (stop_stack_dummy): Update. * infcmd.c (stop_stack_dummy): Change type. * infcall.c (cleanup_delete_std_terminate_breakpoint): New function. (call_function_by_hand): Call set_std_terminate_breakpoint. Rewrite std::terminate handling. * breakpoint.h (enum bptype) <bp_std_terminate, bp_std_terminate_master>: New. (enum stop_stack_kind): New. (struct bpstat_what) <call_dummy>: Change type. (set_std_terminate_breakpoint, delete_std_terminate_breakpoint): Declare. * breakpoint.c (create_std_terminate_master_breakpoint): New function. (update_breakpoints_after_exec): Handle bp_std_terminate_master. Call create_std_terminate_master_breakpoint. (print_it_typical): Handle new breakpoint kinds. (bpstat_stop_status): Handle bp_std_terminate_master. (bpstat_what): Correctly set call_dummy field. Handle bp_std_terminate_master and bp_std_terminate. (print_one_breakpoint_location): Update. (allocate_bp_location): Update. (set_std_terminate_breakpoint): New function. (delete_std_terminate_breakpoint): Likewise. (create_thread_event_breakpoint): Update. (delete_command): Update. (breakpoint_re_set_one): Update. (breakpoint_re_set): Call create_std_terminate_master_breakpoint.
* gdbTom Tromey2010-03-241-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR breakpoints/9352: * NEWS: Mention changes to `commands' and `rbreak'. * symtab.c (do_end_rbreak_breakpoints): New function. (rbreak_command): Call start_rbreak_breakpoints; arrange to call end_rbreak_breakpoints. * breakpoint.c (breakpoint_count, tracepoint_count): Now static. (set_breakpoint_count): Likewise. Clear last_was_multi. (multi_start, multi_end, last_was_multi): New globals. (start_rbreak_breakpoints, end_rbreak_breakpoints): New functions. (struct commands_info): New (do_map_commands_command): New function. (commands_command_1): New function. (commands_command): Use it. (commands_from_control_command): Likewise. (do_delete_breakpoint): New function. (delete_command): Use it. (map_breakpoint_numbers): Add 'data' argument. Pass to callback. (do_map_disable_breakpoint): New function. (disable_command): Use it. (do_map_enable_breakpoint): New function. (enable_command): Use it. (enable_once_breakpoint): Add argument. (enable_once_command): Update. (enable_delete_breakpoint): Add argument. (enable_delete_command): Update. (break_command_really): Set last_was_multi when needed. (check_tracepoint_command): Fix formatting. (validate_commands_for_breakpoint): New function. (breakpoint_set_commands): Use it. (tracepoint_save_command): Update. * breakpoint.h (start_rbreak_breakpoints, end_rbreak_breakpoints): Declare. gdb/doc PR breakpoints/9352: * gdb.texinfo (Break Commands): Update. gdb/testsuite PR breakpoints/9352: * gdb.base/default.exp: Update. * gdb.base/commands.exp: Update. * gdb.cp/extern-c.exp: Test setting commands on multiple breakpoints at once.
* * breakpoint.h (struct counted_command_line): New struct.Tom Tromey2010-03-241-3/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | (struct breakpoint) <commands>: Change type. (struct bpstats) <commands>: Change type. <commands_left>: New field. * breakpoint.c (alloc_counted_command_line): New function. (incref_counted_command_line): Likewise. (decref_counted_command_line): Likewise. (do_cleanup_counted_command_line): Likewise. (make_cleanup_decref_counted_command_line): Likewise. (breakpoint_set_commands): Use decref_counted_command_line and alloc_counted_command_line. (commands_command): Don't error if breakpoint commands are executing. (commands_from_control_command): Likewise. (bpstat_free): Update. (bpstat_copy): Likewise. (bpstat_clear_actions): Likewise. (bpstat_do_actions_1): Likewise. (bpstat_stop_status): Likewise. (print_one_breakpoint_location): Likewise. (delete_breakpoint): Likewise. (bpstat_alloc): Initialize new field. (tracepoint_save_command): Update. * tracepoint.c (encode_actions): Update. (trace_dump_command): Update.
* Unify actions and commandsVladimir Prus2010-03-231-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * defs.h (read_command_lines, read_command_lines_1): New parameters validator and closure. * tracepoint.h (struct action_line): Remove. * breakpoint.h (struct breakpoint): Remove the 'actions' field. * defs.h (enum command_control_type): New value while_stepping_control. (struct command_line): Add comments. * breakpoint.c (breakoint_is_tracepoint): New. (breakpoint_set_commands): For tracepoints, verify the commands are permissible. (check_tracepoint_commands): New. (commands_command): Require that each new line is validated using check_tracepoint_command, if we set commands for a tracepoint. (create_tracepoint_from_upload): Likewise. (print_one_breakpoint_location): Remove the code to print actions specifically. (tracepoint_save_command): Relay to print_command_lines. * cli/cli-script.c (process_next_line): New parameters validator and closure. Handle 'while-stepping'. Call validator if not null. (read_command_lines, read_command_lines1): Likewise. (recurse_read_control_structure): New parameters validator and closure. Handle while_stepping_control. (print_command_lines): Handle while-stepping. (get_command_line, define_command, document_command): Adjust. * remote.c (remote_download_tracepoint): Adjust. * tracepoint.c (make_cleanup_free_actions, read_actions) (free_actions, do_free_actions_cleanup): Remove. (trace_actions_command): Use read_command_lines. (validate_actionline): Use error in one place. (encode_actions_1): New, extracted from... (encode_actions): ...this. Also use cleanups for exception safety. (trace_dump_command): Adjust. * mi/mi-cmd-break (mi_cmd_break_commands): Validate commands if it's tracepoint.
* Simplify MI breakpoint setting.Vladimir Prus2010-03-161-6/+9
| | | | | | | | | | | | | * breakpoint.c (break_command_really): Make nonstatic and rename to... (create_breakpoint): ...this. Rename prior function by this name to... (create_breakpoint_sal): ...this. (create_breakpoints): Rename to... (create_breakpoints_sal): ...this. (set_breakpoint): Remove. * breakpoint.h: Adjust to above changes. * mi/mi-cmd-break.c (mi_cmd_break_insert): Simplify.
* gdb/Pedro Alves2010-03-101-5/+12
| | | | | | | | | | | | | | | | | | | | | | * breakpoint.c (condition_command): Handle watchpoint conditions. (is_hardware_watchpoint): Add comment. (is_watchpoint): New. (update_watchpoint): Don't reparse the watchpoint's condition unless necessary. (WP_IGNORE): New. (watchpoint_check): Use it. (bpstat_check_watchpoint): Handle it. (bpstat_check_breakpoint_conditions): Evaluate watchpoint local conditions in a frame where it makes sense. (watch_command_1): Store the innermost block of the condition expression. (delete_breakpoint): Delete the watchpoint condition expression. * breakpoint.h (struct bp_location) <cond>: Update comment. (struct breakpoint): New fields `cond_exp' and `cond_exp_valid_block'. gdb/testsuite/ * gdb.base/watch-cond.c, gdb.base/watch-cond.exp: New.
* Support disconnected tracing.Stan Shebs2010-01-061-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * infcmd.c (detach_command): Ask whether to stop tracing. * cli/cli-cmds.c (quit_command): Ditto. * breakpoint.h (struct breakpoint): New field number_on_target. * breakpoint.c (create_tracepoint_from_upload): New function. (get_tracepoint_by_number_on_target): New function. * remote.c (struct remote): New field disconnected_tracing. (remote_disconnected_tracing_feature): New function. (remote_protocol_features): Add DisconnectedTracing. (struct uploaded_tp): New struct. (uploaded_tps): New global. (get_uploaded_tp): New function. (find_matching_tracepoint): New function. (remote_get_tracing_state): New function. (remote_start_remote): Call it. * tracepoint.c (disconnected_tracing): New global. (trace_start_command): Initialize number_on_target. (stop_tracing): New function, split out from... (trace_stop_command): Call stop_tracing. (get_trace_status): New function, split out from... (trace_status_command): Call get_trace_status, add info on disconnection behavior. (disconnect_or_stop_tracing): New function. (finish_tfind_command): Translate from number on target. (trace_find_tracepoint_command): Translate to number on target. (send_disconnected_tracing_value): New function. (set_disconnected_tracing): New function. (_initialize_tracepoint): Add disconnected-tracing variable. * NEWS: Mention disconnected tracing. * gdb.texinfo (Starting and Stopping Trace Experiments): Document disconnected tracing. (Tracepoint Packets): Document new protocol.
* Add fast tracepoints.Stan Shebs2010-01-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * arch-utils.h (default_fast_tracepoint_valid_at): Declare. * arch-utils.c (default_fast_tracepoint_valid_at): New function. * breakpoint.h (enum bptype): Add bp_fast_tracepoint. * breakpoint.c (tracepoint_type): New function. (ALL_TRACEPOINTS): Use it. (should_be_inserted): Ditto. (bpstat_check_location): Ditto. (print_one_breakpoint_location): Ditto. (user_settable_breakpoint): Ditto. (set_breakpoint_location_function): Ditto. (disable_breakpoints_in_shlibs): Ditto. (delete_trace_command): Ditto. (print_it_typical): Add bp_fast_tracepoint case. (bpstat_what): Ditto. (print_one_breakpoint_location): Ditto. (allocate_bp_location): Ditto. (mention): Ditto. (breakpoint_re_set_one): Ditto. (disable_command): Ditto. (enable_command): Ditto. (check_fast_tracepoint_sals): New function. (break_command_really): Call it. (ftrace_command): New function. (_initialize_breakpoint): Add ftrace command. * gdbarch.sh (fast_tracepoint_valid_at): New. * gdbarch.h, gdbarch.c: Regenerate. * i386-tdep.c (i386_fast_tracepoint_valid_at): New function. (i386_gdbarch_init): Use it. * remote.c (struct remote_state): New field fast_tracepoints. (PACKET_FastTracepoints): New packet config type. (remote_fast_tracepoint_feature): New function. (remote_protocol_features): Add FastTracepoints. (remote_supports_fast_tracepoints): New function. (_initialize_remote): Add FastTracepoints. * tracepoint.c (download_tracepoint): Add fast tracepoint option. * NEWS: Mention fast tracepoints. * gdb.texinfo (Create and Delete Tracepoints): Describe fast tracepoints. (Tracepoint Packets): Describe remote protocol for fast tracepoints. * gdb.trace/tracecmd.exp: Test ftrace.
* Update copyright year in most headers.Joel Brobecker2010-01-011-1/+1
| | | | Automatic update by copyright.sh.
* Make hardware watchpoints work for process record.Pedro Alves2009-11-221-0/+6
| | | | | | | | | | | | | | | | | | | | | * breakpoint.c (hardware_watchpoint_inserted_in_range): New. * breakpoint.h (hardware_watchpoint_inserted_in_range): Declare. * record.c (record_beneath_to_stopped_by_watchpoint) (record_beneath_to_stopped_data_address, record_hw_watchpoint): New globals. (record_exec_insn): Check for watchpoint hits. (tmp_to_stopped_by_watchpoint, tmp_to_stopped_data_address): New globals. (record_open): Set tmp_to_stopped_by_watchpoint, tmp_to_stopped_data_address, record_beneath_to_stopped_by_watchpoint and record_beneath_to_stopped_data_address. (record_wait): Report watchpoint hits to the core. Update and extend comments. (record_stopped_by_watchpoint): New. (record_stopped_data_address): New. (init_record_ops): Install them. (init_record_core_ops): Ditto.