Module Name:    src
Committed By:   christos
Date:           Mon Oct 24 21:22:33 UTC 2016

Modified Files:
        src/external/gpl3/gdb/dist/gdb: inf-ptrace.c

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


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/external/gpl3/gdb/dist/gdb/inf-ptrace.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/gdb/dist/gdb/inf-ptrace.c
diff -u src/external/gpl3/gdb/dist/gdb/inf-ptrace.c:1.13 src/external/gpl3/gdb/dist/gdb/inf-ptrace.c:1.14
--- src/external/gpl3/gdb/dist/gdb/inf-ptrace.c:1.13	Wed Oct 12 16:20:33 2016
+++ src/external/gpl3/gdb/dist/gdb/inf-ptrace.c	Mon Oct 24 17:22:33 2016
@@ -498,6 +498,14 @@ inf_ptrace_xfer_partial (struct target_o
 	/* 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;
       }

Reply via email to