summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarel Klic <kklic@redhat.com>2010-01-13 14:21:20 +0100
committerKarel Klic <kklic@redhat.com>2010-01-13 14:21:20 +0100
commitdf1d7cd05d8f6abba8c713e773828deee19baf22 (patch)
tree6f789457345c9c3a076a5bc3e8c2657a674dff61
parent745c2265e8e2c1c76288900811696478f0b04cfd (diff)
downloadabrt-df1d7cd05d8f6abba8c713e773828deee19baf22.tar.gz
abrt-df1d7cd05d8f6abba8c713e773828deee19baf22.tar.xz
abrt-df1d7cd05d8f6abba8c713e773828deee19baf22.zip
Better error messages for abrt-backtrace execution
-rw-r--r--lib/Plugins/CCpp.cpp22
-rw-r--r--src/Backtrace/main.c4
2 files changed, 21 insertions, 5 deletions
diff --git a/lib/Plugins/CCpp.cpp b/lib/Plugins/CCpp.cpp
index 6c200d0..e0db9cf 100644
--- a/lib/Plugins/CCpp.cpp
+++ b/lib/Plugins/CCpp.cpp
@@ -621,13 +621,29 @@ string CAnalyzerCCpp::GetGlobalUUID(const char *pDebugDumpDir)
{
perror_msg("abrt-backtrace not executed properly, "
"status: %x signal: %d", status, WIFSIGNALED(status));
- } else
+ }
+ else
{
int exit_status = WEXITSTATUS(status);
- if (exit_status != 0)
+ if (exit_status == 79) /* EX_PARSINGFAILED */
+ {
+ /* abrt-backtrace returns alternative backtrace
+ representation in this case, so everything will work
+ as expected except worse duplication detection */
+ log_msg("abrt-backtrace failed to parse the backtrace");
+ }
+ else if (exit_status == 80) /* EX_THREADDETECTIONFAILED */
+ {
+ /* abrt-backtrace returns backtrace with all threads
+ in this case, so everything will work as expected
+ except worse duplication detection */
+ log_msg("abrt-backtrace failed to determine crash frame");
+ }
+ else if (exit_status != 0)
{
+ /* this is unexpected problem and it should be investigated */
error_msg("abrt-backtrace run failed, exit value: %d",
- exit_status);
+ exit_status);
}
}
diff --git a/src/Backtrace/main.c b/src/Backtrace/main.c
index 7dfba43..5e69338 100644
--- a/src/Backtrace/main.c
+++ b/src/Backtrace/main.c
@@ -28,8 +28,8 @@
/* Too large files are trimmed. */
#define FILE_SIZE_LIMIT 20000000 /* ~ 20 MB */
-#define EX_PARSINGFAILED EX__MAX + 1
-#define EX_THREADDETECTIONFAILED EX__MAX + 2
+#define EX_PARSINGFAILED EX__MAX + 1 /* = 79 */
+#define EX_THREADDETECTIONFAILED EX__MAX + 2 /* = 80 */
const char *argp_program_version = "abrt-backtrace " VERSION;
const char *argp_program_bug_address = "<crash-catcher@lists.fedorahosted.org>";