summaryrefslogtreecommitdiffstats
path: root/lib/Utils/DebugDump.cpp
diff options
context:
space:
mode:
authorJiri Moskovcak <jmoskovc@redhat.com>2009-02-12 12:34:25 +0100
committerJiri Moskovcak <jmoskovc@redhat.com>2009-02-12 12:34:25 +0100
commit53821dddf0b6ee66dc5f0684b17c541c157656ec (patch)
tree00dcb130b6fd32ef137cd7b139bbebfeb0c060b4 /lib/Utils/DebugDump.cpp
parent356da89a4e2e6e50ceade12f286d104fe1c17eae (diff)
parentc93222d1407ede085833d3a91bfeda5f0f910eb4 (diff)
downloadabrt-53821dddf0b6ee66dc5f0684b17c541c157656ec.tar.gz
abrt-53821dddf0b6ee66dc5f0684b17c541c157656ec.tar.xz
abrt-53821dddf0b6ee66dc5f0684b17c541c157656ec.zip
Merge branch 'master' of git://git.fedorahosted.org/git/crash-catcher
Diffstat (limited to 'lib/Utils/DebugDump.cpp')
-rw-r--r--lib/Utils/DebugDump.cpp30
1 files changed, 17 insertions, 13 deletions
diff --git a/lib/Utils/DebugDump.cpp b/lib/Utils/DebugDump.cpp
index e0f88c4..09e65ae 100644
--- a/lib/Utils/DebugDump.cpp
+++ b/lib/Utils/DebugDump.cpp
@@ -79,13 +79,6 @@ void CDebugDump::Create(const std::string& pDir)
SaveTime();
}
-void CDebugDump::Create(const std::string& pDir, const std::string& pPID)
-{
- Create(pDir);
- SaveProc(pPID);
-}
-
-
void CDebugDump::Delete(const std::string& pDir)
{
if (!ExistFileDir(pDir))
@@ -253,12 +246,6 @@ void CDebugDump::SaveProc(const std::string& pPID)
SaveText(FILENAME_EXECUTABLE, executable);
}
- CPackages packages;
- while (!packages.SearchFile(executable)) {}
- while (!packages.GetStatus()) {}
- std::string package = packages.GetSearchFileReply();
-
- SaveText(FILENAME_PACKAGE, package);
path = "/proc/"+pPID+"/status";
std::string uid = "";
@@ -273,4 +260,21 @@ void CDebugDump::SaveProc(const std::string& pPID)
ii++;
}
SaveText(FILENAME_UID, uid);
+
+ path = "/proc/"+pPID+"/cmdline";
+ LoadTextFile(path, data);
+ SaveText(FILENAME_CMDLINE, data);
+}
+
+void CDebugDump::SavePackage()
+{
+ std::string executable;
+ std::string package = "";
+ if (Exist(FILENAME_EXECUTABLE))
+ {
+ CPackages packages;
+ LoadText(FILENAME_EXECUTABLE, executable);
+ package = packages.SearchFile("/usr/sbin/acpid");
+ }
+ SaveText(FILENAME_PACKAGE, package);
}