diff options
author | Nikola Pajkovsky <npajkovs@redhat.com> | 2009-09-07 11:27:51 +0200 |
---|---|---|
committer | Nikola Pajkovsky <npajkovs@redhat.com> | 2009-09-07 11:27:51 +0200 |
commit | 7de2b3426e00a19298d167f574c899a7939122ce (patch) | |
tree | 85981d573c86a47fdec883628e91bd41610f6f84 | |
parent | 223f7ac565975b3d770065909607d9d25a3a2df4 (diff) | |
download | abrt-7de2b3426e00a19298d167f574c899a7939122ce.tar.gz abrt-7de2b3426e00a19298d167f574c899a7939122ce.tar.xz abrt-7de2b3426e00a19298d167f574c899a7939122ce.zip |
Add new config option InstallDebuginfo into CCpp.conf
-rw-r--r-- | lib/Plugins/CCpp.conf | 7 | ||||
-rw-r--r-- | lib/Plugins/CCpp.cpp | 18 | ||||
-rw-r--r-- | lib/Plugins/CCpp.h | 1 |
3 files changed, 23 insertions, 3 deletions
diff --git a/lib/Plugins/CCpp.conf b/lib/Plugins/CCpp.conf index 11a5eb8e..02c6c1ab 100644 --- a/lib/Plugins/CCpp.conf +++ b/lib/Plugins/CCpp.conf @@ -6,4 +6,9 @@ MemoryMap = no # how to get debug-info: install, mount ## install - download and install debug-info packages ## mount - mount fedora NFS with debug info -DebugInfo = install
\ No newline at end of file +DebugInfo = install + +# With this option set to "yes" +# will be installed debuginfo +InstallDebuginfo = yes + diff --git a/lib/Plugins/CCpp.cpp b/lib/Plugins/CCpp.cpp index b6e47a07..2d0326c5 100644 --- a/lib/Plugins/CCpp.cpp +++ b/lib/Plugins/CCpp.cpp @@ -42,7 +42,7 @@ static pid_t ExecVP(const char* pCommand, char* const pArgs[], uid_t uid, std::string& pOutput); CAnalyzerCCpp::CAnalyzerCCpp() : - m_bMemoryMap(false) + m_bMemoryMap(false), m_bInstallDebuginfo(true) {} static std::string CreateHash(const std::string& pInput) @@ -483,7 +483,16 @@ void CAnalyzerCCpp::CreateReport(const std::string& pDebugDumpDir) dd.LoadText(FILENAME_PACKAGE, package); dd.Close(); - InstallDebugInfos(package); + map_plugin_settings_t settings = GetSettings(); + if( settings["InstallDebuginfo"] == "yes" ) + { + InstallDebugInfos(package); + } + else { + char buffer[1024]; + snprintf(buffer,1024, _("Skip debuginfo installation for package %s"), package.c_str()); + warn_client(std::string(buffer)); + } GetBacktrace(pDebugDumpDir, backtrace); @@ -553,6 +562,10 @@ void CAnalyzerCCpp::SetSettings(const map_plugin_settings_t& pSettings) { m_sDebugInfo = pSettings.find("DebugInfo")->second; } + if (pSettings.find("InstallDebuginfo") != pSettings.end()) + { + m_bInstallDebuginfo = pSettings.find("InstallDebuginfo")->second == "yes"; + } } map_plugin_settings_t CAnalyzerCCpp::GetSettings() @@ -561,6 +574,7 @@ map_plugin_settings_t CAnalyzerCCpp::GetSettings() ret["MemoryMap"] = m_bMemoryMap ? "yes" : "no"; ret["DebugInfo"] = m_sDebugInfo; + ret["InstallDebuginfo"] = m_bInstallDebuginfo ? "yes" : "no"; return ret; } diff --git a/lib/Plugins/CCpp.h b/lib/Plugins/CCpp.h index b428a8ad..92b6bab7 100644 --- a/lib/Plugins/CCpp.h +++ b/lib/Plugins/CCpp.h @@ -31,6 +31,7 @@ class CAnalyzerCCpp : public CAnalyzer { private: bool m_bMemoryMap; + bool m_bInstallDebuginfo; std::string m_sOldCorePattern; std::string m_sDebugInfo; public: |