summaryrefslogtreecommitdiffstats
path: root/CRT.c
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2021-01-08 13:51:21 +0100
committerChristian Göttsche <cgzones@googlemail.com>2021-01-08 16:53:16 +0100
commit2d2a2df6f22715e1d7a6518e186918ee642e7293 (patch)
tree2daeccda314d83acccba80507efca74efdbc343c /CRT.c
parentde645ea16c441ca7364e030d2659e950ee540f74 (diff)
Refactor crash handler message to avoid embedded directive
CRT.c:821:2: error: embedding a directive within macro arguments has undefined behavior [-Werror,-Wembedded-directive] #ifdef HAVE_EXECINFO_H ^ CRT.c:823:2: error: embedding a directive within macro arguments has undefined behavior [-Werror,-Wembedded-directive] #endif ^ CRT.c:858:2: error: embedding a directive within macro arguments has undefined behavior [-Werror,-Wembedded-directive] #ifdef HTOP_DARWIN ^ CRT.c:862:2: error: embedding a directive within macro arguments has undefined behavior [-Werror,-Wembedded-directive] #endif ^ CRT.c:864:2: error: embedding a directive within macro arguments has undefined behavior [-Werror,-Wembedded-directive] #ifdef HTOP_DARWIN ^ CRT.c:868:2: error: embedding a directive within macro arguments has undefined behavior [-Werror,-Wembedded-directive] #endif ^
Diffstat (limited to 'CRT.c')
-rw-r--r--CRT.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/CRT.c b/CRT.c
index 7ae7c122..de123ca7 100644
--- a/CRT.c
+++ b/CRT.c
@@ -818,9 +818,13 @@ void CRT_handleSIGSEGV(int signal) {
"- Your OS and kernel version (uname -a)\n"
"- Your distribution and release (lsb_release -a)\n"
"- Likely steps to reproduce (How did it happened?)\n"
+ );
+
#ifdef HAVE_EXECINFO_H
- "- Backtrace of the issue (see below)\n"
+ fprintf(stderr, "- Backtrace of the issue (see below)\n");
#endif
+
+ fprintf(stderr,
"\n"
);
@@ -855,11 +859,15 @@ void CRT_handleSIGSEGV(int signal) {
"you should provide a disassembly of your binary.\n"
"This can usually be done by running the following command:\n"
"\n"
+ );
+
#ifdef HTOP_DARWIN
- " otool -tvV `which htop` > ~/htop.otool\n"
+ fprintf(stderr, " otool -tvV `which htop` > ~/htop.otool\n");
#else
- " objdump -d -S -w `which htop` > ~/htop.objdump\n"
+ fprintf(stderr, " objdump -d -S -w `which htop` > ~/htop.objdump\n");
#endif
+
+ fprintf(stderr,
"\n"
"Please include the generated file in your report.\n"
"\n"

© 2014-2024 Faster IT GmbH | imprint | privacy policy