Introduce common cleanup for restoring integers.
authorVladimir Prus <vladimir@codesourcery.com>
Tue, 10 Jun 2008 09:29:15 +0000 (09:29 +0000)
committerVladimir Prus <vladimir@codesourcery.com>
Tue, 10 Jun 2008 09:29:15 +0000 (09:29 +0000)
commit0b080f5982d636d473d4fb9e62ef1ee00b28fdbc
tree1bcc2168a81286fcb2ed029576c282e77c3c8736
parent3201a343ca2a328894f3d0384082eed9b757cf03
Introduce common cleanup for restoring integers.
        * defs.h (make_cleanup_restore_integer): New declaration.
        (struct cleanup): New field free_arg.
        (make_my_cleanup_2): New.
        * utils.c (restore_integer_closure, restore_integer)
        (make_cleanup_restore_integer): New.
        (make_my_cleanup): Initialize the free_arg field and
        renamed to make_my_cleanup_2.
        (do_my_cleanups): Call free_arg.
        (discard_cleanups): Call free_arg.
        * breakpoint.c (restore_always_inserted_mode): Remove.
        (update_breakpoints_after_exec): Use make_cleanup_restore_integer.
gdb/ChangeLog
gdb/breakpoint.c
gdb/defs.h
gdb/utils.c