summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorKarel Klic <kklic@redhat.com>2010-06-30 15:09:26 +0200
committerKarel Klic <kklic@redhat.com>2010-06-30 15:09:26 +0200
commitc428fe9fe07729b66fedd99f6566cbac55dc4f1b (patch)
tree2139e524bf3f882a200e13c5497ac539c14dd2f5 /lib
parentae804b4d8e25898fcafa7dae4a24a26e6b6b06d0 (diff)
parent5e9ec38444fb1226b9632a41cea1739b5d860ae1 (diff)
downloadabrt-c428fe9fe07729b66fedd99f6566cbac55dc4f1b.tar.gz
abrt-c428fe9fe07729b66fedd99f6566cbac55dc4f1b.tar.xz
abrt-c428fe9fe07729b66fedd99f6566cbac55dc4f1b.zip
Merge branch 'remote2'
Diffstat (limited to 'lib')
-rw-r--r--lib/Plugins/CCpp.conf3
-rw-r--r--lib/Plugins/CCpp.cpp16
-rw-r--r--lib/Plugins/CCpp.h1
3 files changed, 20 insertions, 0 deletions
diff --git a/lib/Plugins/CCpp.conf b/lib/Plugins/CCpp.conf
index a18d56a3..82125813 100644
--- a/lib/Plugins/CCpp.conf
+++ b/lib/Plugins/CCpp.conf
@@ -12,6 +12,9 @@ SaveBinaryImage = no
# Generate backtrace
Backtrace = yes
+# Generate backtrace for remote crashes
+BacktraceRemotes = no
+
# Generate memory map too (IGNORED FOR NOW)
MemoryMap = no
diff --git a/lib/Plugins/CCpp.cpp b/lib/Plugins/CCpp.cpp
index 0fc229d3..2a329530 100644
--- a/lib/Plugins/CCpp.cpp
+++ b/lib/Plugins/CCpp.cpp
@@ -50,6 +50,7 @@ crash at the same time? This value has been recommended by nhorman
CAnalyzerCCpp::CAnalyzerCCpp() :
m_bBacktrace(true),
+ m_bBacktraceRemotes(false),
m_bMemoryMap(false),
m_bInstallDebugInfo(true),
m_nDebugInfoCacheMB(4000)
@@ -700,6 +701,16 @@ void CAnalyzerCCpp::CreateReport(const char *pDebugDumpDir, int force)
CDebugDump dd;
dd.Open(pDebugDumpDir);
+ /* Skip remote crashes. */
+ if (dd.Exist(FILENAME_REMOTE))
+ {
+ std::string remote_str;
+ dd.LoadText(FILENAME_REMOTE, remote_str);
+ bool remote = (remote_str.find('1') != std::string::npos);
+ if (remote && !m_bBacktraceRemotes)
+ return;
+ }
+
if (!m_bBacktrace)
return;
@@ -985,6 +996,11 @@ void CAnalyzerCCpp::SetSettings(const map_plugin_settings_t& pSettings)
{
m_bBacktrace = string_to_bool(it->second.c_str());
}
+ it = pSettings.find("BacktraceRemotes");
+ if (it != end)
+ {
+ m_bBacktraceRemotes = string_to_bool(it->second.c_str());
+ }
it = pSettings.find("MemoryMap");
if (it != end)
{
diff --git a/lib/Plugins/CCpp.h b/lib/Plugins/CCpp.h
index afdc2c6e..ce6ba7a5 100644
--- a/lib/Plugins/CCpp.h
+++ b/lib/Plugins/CCpp.h
@@ -30,6 +30,7 @@ class CAnalyzerCCpp : public CAnalyzer
{
private:
bool m_bBacktrace;
+ bool m_bBacktraceRemotes;
bool m_bMemoryMap;
bool m_bInstallDebugInfo;
unsigned m_nDebugInfoCacheMB;