[PATCH 1/4] catch syscall -- try 4 -- Architecture-independent part
Sérgio Durigan Júnior
sergiodj@linux.vnet.ibm.com
Mon Jan 26 00:31:00 GMT 2009
Here goes the architecture-independent part of the patch.
Regards,
--
Sérgio Durigan Júnior
Linux on Power Toolchain - Software Engineer
Linux Technology Center - LTC
IBM Brazil
gdb/ChangeLog:
2009-01-25 Sergio Durigan Junior <sergiodj@linux.vnet.ibm.com>
* breakpoint.c (clear_syscall_catchpoints_info): New function.
(set_raw_breakpoint_without_location): Setting the parameters
for the catch syscall feature.
(any_syscall_count, syscall_counts, syscalls_size,
total_syscalls_count): New variables to keep track of requested
syscall catchpoints.
(insert_catch_syscall): New.
(remove_catch_syscall): New.
(breakpoint_hit_catch_syscall): New.
(print_it_catch_syscall): New.
(print_one_catch_syscall): New.
(print_mention_catch_syscall): New.
(syscall_catchpoint_p): New.
(create_catchpoint_without_mention): New.
(create_catchpoint): Modified in order to use
create_catchpoint_without_mention.
(create_syscall_event_catchpoint): New.
(clean_up_filters): New.
(catch_syscall_split_args): New.
(catch_syscall_command_1): New.
(delete_breakpoint): Add cleanup for catch syscall.
(is_syscall_catchpoint_enabled): New.
(catch_syscall_enabled): New.
(catching_syscall_number): New.
(catch_syscall_completer): New completer function.
(add_catch_command): Add the completer function for catchpoints.
* breakpoint.h (syscall_filter): New.
(struct breakpoint): Add field 'syscall_number' (used to know
which syscall triggered the catchpoint) and
'syscalls_to_be_caught' (used to know which syscalls we are trying
to catch).
(clear_syscall_catchpoints_info): New.
(catch_syscall_enabled): New.
(catching_syscall_number): New.
* defs.h (gdb_datadir): New variable.
* gdbarch.c: Regenerated.
* gdbarch.h: Regenerated.
* gdbarch.sh: Add syscall catchpoint functions.
(get_syscall_number): New.
(get_syscall_by_number): new.
(get_syscall_by_name): New.
(get_syscalls_names): New.
(xml_syscall_filename): New variable.
* inf-child.c (inf_child_set_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.
* linux-nat.c (linux_child_post_attach): Calling
linux_enable_tracesysgood.
(linux_child_post_startup_inferior): Likewise.
(linux_target_install_ops): Setting the default methods.
* maint.c: Create the "maintenance set gdb_datadir" command.
* 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 syscall): New struct to hold information about syscalls
in the system.
(struct target_ops): Add ops for syscall catchpoint and entry
breakpoint.
(inferior_has_called_syscall): New.
(target_passed_by_entrypoint): New.
(target_set_syscall_catchpoint): New.
(target_enable_tracesysgood): New.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: catch-syscall-arch-indep.patch
Type: text/x-patch
Size: 48320 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20090126/56f2f405/attachment.bin>
More information about the Gdb-patches
mailing list