[Libreoffice-commits] online.git: loolwsd/Util.cpp
Ashod Nakashian
ashod.nakashian at collabora.co.uk
Sat Apr 30 14:37:09 UTC 2016
loolwsd/Util.cpp | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
New commits:
commit 5871ef32a946d1f33e276700102d7f8e8217ad2c
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date: Fri Apr 29 23:08:32 2016 -0400
loolwsd: log the pid in the backtrace
Change-Id: Ic0565f266f1ad56d855a76fb42fac8066066fd45
Reviewed-on: https://gerrit.libreoffice.org/24526
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
Tested-by: Ashod Nakashian <ashnakash at gmail.com>
diff --git a/loolwsd/Util.cpp b/loolwsd/Util.cpp
index 77cfb3d..519cb66 100644
--- a/loolwsd/Util.cpp
+++ b/loolwsd/Util.cpp
@@ -291,6 +291,9 @@ namespace Util
sigaction(signal, &action, NULL);
+ char header[32];
+ sprintf(header, "Backtrace %d:\n", getpid());
+
const int maxSlots = 50;
void *backtraceBuffer[maxSlots];
int numSlots = backtrace(backtraceBuffer, maxSlots);
@@ -300,7 +303,7 @@ namespace Util
if (symbols != NULL)
{
struct iovec ioVector[maxSlots*2+1];
- ioVector[0].iov_base = (void*)"Backtrace:\n";
+ ioVector[0].iov_base = (void*)header;
ioVector[0].iov_len = std::strlen((const char*)ioVector[0].iov_base);
for (int i = 0; i < numSlots; i++)
{
More information about the Libreoffice-commits
mailing list