summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-10-13 14:55:32 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2009-10-13 14:55:32 +0200
commit25abf46bb691c75f02c31192154e6c7324421ec6 (patch)
tree472595eb72dfa3120a1a93d620562a4cf3eebe8c
parent8ca5645cc850855cafa00055546464a9ad288591 (diff)
downloadabrt-25abf46bb691c75f02c31192154e6c7324421ec6.tar.gz
abrt-25abf46bb691c75f02c31192154e6c7324421ec6.tar.xz
abrt-25abf46bb691c75f02c31192154e6c7324421ec6.zip
lib/Plugins/CCpp.cpp: add build-ids to backtrace
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--lib/Plugins/CCpp.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/lib/Plugins/CCpp.cpp b/lib/Plugins/CCpp.cpp
index 55d6cea5..14677456 100644
--- a/lib/Plugins/CCpp.cpp
+++ b/lib/Plugins/CCpp.cpp
@@ -360,7 +360,7 @@ static std::string run_unstrip_n(const std::string& pDebugDumpDir)
return output;
}
-static void InstallDebugInfos(const std::string& pDebugDumpDir)
+static void InstallDebugInfos(const std::string& pDebugDumpDir, std::string& build_ids)
{
log("Getting module names, file names, build IDs from core file");
std::string unstrip_list = run_unstrip_n(pDebugDumpDir);
@@ -402,6 +402,9 @@ static void InstallDebugInfos(const std::string& pDebugDumpDir)
/* Not lstat: this is a symlink and we want link's TARGET to exist */
file_exists = stat(fn, &sb) == 0 && S_ISREG(sb.st_mode);
free(fn);
+ build_ids += "build-id ";
+ build_ids += word2;
+ build_ids += file_exists ? " (debuginfo present)\n" : " (debuginfo absent)\n";
}
log("build_id:%s exists:%d", word2, (int)file_exists);
if (!file_exists)
@@ -454,8 +457,8 @@ static void InstallDebugInfos(const std::string& pDebugDumpDir)
1. Getting sources list...OK. Found 16 enabled and 23 disabled sources.
2. Finding debugging sources...OK. Found 0 disabled debuginfo repos.
3. Enabling debugging sources...OK. Enabled 0 debugging sources.
-4. Finding debugging packages...Failed to find the package : more than one package found for
-Failed to find the package : more than one package found for
+4. Finding debugging packages...Failed to find the package : more than one package found for
+Failed to find the package : more than one package found for
FAILED. Found no packages to install.
5. Disabling sources previously enabled...OK. Disabled 0 debugging sources.
@@ -641,11 +644,12 @@ void CAnalyzerCCpp::CreateReport(const std::string& pDebugDumpDir, int force)
dd.LoadText(FILENAME_UID, UID);
dd.Close(); /* do not keep dir locked longer than needed */
+ std::string build_ids;
map_plugin_settings_t settings = GetSettings();
if (settings["InstallDebuginfo"] == "yes" &&
DebuginfoCheckPolkit(atoi(UID.c_str())) )
{
- InstallDebugInfos(pDebugDumpDir);
+ InstallDebugInfos(pDebugDumpDir, build_ids);
}
else
{
@@ -655,7 +659,7 @@ void CAnalyzerCCpp::CreateReport(const std::string& pDebugDumpDir, int force)
GetBacktrace(pDebugDumpDir, backtrace);
dd.Open(pDebugDumpDir);
- dd.SaveText(FILENAME_BACKTRACE, backtrace);
+ dd.SaveText(FILENAME_BACKTRACE, build_ids + backtrace);
if (m_bMemoryMap)
{
dd.SaveText(FILENAME_MEMORYMAP, "memory map of the crashed C/C++ application, not implemented yet");