summaryrefslogtreecommitdiffstats
path: root/lib/Plugins/CCpp.cpp
diff options
context:
space:
mode:
authorJiri Moskovcak <jmoskovc@redhat.com>2009-11-09 15:58:19 +0100
committerJiri Moskovcak <jmoskovc@redhat.com>2009-11-09 15:58:19 +0100
commit3791b2f692f49f3cc2355584663c26cc6ddee526 (patch)
tree867b1baaec1b78dde644c5c503bc72edc579733f /lib/Plugins/CCpp.cpp
parente8e664c896e533003d4c206190ff4f2c3fe4e01d (diff)
parent324e1c37631ac28d79a1d88e30c74c5a0a819958 (diff)
downloadabrt-3791b2f692f49f3cc2355584663c26cc6ddee526.tar.gz
abrt-3791b2f692f49f3cc2355584663c26cc6ddee526.tar.xz
abrt-3791b2f692f49f3cc2355584663c26cc6ddee526.zip
Merge branch 'master' of ssh://git.fedorahosted.org/git/abrt
Diffstat (limited to 'lib/Plugins/CCpp.cpp')
-rw-r--r--lib/Plugins/CCpp.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/lib/Plugins/CCpp.cpp b/lib/Plugins/CCpp.cpp
index 6d6edd5..1ab0e64 100644
--- a/lib/Plugins/CCpp.cpp
+++ b/lib/Plugins/CCpp.cpp
@@ -164,6 +164,8 @@ static LineRating rate_line(const char *line)
{
#define FOUND(x) (strstr(line, x) != NULL)
/* see the "enum LineRating" comments for possible combinations */
+ if (FOUND(" at "))
+ return Good;
const char *function = strstr(line, " in ");
if (function)
{
@@ -171,12 +173,6 @@ static LineRating rate_line(const char *line)
{
function = NULL;
}
- else
- {
- bool source_file = FOUND(" at ");
- if (source_file)
- return Good;
- }
}
bool library = FOUND(" from ");
if (function && library)
@@ -193,7 +189,7 @@ static LineRating rate_line(const char *line)
/* returns number of "stars" to show */
static int rate_backtrace(const char *backtrace)
{
- int i, len;
+ int i, j, len;
int multiplier = 0;
int rating = 0;
int best_possible_rating = 0;
@@ -210,6 +206,9 @@ static int rate_backtrace(const char *backtrace)
if (backtrace[i] == '#') /* this separates frames from each other */
{
std::string s(backtrace + i + 1, len);
+ for (j=0; j<len; j++) /* replace tabs with spaces */
+ if (s[j] == '\t')
+ s[j] = ' ';
multiplier++;
rating += rate_line(s.c_str()) * multiplier;
best_possible_rating += BestRating * multiplier;