summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorKarel Klíč <kklic@localhost.localdomain>2009-10-07 09:03:23 +0200
committerKarel Klíč <kklic@localhost.localdomain>2009-10-07 09:03:23 +0200
commit5ca01da2ca21ac33dff245ef89af6b12b6a02bed (patch)
treec4893f4d4ec026dfb7cdc48967f6765568504189 /lib
parent01c00832d83b71ac68af257c41dca98e46a34fd7 (diff)
parent678a880a9e5aeb0b0742c69125789842fe32b9fc (diff)
downloadabrt-5ca01da2ca21ac33dff245ef89af6b12b6a02bed.tar.gz
abrt-5ca01da2ca21ac33dff245ef89af6b12b6a02bed.tar.xz
abrt-5ca01da2ca21ac33dff245ef89af6b12b6a02bed.zip
Merge branch 'master' of git://git.fedorahosted.org/git/abrt
Diffstat (limited to 'lib')
-rw-r--r--lib/Plugins/CCpp.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/Plugins/CCpp.cpp b/lib/Plugins/CCpp.cpp
index be5ef6e..c054c78 100644
--- a/lib/Plugins/CCpp.cpp
+++ b/lib/Plugins/CCpp.cpp
@@ -145,6 +145,7 @@ static void GetBacktrace(const std::string& pDebugDumpDir, std::string& pBacktra
{
update_client(_("Getting backtrace..."));
+// TODO: use -ex CMD1 -ex CMD2 ... instead of temp file?
std::string tmpFile = "/tmp/" + pDebugDumpDir.substr(pDebugDumpDir.rfind("/"));
std::ofstream fTmp;
std::string UID;
@@ -156,8 +157,12 @@ static void GetBacktrace(const std::string& pDebugDumpDir, std::string& pBacktra
dd.Open(pDebugDumpDir);
dd.LoadText(FILENAME_EXECUTABLE, executable);
dd.LoadText(FILENAME_UID, UID);
- fTmp << "file " << executable << '\n';
- fTmp << "core " << pDebugDumpDir << "/"FILENAME_COREDUMP"\n";
+ /* Unfortunately, this doesn't work if the executable
+ * was deleted (as often happens during updates):
+ * with "file" directive, gdb will use specified file
+ * even if it is completely unrelated to the coredump */
+ /* fTmp << "file " << executable << '\n'; */
+ fTmp << "core-file " << pDebugDumpDir << "/"FILENAME_COREDUMP"\n";
fTmp << "thread apply all backtrace full\nq\n";
fTmp.close();
}
@@ -211,8 +216,8 @@ static std::string GetIndependentBacktrace(const std::string& pBacktrace)
while (*bk)
{
if (bk[0] == '#'
- && bk[1] >= '0' && bk[1] <= '4'
- && bk[2] == ' ' /* take only #0...#4 (5 last stack frames) */
+ && bk[1] >= '0' && bk[1] <= '7'
+ && bk[2] == ' ' /* take only #0...#7 (8 last stack frames) */
&& !in_quote
) {
if (in_header && !has_filename)