This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[commit] Reimplement "catch exec" using bp_catchpoint


Hello,

This is just code cleanup to remove the need for the bp_catch_exec
enum bptype kind, and simplify a little the breakpoint code by
using the breakpoint_ops structure.

There is one little change of output: exec catchpoints are now displayed
as follow:

> 5       catchpoint     keep y              exec
> 5       catchpoint     keep y              exec, program "/[...]/execd-prog"

rather than:

> 5       catch exec     keep y
> 5       catch exec     keep y              program "/[...]/execd-prog"

This is identical to what we did for fork/vfork catchpoints.

gdb/
2008-10-27  Joel Brobecker  <brobecker@adacore.com>

        * breakpoint.h (enum bptype): Delete bp_catch_exec.
        * breakpoint.c (insert_catchpoint): Remove handling for
        bp_catch_exec breakpoint kinds.
        (insert_bp_location, update_breakpoints_after_exec, remove_breakpoint)
        (ep_is_catchpoint, print_it_typical, bpstat_check_location),
        (bpstat_check_location, bpstat_what, print_one_breakpoint_location)
        (print_one_breakpoint_location, user_settable_breakpoint)
        (breakpoint_address_is_meaningful, adjust_breakpoint_address)
        (allocate_bp_location, mention, breakpoint_re_set_one)
        (disable_command, enable_command): Likewise.
        (create_exec_event_catchpoint): Delete.
        (insert_catch_exec, remove_catch_exec, breakpoint_hit_catch_exec)
        (print_it_catch_exec, print_one_catch_exec, print_mention_catch_exec):
        New functions.
        (catch_exec_breakpoint_ops): New static global.
        (catch_exec_command_1): Use create_catchpoint instead of
        create_exec_event_catchpoint to create the exec catchpoint.

gdb/testsuite/
2008-10-27  Joel Brobecker  <brobecker@adacore.com>

        gdb.base/foll-exec.exp: Update the expected output of a couple
        of "info breakpoints" tests.

Tested on x86-linux. No regression.
I'll commit in a couple of days unless there are some corrections
to be made.

-- 
Joel

Attachment: catch-exec.diff
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]