diff options
author | Karel Klic <kklic@redhat.com> | 2010-06-30 09:31:00 +0200 |
---|---|---|
committer | Karel Klic <kklic@redhat.com> | 2010-06-30 09:31:00 +0200 |
commit | 5e9ec38444fb1226b9632a41cea1739b5d860ae1 (patch) | |
tree | 9c020366a5080b1c8a39e04ca289da50895911e5 | |
parent | 69f0ecf83241f7cecca1918e068fd7a3cfd7f24e (diff) | |
download | abrt-5e9ec38444fb1226b9632a41cea1739b5d860ae1.tar.gz abrt-5e9ec38444fb1226b9632a41cea1739b5d860ae1.tar.xz abrt-5e9ec38444fb1226b9632a41cea1739b5d860ae1.zip |
Added BacktraceRemotes option.
-rw-r--r-- | lib/Plugins/CCpp.conf | 3 | ||||
-rw-r--r-- | lib/Plugins/CCpp.cpp | 16 | ||||
-rw-r--r-- | lib/Plugins/CCpp.h | 1 |
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 d0455b9e..ad78b49c 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; |