summaryrefslogtreecommitdiffstats
path: root/lib/Plugins/CCpp.cpp
diff options
context:
space:
mode:
authorNikola Pajkovsky <npajkovs@redhat.com>2009-09-07 11:27:51 +0200
committerNikola Pajkovsky <npajkovs@redhat.com>2009-09-07 11:27:51 +0200
commit7de2b3426e00a19298d167f574c899a7939122ce (patch)
tree85981d573c86a47fdec883628e91bd41610f6f84 /lib/Plugins/CCpp.cpp
parent223f7ac565975b3d770065909607d9d25a3a2df4 (diff)
downloadabrt-7de2b3426e00a19298d167f574c899a7939122ce.tar.gz
abrt-7de2b3426e00a19298d167f574c899a7939122ce.tar.xz
abrt-7de2b3426e00a19298d167f574c899a7939122ce.zip
Add new config option InstallDebuginfo into CCpp.conf
Diffstat (limited to 'lib/Plugins/CCpp.cpp')
-rw-r--r--lib/Plugins/CCpp.cpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/lib/Plugins/CCpp.cpp b/lib/Plugins/CCpp.cpp
index b6e47a0..2d0326c 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;
}