[Libreoffice-commits] core.git: Branch 'feature/cib_contract935' - 3 commits - bin/symstore.sh include/sal sal/osl toolkit/source vcl/win
Thorsten Behrens
Thorsten.Behrens at CIB.de
Wed Mar 7 17:25:58 UTC 2018
Rebased ref, commits from common ancestor:
commit 08be86ed504a19510a811309156da858d882b5d4
Author: Thorsten Behrens <Thorsten.Behrens at CIB.de>
Date: Wed Mar 7 18:15:29 2018 +0100
sal: fix build after ports
Change-Id: I080ba9934e3e2b57c0fca37690cf3a12b9216d85
diff --git a/sal/osl/all/log.cxx b/sal/osl/all/log.cxx
index 566b4457c59f..1a48c3275705 100644
--- a/sal/osl/all/log.cxx
+++ b/sal/osl/all/log.cxx
@@ -20,8 +20,10 @@
#include <stdio.h>
#include <string.h>
+#include <fstream>
#include "osl/thread.hxx"
+#include "osl/process.h"
#include "rtl/string.h"
#include "rtl/ustring.hxx"
#include "sal/detail/log.h"
@@ -89,8 +91,8 @@ char const * getEnvironmentVariable() {
#else
-char const * getEnvironmentVariable_() {
- char const * p1 = std::getenv("SAL_LOG");
+char const * getEnvironmentVariable(const char* env) {
+ char const * p1 = std::getenv(env);
if (p1 == nullptr) {
return nullptr;
}
@@ -101,86 +103,7 @@ char const * getEnvironmentVariable_() {
return p2;
}
-char const * getEnvironmentVariable() {
- static char const * env = getEnvironmentVariable_();
- return env;
-}
-
-void maybeOutputTimestamp(std::ostringstream &s) {
- char const * env = getEnvironmentVariable();
- if (env == nullptr)
- return;
- bool outputTimestamp = false;
- bool outputRelativeTimer = false;
- for (char const * p = env;;) {
- switch (*p++) {
- case '\0':
- if (outputTimestamp) {
- char ts[100];
- TimeValue systemTime;
- osl_getSystemTime(&systemTime);
- TimeValue localTime;
- osl_getLocalTimeFromSystemTime(&systemTime, &localTime);
- oslDateTime dateTime;
- osl_getDateTimeFromTimeValue(&localTime, &dateTime);
- struct tm tm;
- tm.tm_sec = dateTime.Seconds;
- tm.tm_min = dateTime.Minutes;
- tm.tm_hour = dateTime.Hours;
- tm.tm_mday = dateTime.Day;
- tm.tm_mon = dateTime.Month - 1;
- tm.tm_year = dateTime.Year - 1900;
- strftime(ts, sizeof(ts), "%Y-%m-%d:%H:%M:%S", &tm);
- char milliSecs[10];
- sprintf(milliSecs, "%03d", static_cast<int>(dateTime.NanoSeconds/1000000));
- s << ts << '.' << milliSecs << ':';
- }
- if (outputRelativeTimer) {
- static bool beenHere = false;
- static TimeValue first;
- if (!beenHere) {
- osl_getSystemTime(&first);
- beenHere = true;
- }
- TimeValue now;
- osl_getSystemTime(&now);
- int seconds = now.Seconds - first.Seconds;
- int milliSeconds;
- if (now.Nanosec < first.Nanosec) {
- seconds--;
- milliSeconds = 1000-(first.Nanosec-now.Nanosec)/1000000;
- }
- else
- milliSeconds = (now.Nanosec-first.Nanosec)/1000000;
- char relativeTimestamp[100];
- sprintf(relativeTimestamp, "%d.%03d", seconds, milliSeconds);
- s << relativeTimestamp << ':';
- }
- return;
- case '+':
- {
- char const * p1 = p;
- while (*p1 != '.' && *p1 != '+' && *p1 != '-' && *p1 != '\0') {
- ++p1;
- }
- if (equalStrings(p, p1 - p, RTL_CONSTASCII_STRINGPARAM("TIMESTAMP")))
- outputTimestamp = true;
- else if (equalStrings(p, p1 - p, RTL_CONSTASCII_STRINGPARAM("RELATIVETIMER")))
- outputRelativeTimer = true;
- char const * p2 = p1;
- while (*p2 != '+' && *p2 != '-' && *p2 != '\0') {
- ++p2;
- }
- p = p2;
- }
- break;
- default:
- ; // nothing
- }
- }
- return;
-}
-
+#ifdef WNT
bool getValueFromLoggingIniFile(const char* key, char* value) {
rtl::OUString programDirectoryURL;
rtl::OUString programDirectoryPath;
@@ -208,33 +131,40 @@ bool getValueFromLoggingIniFile(const char* key, char* value) {
return true;
}
}
- return;
+ return false;
}
+#endif
char const * getLogLevel() {
// First check the environment variable, then the setting in logging.ini
- static char const * env = getEnvironmentVariable_("SAL_LOG");
+ static char const * env = getEnvironmentVariable("SAL_LOG");
if (env != nullptr)
return env;
+#ifdef WNT
static char logLevel[1024];
if (getValueFromLoggingIniFile("LogLevel", logLevel)) {
return logLevel;
}
+#endif
return nullptr;
}
char const * getLogFilePath() {
// First check the environment variable, then the setting in logging.ini
- static char const * logFile = getEnvironmentVariable_("SAL_LOG_FILE");
+ static char const * logFile = getEnvironmentVariable("SAL_LOG_FILE");
if (logFile != nullptr)
return logFile;
+#ifdef WNT
static char logFilePath[1024];
if (getValueFromLoggingIniFile("LogFilePath", logFilePath)) {
return logFilePath;
}
+#endif
+
+ return nullptr;
}
bool isDebug(sal_detail_LogLevel level) {
commit e66486a77e0bcad5e25d64e200e4ce15f0e4bb09
Author: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
Date: Fri Jan 27 16:57:49 2017 +0100
Symstore: Also add .exe and .dlls to symstore
These are needed when analyzing the minidump.
Change-Id: Ife296c298e3b2f1ca8a47dcbaaf1947e6aefdc81
Reviewed-on: https://gerrit.libreoffice.org/33631
Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
(cherry picked from commit 8a0416be440180d0a6cedd449307f6a9bde22eaa)
(cherry picked from commit ebe2acbebd8c7f375802f90a12b5d92691932194)
diff --git a/bin/symstore.sh b/bin/symstore.sh
index 56260c0b3906..b368eb3e6715 100755
--- a/bin/symstore.sh
+++ b/bin/symstore.sh
@@ -6,13 +6,17 @@ add_pdb()
type=$2
list=$3
for file in $(find "${INSTDIR}/" -name "*.${extension}"); do
+ # store dll/exe itself (needed for minidumps)
+ if [ -f "$file" ]; then
+ cygpath -w "$file" >> "$list"
+ fi
+ # store pdb file
filename=$(basename "$file" ".${extension}")
pdb="${WORKDIR}/LinkTarget/${type}/${filename}.pdb"
if [ -f "$pdb" ]; then
cygpath -w "$pdb" >> "$list"
fi
done
-
}
# check preconditions
commit c4ffb8be22a20a53edbaee8266345896b8e35a96
Author: Thorsten Behrens <Thorsten.Behrens at CIB.de>
Date: Wed Feb 1 03:29:18 2017 +0100
logging: add some strategic places around vcl messages
Change-Id: I3eb1076a0dd697ceb3b4310444542f324848b358
diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index 2ce662a6cca5..9048a0ee93dd 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -426,6 +426,8 @@ certain functionality.
@li @c vcl.filter
@li @c vcl.fonts - font-specific code
@li @c vcl.gdi - the GDI part of VCL, devices, bitmaps, etc.
+ at li @c vcl.gdi.wndproc - Windows Procedure part of VCL
+ at li @c vcl.gdi.opengl - the GDI part of VCL using opengl
@li @c vcl.gdi.fontmetric
@li @c vcl.gtk - Gtk+ 2/3 plugin
@li @c vcl.gtk3
diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx
index f8b90098c78f..977d24b31660 100644
--- a/toolkit/source/awt/vclxwindow.cxx
+++ b/toolkit/source/awt/vclxwindow.cxx
@@ -275,6 +275,8 @@ IMPL_LINK_NOARG(VCLXWindowImpl, OnProcessCallbacks, void*, void)
{
const Reference< uno::XInterface > xKeepAlive( mrAntiImpl );
+ SAL_INFO("toolkit.controls", "OnProcessCallbacks grabbing solarmutex");
+
// work on a copy of the callback array
CallbackArray aCallbacksCopy;
{
@@ -293,6 +295,7 @@ IMPL_LINK_NOARG(VCLXWindowImpl, OnProcessCallbacks, void*, void)
}
{
+ SAL_INFO("toolkit.controls", "OnProcessCallbacks relinquished solarmutex");
SolarMutexReleaser aReleaseSolar;
for ( CallbackArray::const_iterator loop = aCallbacksCopy.begin();
loop != aCallbacksCopy.end();
diff --git a/vcl/win/app/salinst.cxx b/vcl/win/app/salinst.cxx
index da67ca44582f..eafdc1354f38 100644
--- a/vcl/win/app/salinst.cxx
+++ b/vcl/win/app/salinst.cxx
@@ -672,6 +672,8 @@ LRESULT CALLBACK SalComWndProc( HWND, UINT nMsg, WPARAM wParam, LPARAM lParam, i
{
LRESULT nRet = 0;
+SAL_INFO("vcl.gdi.wndproc", "SalComWndProc(nMsg=" << nMsg << ", wParam=" << wParam << ", lParam=" << lParam << ")");
+
switch ( nMsg )
{
case SAL_MSG_THREADYIELD:
diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx
index e85c1594e548..9bb739096324 100644
--- a/vcl/win/window/salframe.cxx
+++ b/vcl/win/window/salframe.cxx
@@ -5473,6 +5473,8 @@ LRESULT CALLBACK SalFrameWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lP
static int bInWheelMsg = FALSE;
static int bInQueryEnd = FALSE;
+SAL_INFO("vcl.gdi.wndproc", "SalFrameWndProc(nMsg=" << nMsg << ", wParam=" << wParam << ", lParam=" << lParam << ")");
+
// By WM_CRETAE we connect the frame with the window handle
if ( nMsg == WM_CREATE )
{
More information about the Libreoffice-commits
mailing list