Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/gpl3/gdb/dist/gdb Don't fail silently if we can't s...



details:   https://anonhg.NetBSD.org/src/rev/608cc138849c
branches:  trunk
changeset: 818688:608cc138849c
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Oct 24 21:22:33 2016 +0000

description:
Don't fail silently if we can't set a breakpoint

diffstat:

 external/gpl3/gdb/dist/gdb/inf-ptrace.c |  8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diffs (18 lines):

diff -r 8b9785049477 -r 608cc138849c external/gpl3/gdb/dist/gdb/inf-ptrace.c
--- a/external/gpl3/gdb/dist/gdb/inf-ptrace.c   Mon Oct 24 17:14:27 2016 +0000
+++ b/external/gpl3/gdb/dist/gdb/inf-ptrace.c   Mon Oct 24 21:22:33 2016 +0000
@@ -498,6 +498,14 @@
        /* If the PT_IO request is somehow not supported, fallback on
           using PT_WRITE_D/PT_READ_D.  Otherwise we will return zero
           to indicate failure.  */
+       if (errno == EACCES)
+         {
+           fprintf_unfiltered (gdb_stderr, "Cannot set breakpoint at %p (%s). "
+                               "Is PaX MPROTECT active? See security(7), "
+                               "sysctl(7), paxctl(8)\n", piod.piod_offs,
+                               strerror(errno));
+           return TARGET_XFER_E_IO;    /* Some other error perhaps? */
+         }
        if (errno != EINVAL)
          return TARGET_XFER_EOF;
       }



Home | Main Index | Thread Index | Old Index