Skip to content
Snippets Groups Projects
Commit 5f7ba2de authored by Georg Sauthoff's avatar Georg Sauthoff
Browse files

add more verbose error messages

parent 1cd725cd
No related branches found
No related tags found
No related merge requests found
...@@ -529,7 +529,7 @@ static FILE *fopen_mem(const char *pid, bool stop_process) ...@@ -529,7 +529,7 @@ static FILE *fopen_mem(const char *pid, bool stop_process)
// XXX for root, we just need to stop the process? // XXX for root, we just need to stop the process?
long r = ptrace(PTRACE_ATTACH, p, 0, 0); long r = ptrace(PTRACE_ATTACH, p, 0, 0);
if (r == -1) { if (r == -1) {
perror(0); perror("ptrace attach failed");
return 0; return 0;
} }
siginfo_t info; siginfo_t info;
...@@ -543,7 +543,7 @@ static FILE *fopen_mem(const char *pid, bool stop_process) ...@@ -543,7 +543,7 @@ static FILE *fopen_mem(const char *pid, bool stop_process)
sprintf(filename, "/proc/%s/mem", pid); sprintf(filename, "/proc/%s/mem", pid);
FILE *f = fopen(filename, "rb"); FILE *f = fopen(filename, "rb");
if (!f) { if (!f) {
perror(0); perror("open /proc/$pid/mem failed");
} }
return f; return f;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment