This is the architecture independent part of the patch. The ChangeLog is inlined, and the patch itself is attached. Regards, -- Sérgio Durigan Júnior Linux on Power Toolchain - Software Engineer Linux Technology Center - LTC IBM Brazil gdb/ChangeLog: 2008-11-04 Sergio Durigan Junior * breakpoint.c (clear_syscall_catchpoints_info): New function. (print_it_typical): Handle the case of the breakpoint at the entrypoint. (bpstat_what): Add the entry breakpoint case. (print_one_breakpoint_location): Add the entry breakpoint. (allocate_bp_location): Likewise. (set_raw_breakpoint_without_location): New. Used by the catch syscall feature because it needs to mention the catchpoint after some few adjustments. (create_entry_breakpoint): New. (insert_catch_syscall): New. (breakpoint_hit_catch_syscall): New. (print_it_catch_syscall): New. (print_one_catch_syscall): New. (print_mention_catch_syscall): New. (catch_syscall_breakpoint_ops): New struct. (syscall_catchpoint_p): New. (create_catchpoint): Modified in order to use create_catchpoint_without_mention. (create_syscall_event_catchpoint): New. (mention): Add the entry breakpoint. (catch_syscall_split_args): New. (catch_syscall_command_1): New. (delete_command): Add the entry breakpoint case. (breakpoint_re_set_one): Likewise. (is_syscall_catchpoint_enabled): New. (catch_syscall_enabled): New. (catching_syscall_number): New. * breakpoint.h (enum bptype): Add the entry breakpoint case. (struct breakpoint): Add field 'syscall_number' (used to know which syscall triggered the catchpoint) and 'syscall_to_be_caught' (used to know which syscall we are trying to catch). (enum bpstat_what_main_action): Add BPSTAT_WHAT_ENTRY_BREAKPOINT, to identify whether we hit an entry breakpoint. (catch_syscall_enabled): New. (catching_syscall_number): New. (create_entry_breakpoint): New. * completer.c: Include gdbarch.h file. (catch_syscall_completer): New. * completer.h (catch_syscall_completer): New. * defs.h (gdb_datadir): New variable. * gdbarch.c: Regenerated. * gdbarch.h: Regenerated. * gdbarch.sh: Add syscall catchpoint functions. (get_syscall_number): New. (syscall_name_from_number): new. (syscall_number_from_name): New. (get_syscalls_names): New. * gdbthread.h (struct thread_info): Add field 'syscall_state', used to know if we are calling or returning from a syscall. * inf-child.c (inf_child_insert_syscall_catchpoint): New. (inf_child_remove_syscall_catchpoint): New. (inf_child_target): Assign default values to target_ops. * inf-ptrace.c (inf_ptrace_resume): Select the proper request to be made for ptrace() considering if we are catching syscalls or not. * infcmd.c (run_command_1): Clean syscall catchpoint info on every run. * infrun.c (resume): Add syscall catchpoint and entry breakpoint. (deal_with_syscall_event): New. (handle_inferior_event): Add syscall entry/return events. Also, add entry breakpoint event. (inferior_has_called_syscall): New. * main.c: Add gdb_datadir variable to store the current GDB datadir. (captured_main): Add the GDB datadir relocatable handler. * maint.c: Create the "maintanence set gdb_datadir" c * target.c (update_current_target): Update/copy functions related to syscall catchpoint and entry breakpoint. (debug_to_wait): Add syscall catchpoint entry/return events. * target.h (struct target_waitstatus): Add syscall number. (struct target_ops): Add ops for syscall catchpoint and entry breakpoint. (inferior_has_called_syscall): New. (target_passed_by_entrypoint): New. (target_insert_syscall_catchpoint): New. (target_remove_syscall_catchpoint): New. (target_enable_tracesysgood): New.