This is the mail archive of the gdb-cvs@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]

gdb and binutils branch master updated. beed38b8273fa18be574a7e84d5d2ee1f563ed48


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gdb and binutils".

The branch, master has been updated
       via  beed38b8273fa18be574a7e84d5d2ee1f563ed48 (commit)
      from  bf330350c212fb8880faab663f5b3565319d0a95 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=beed38b8273fa18be574a7e84d5d2ee1f563ed48

commit beed38b8273fa18be574a7e84d5d2ee1f563ed48
Author: Joel Brobecker <brobecker@adacore.com>
Date:   Tue Nov 11 10:07:21 2014 +0400

    [Linux] Ask kernel to kill inferior when GDB terminates
    
    This patch enhances GDB on GNU/Linux systems in the situation where
    we are debugging an inferior that was created from GDB (as opposed
    to attached to), by asking the kernel to kill the inferior if GDB
    terminates without doing it itself.
    
    This would typically happen when GDB encounters a problem and
    crashes, or when it gets killed by an external process. This can
    be observed by starting a program under GDB, and then killing
    GDB with signal 9. After GDB is killed, the inferior still remains.
    
    This patch also fixes GDBserver similarly.
    
    This fix is conditional on the kernel supporting the PTRACE_O_EXITKILL
    feature.  On older kernels, the behavior remains unchanged.
    
    gdb/ChangeLog:
    
            * nat/linux-ptrace.h (PTRACE_O_EXITKILL): Define if not
            already defined.
            (linux_enable_event_reporting): Add parameter "attached".
            * nat/linux-ptrace.c (linux_test_for_exitkill): New forward
            declaration.  New function.
            (linux_check_ptrace_features): Add linux_test_for_exitkill call.
            (linux_enable_event_reporting): Add new parameter "attached".
            Do not call ptrace with the PTRACE_O_EXITKILL if ATTACHED is
            nonzero.
            * linux-nat.c (linux_init_ptrace): Add parameter "attached".
            Use it.  Update function description.
            (linux_child_post_attach, linux_child_post_startup_inferior):
            Update call to linux_enable_event_reporting.
    
    gdb/gdbserver/ChangeLog:
    
            * linux-low.c (linux_low_filter_event): Update call to
            linux_enable_event_reporting following the addition of
            a new parameter to that function.
    
    Tested on x86_64-linux, native and native-gdbserver.
    
    I also verified by hand that the inferior gets killed when killing
    GDB in the "run" case, while the inferior remains in the "attach"
    case. Same for GDBserver.

-----------------------------------------------------------------------

Summary of changes:
 gdb/ChangeLog             |   16 ++++++++++++++++
 gdb/gdbserver/ChangeLog   |    6 ++++++
 gdb/gdbserver/linux-low.c |    4 +++-
 gdb/linux-nat.c           |   12 +++++++-----
 gdb/nat/linux-ptrace.c    |   34 +++++++++++++++++++++++++++++++---
 gdb/nat/linux-ptrace.h    |    7 ++++++-
 6 files changed, 69 insertions(+), 10 deletions(-)


hooks/post-receive
-- 
gdb and binutils


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