Improve ptrace-error detection on Linux targets
[deliverable/binutils-gdb.git] / gdb / inf-ptrace.h
index 98b5d2e09e686b0c4490f1fd442e4be61bab6a61..7cdab9af892d44cefa86dcb0e5ad4d54bfc8219f 100644 (file)
@@ -83,4 +83,14 @@ protected:
 
 extern pid_t get_ptrace_pid (ptid_t);
 
+/* Pointer to "inf_ptrace_me_fail_reason", which implements a function
+   that can be called by "inf_ptrace_me" in order to obtain the reason
+   for a ptrace failure.  ERR is the ERRNO value set by the failing
+   ptrace call.
+
+   This pointer can be overriden by targets that want to personalize
+   the error message printed when ptrace fails (see linux-nat.c, for
+   example).  */
+extern std::string (*inf_ptrace_me_fail_reason) (int err);
+
 #endif
This page took 0.024932 seconds and 4 git commands to generate.