aboutsummaryrefslogtreecommitdiff
path: root/src/tools/linux
diff options
context:
space:
mode:
authorMike Frysinger <vapier@chromium.org>2019-03-02 01:56:23 -0500
committerMike Frysinger <vapier@chromium.org>2019-03-04 16:45:16 +0000
commit7864f2edaad675f21d87e1f62e5b3e259afae995 (patch)
tree1dfdb55a69d36df84133e587ed9b8e6705bda7e9 /src/tools/linux
parentlinux_core_dumper: support NT_SIGINFO for reading crashing address (diff)
downloadbreakpad-7864f2edaad675f21d87e1f62e5b3e259afae995.tar.xz
core2md: write error message with perror
The current failure message omits the underlying errno. This can make diagnosing failures a bit difficult unless you run everything through strace. For example: $ core2md core /proc/self md $ core2md core /proc/self md Unable to generate minidump Now we get the errno details: Unable to generate minidump: File exists Change-Id: I67f30879868ce4a726d5d888ee8c0a4a316b5186 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/1497660 Reviewed-by: Ted Mielczarek <ted.mielczarek@gmail.com>
Diffstat (limited to 'src/tools/linux')
-rw-r--r--src/tools/linux/core2md/core2md.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools/linux/core2md/core2md.cc b/src/tools/linux/core2md/core2md.cc
index a0e8f8ba..c3a9da39 100644
--- a/src/tools/linux/core2md/core2md.cc
+++ b/src/tools/linux/core2md/core2md.cc
@@ -64,7 +64,7 @@ int main(int argc, char *argv[]) {
if (!WriteMinidumpFromCore(minidump_file,
core_file,
procfs_dir)) {
- fprintf(stderr, "Unable to generate minidump.\n");
+ perror("core2md: Unable to generate minidump");
return 1;
}