[Libreoffice-commits] core.git: 5 commits - solenv/bin solenv/gbuild solenv/gdb vcl/headless vcl/inc vcl/Library_vcl.mk vcl/StaticLibrary_headless.mk

Stephan Bergmann sbergman at redhat.com
Thu Jun 13 00:50:24 PDT 2013


 solenv/bin/gdb-core-bt.sh              |    2 
 solenv/gbuild/platform/com_GCC_defs.mk |    2 
 solenv/gbuild/platform/macosx.mk       |    4 
 solenv/gbuild/platform/solaris.mk      |   10 -
 solenv/gbuild/platform/unxgcc.mk       |    8 
 solenv/gdb/libreoffice/sal.py          |    3 
 vcl/Library_vcl.mk                     |    1 
 vcl/StaticLibrary_headless.mk          |    1 
 vcl/headless/svpbmp.cxx                |   40 ++++
 vcl/headless/svpelement.cxx            |  287 ---------------------------------
 vcl/headless/svpgdi.cxx                |    2 
 vcl/headless/svpvd.cxx                 |    1 
 vcl/inc/headless/svpbmp.hxx            |   13 -
 vcl/inc/headless/svpelement.hxx        |   40 ----
 vcl/inc/headless/svpframe.hxx          |    9 -
 vcl/inc/headless/svpgdi.hxx            |    1 
 vcl/inc/headless/svpvd.hxx             |    8 
 17 files changed, 60 insertions(+), 372 deletions(-)

New commits:
commit 7142090557362ebf5314573317a68132383c460c
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Jun 13 09:46:40 2013 +0200

    Remove dead code related to unused WITH_SVP_LISTENING
    
    Change-Id: I8a12d0ea18a60541d9a11db26cc417a190443ff4

diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index 761f497..45bdcfd 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -496,7 +496,6 @@ vcl_generic_code= \
 vcl_headless_code= \
     vcl/headless/svpbmp \
     vcl/headless/svpdummies \
-    vcl/headless/svpelement \
     vcl/headless/svpframe \
     vcl/headless/svpgdi \
     vcl/headless/svpinst \
diff --git a/vcl/StaticLibrary_headless.mk b/vcl/StaticLibrary_headless.mk
index a64d9d4..1b63851 100644
--- a/vcl/StaticLibrary_headless.mk
+++ b/vcl/StaticLibrary_headless.mk
@@ -22,7 +22,6 @@ $(eval $(call gb_StaticLibrary_use_api,headless,\
 $(eval $(call gb_StaticLibrary_add_exception_objects,headless,\
 	vcl/headless/svpbmp \
 	vcl/headless/svpdummies \
-	vcl/headless/svpelement \
 	vcl/headless/svpframe \
 	vcl/headless/svpprn \
 	vcl/headless/svptext \
diff --git a/vcl/headless/svpbmp.cxx b/vcl/headless/svpbmp.cxx
index 0b5eb52..cd5a2f9 100644
--- a/vcl/headless/svpbmp.cxx
+++ b/vcl/headless/svpbmp.cxx
@@ -349,5 +349,45 @@ bool SvpSalBitmap::GetSystemData( BitmapSystemData& )
     return false;
 }
 
+sal_uInt32 SvpSalBitmap::getBitCountFromScanlineFormat( sal_Int32 nFormat )
+{
+    sal_uInt32 nBitCount = 1;
+    switch( nFormat )
+    {
+        case Format::ONE_BIT_MSB_GREY:
+        case Format::ONE_BIT_LSB_GREY:
+        case Format::ONE_BIT_MSB_PAL:
+        case Format::ONE_BIT_LSB_PAL:
+            nBitCount = 1;
+            break;
+        case Format::FOUR_BIT_MSB_GREY:
+        case Format::FOUR_BIT_LSB_GREY:
+        case Format::FOUR_BIT_MSB_PAL:
+        case Format::FOUR_BIT_LSB_PAL:
+            nBitCount = 4;
+            break;
+        case Format::EIGHT_BIT_PAL:
+        case Format::EIGHT_BIT_GREY:
+            nBitCount = 8;
+            break;
+        case Format::SIXTEEN_BIT_LSB_TC_MASK:
+        case Format::SIXTEEN_BIT_MSB_TC_MASK:
+            nBitCount = 16;
+            break;
+        case Format::TWENTYFOUR_BIT_TC_MASK:
+            nBitCount = 24;
+            break;
+        case Format::THIRTYTWO_BIT_TC_MASK_BGRA:
+        case Format::THIRTYTWO_BIT_TC_MASK_ARGB:
+        case Format::THIRTYTWO_BIT_TC_MASK_ABGR:
+        case Format::THIRTYTWO_BIT_TC_MASK_RGBA:
+            nBitCount = 32;
+            break;
+        default:
+        OSL_FAIL( "unsupported basebmp format" );
+        break;
+    }
+    return nBitCount;
+}
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/headless/svpelement.cxx b/vcl/headless/svpelement.cxx
deleted file mode 100644
index 8b6f360..0000000
--- a/vcl/headless/svpelement.cxx
+++ /dev/null
@@ -1,287 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#include "headless/svpelement.hxx"
-
-#include <basebmp/scanlineformats.hxx>
-#include <osl/diagnose.h>
-
-#if defined WITH_SVP_LISTENING
-#include <osl/thread.h>
-#include <vcl/svapp.hxx>
-#include <rtl/strbuf.hxx>
-#include <vcl/bitmap.hxx>
-#include <tools/stream.hxx>
-
-#include "headless/svpvd.hxx"
-#include "headless/svpbmp.hxx"
-#include "headless/svpframe.hxx"
-
-#include <list>
-#include <boost/unordered_map.hpp>
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/ip.h>
-#include <stdio.h>
-#include <errno.h>
-
-using namespace basegfx;
-
-class SvpElementContainer
-{
-    std::list< SvpElement* >        m_aElements;
-    int                             m_nSocket;
-    oslThread                       m_aThread;
-
-    SvpElementContainer();
-    ~SvpElementContainer();
-    public:
-    void registerElement( SvpElement* pElement ) { m_aElements.push_back(pElement); }
-    void deregisterElement( SvpElement* pElement ) { m_aElements.remove(pElement); }
-
-    void run();
-    DECL_LINK(processRequest,void*);
-
-    static SvpElementContainer& get();
-};
-
-extern "C" void SAL_CALL SvpContainerThread( void* );
-
-SvpElementContainer& SvpElementContainer::get()
-{
-    static SvpElementContainer* pInstance = new SvpElementContainer();
-    return *pInstance;
-}
-
-SvpElementContainer::SvpElementContainer()
-{
-    static const char* pEnv = getenv("SVP_LISTENER_PORT");
-    int nPort = (pEnv && *pEnv) ? atoi(pEnv) : 8000;
-    m_nSocket = socket( PF_INET, SOCK_STREAM, 0 );
-    if( m_nSocket >= 0)
-    {
-        int nOn = 1;
-        if( setsockopt(m_nSocket, SOL_SOCKET, SO_REUSEADDR,
-                       (char*)&nOn, sizeof(nOn)) )
-        {
-            perror( "SvpElementContainer: changing socket options failed" );
-            close( m_nSocket );
-        }
-        else
-        {
-            struct sockaddr_in addr;
-            memset(&addr, 0, sizeof(struct sockaddr_in));
-            addr.sin_family = AF_INET;
-            addr.sin_port = htons(nPort);
-            addr.sin_addr.s_addr = INADDR_ANY;
-            if( bind(m_nSocket,(struct sockaddr*)&addr,sizeof(addr)) )
-            {
-                perror( "SvpElementContainer: bind() failed" );
-                close( m_nSocket );
-            }
-            else
-            {
-                if( listen( m_nSocket, 0 ) )
-                {
-                    perror( "SvpElementContainer: listen() failed" );
-                    close(m_nSocket);
-                }
-                else
-                {
-                    m_aThread = osl_createThread( SvpContainerThread, this );
-                }
-            }
-        }
-    }
-    else
-        perror( "SvpElementContainer: socket() failed\n" );
-}
-
-SvpElementContainer::~SvpElementContainer()
-{
-}
-
-void SAL_CALL SvpContainerThread(void* pSvpContainer)
-{
-    ((SvpElementContainer*)pSvpContainer)->run();
-}
-
-void SvpElementContainer::run()
-{
-    bool bRun = m_nSocket != 0;
-    while( bRun )
-    {
-        int nLocalSocket = accept( m_nSocket, NULL, NULL );
-        if( nLocalSocket < 0 )
-        {
-            bRun = false;
-            perror( "accept() failed" );
-        }
-        else
-        {
-            Application::PostUserEvent( LINK( this, SvpElementContainer, processRequest ), (void*)nLocalSocket );
-        }
-    }
-    if( m_nSocket )
-        close( m_nSocket );
-}
-
-static const char* matchType( SvpElement* pEle )
-{
-    if( dynamic_cast<SvpSalBitmap*>(pEle) )
-        return "Bitmap";
-    else if( dynamic_cast<SvpSalFrame*>(pEle) )
-        return "Frame";
-    else if( dynamic_cast<SvpSalVirtualDevice*>(pEle) )
-        return "VirtualDevice";
-    return typeid(*pEle).name();
-}
-
-IMPL_LINK( SvpElementContainer, processRequest, void*, pSocket )
-{
-    int nFile = (int)pSocket;
-
-    OStringBuffer aBuf( 256 ), aAnswer( 256 );
-    char c;
-    while( read( nFile, &c, 1 ) && c != '\n' )
-        aBuf.append( sal_Char(c) );
-    OString aCommand( aBuf.makeStringAndClear() );
-    if( aCommand.startsWith( "list" ) )
-    {
-        boost::unordered_map< OString, std::list<SvpElement*>, OStringHash > aMap;
-        for( std::list< SvpElement* >::const_iterator it = m_aElements.begin();
-             it != m_aElements.end(); ++it )
-        {
-            std::list<SvpElement*>& rList = aMap[matchType(*it)];
-            rList.push_back( *it );
-        }
-        for( boost::unordered_map< OString, std::list<SvpElement*>, OStringHash>::const_iterator hash_it = aMap.begin();
-             hash_it != aMap.end(); ++hash_it )
-        {
-            aAnswer.append( "ElementType: " );
-            aAnswer.append( hash_it->first );
-            aAnswer.append( '\n' );
-            for( std::list<SvpElement*>::const_iterator it = hash_it->second.begin();
-                 it != hash_it->second.end(); ++it )
-            {
-                aAnswer.append( sal_Int64(reinterpret_cast<sal_uInt32>(*it)), 16 );
-                aAnswer.append( '\n' );
-            }
-        }
-    }
-    else if( aCommand.startsWith( "get" ) )
-    {
-        sal_IntPtr aId = aCommand.copy( 3 ).toInt64( 16 );
-        SvpElement* pElement = reinterpret_cast<SvpElement*>(aId);
-        for( std::list< SvpElement* >::const_iterator it = m_aElements.begin();
-             it != m_aElements.end(); ++it )
-        {
-            if( *it == pElement )
-            {
-                const basebmp::BitmapDeviceSharedPtr& rDevice = pElement->getDevice();
-                if( rDevice.get() )
-                {
-                    SvpSalBitmap* pSalBitmap = new SvpSalBitmap();
-                    pSalBitmap->setBitmap( rDevice );
-                    Bitmap aBitmap( pSalBitmap );
-                    SvMemoryStream aStream( 256, 256 );
-                    aStream << aBitmap;
-                    aStream.Seek( STREAM_SEEK_TO_END );
-                    int nBytes = aStream.Tell();
-                    aStream.Seek( STREAM_SEEK_TO_BEGIN );
-                    aAnswer.append( (const sal_Char*)aStream.GetData(), nBytes );
-                }
-                break;
-            }
-        }
-    }
-    else if( aCommand.startsWith( "quit" ) )
-    {
-        Application::Quit();
-        close( m_nSocket );
-        m_nSocket = 0;
-    }
-    write( nFile, aAnswer.getStr(), aAnswer.getLength() );
-    close( nFile );
-
-    return 0;
-}
-
-#endif
-
-using namespace basebmp;
-
-SvpElement::SvpElement()
-{
-    #if defined WITH_SVP_LISTENING
-    SvpElementContainer::get().registerElement( this );
-    #endif
-}
-
-SvpElement::~SvpElement()
-{
-    #if defined WITH_SVP_LISTENING
-    SvpElementContainer::get().deregisterElement( this );
-    #endif
-}
-
-sal_uInt32 SvpElement::getBitCountFromScanlineFormat( sal_Int32 nFormat )
-{
-    sal_uInt32 nBitCount = 1;
-    switch( nFormat )
-    {
-        case Format::ONE_BIT_MSB_GREY:
-        case Format::ONE_BIT_LSB_GREY:
-        case Format::ONE_BIT_MSB_PAL:
-        case Format::ONE_BIT_LSB_PAL:
-            nBitCount = 1;
-            break;
-        case Format::FOUR_BIT_MSB_GREY:
-        case Format::FOUR_BIT_LSB_GREY:
-        case Format::FOUR_BIT_MSB_PAL:
-        case Format::FOUR_BIT_LSB_PAL:
-            nBitCount = 4;
-            break;
-        case Format::EIGHT_BIT_PAL:
-        case Format::EIGHT_BIT_GREY:
-            nBitCount = 8;
-            break;
-        case Format::SIXTEEN_BIT_LSB_TC_MASK:
-        case Format::SIXTEEN_BIT_MSB_TC_MASK:
-            nBitCount = 16;
-            break;
-        case Format::TWENTYFOUR_BIT_TC_MASK:
-            nBitCount = 24;
-            break;
-        case Format::THIRTYTWO_BIT_TC_MASK_BGRA:
-        case Format::THIRTYTWO_BIT_TC_MASK_ARGB:
-        case Format::THIRTYTWO_BIT_TC_MASK_ABGR:
-        case Format::THIRTYTWO_BIT_TC_MASK_RGBA:
-            nBitCount = 32;
-            break;
-        default:
-        OSL_FAIL( "unsupported basebmp format" );
-        break;
-    }
-    return nBitCount;
-}
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx
index baab42e..5fd68ec 100644
--- a/vcl/headless/svpgdi.cxx
+++ b/vcl/headless/svpgdi.cxx
@@ -131,7 +131,7 @@ void SvpSalGraphics::GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY )
 
 sal_uInt16 SvpSalGraphics::GetBitCount() const
 {
-    return SvpElement::getBitCountFromScanlineFormat( m_aDevice->getScanlineFormat() );
+    return SvpSalBitmap::getBitCountFromScanlineFormat( m_aDevice->getScanlineFormat() );
 }
 
 long SvpSalGraphics::GetGraphicsWidth() const
diff --git a/vcl/headless/svpvd.cxx b/vcl/headless/svpvd.cxx
index 0ae7947..9908485 100644
--- a/vcl/headless/svpvd.cxx
+++ b/vcl/headless/svpvd.cxx
@@ -17,6 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include "headless/svpbmp.hxx"
 #include "headless/svpvd.hxx"
 #include "headless/svpgdi.hxx"
 
diff --git a/vcl/inc/headless/svpbmp.hxx b/vcl/inc/headless/svpbmp.hxx
index 9acc4b0..f769cf5 100644
--- a/vcl/inc/headless/svpbmp.hxx
+++ b/vcl/inc/headless/svpbmp.hxx
@@ -20,10 +20,15 @@
 #ifndef SVP_SVBMP_HXX
 #define SVP_SVBMP_HXX
 
+#include "sal/config.h"
+
+#include "basebmp/bitmapdevice.hxx"
+
 #include <salbmp.hxx>
-#include "svpelement.hxx"
 
-class SvpSalBitmap : public SalBitmap, public SvpElement
+#define SVP_DEFAULT_BITMAP_FORMAT basebmp::Format::TWENTYFOUR_BIT_TC_MASK
+
+class SvpSalBitmap : public SalBitmap
 {
     basebmp::BitmapDeviceSharedPtr     m_aBitmap;
 public:
@@ -33,9 +38,6 @@ public:
     const basebmp::BitmapDeviceSharedPtr& getBitmap() const { return m_aBitmap; }
     void setBitmap( const basebmp::BitmapDeviceSharedPtr& rSrc ) { m_aBitmap = rSrc; }
 
-    // SvpElement
-    virtual const basebmp::BitmapDeviceSharedPtr& getDevice() const { return m_aBitmap; }
-
     // SalBitmap
     virtual bool            Create( const Size& rSize,
                                     sal_uInt16 nBitCount,
@@ -56,6 +58,7 @@ public:
     virtual void            ReleaseBuffer( BitmapBuffer* pBuffer, bool bReadOnly );
     virtual bool            GetSystemData( BitmapSystemData& rData );
 
+    static sal_uInt32 getBitCountFromScanlineFormat( sal_Int32 nFormat );
 };
 
 #endif
diff --git a/vcl/inc/headless/svpelement.hxx b/vcl/inc/headless/svpelement.hxx
deleted file mode 100644
index 42c1881..0000000
--- a/vcl/inc/headless/svpelement.hxx
+++ /dev/null
@@ -1,40 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef _SVP_SVPELEMENT_HXX
-#define _SVP_SVPELEMENT_HXX
-
-#include <basebmp/bitmapdevice.hxx>
-
-#define SVP_DEFAULT_BITMAP_FORMAT basebmp::Format::TWENTYFOUR_BIT_TC_MASK
-
-class SvpElement
-{
-    protected:
-    SvpElement();
-    virtual ~SvpElement();
-    public:
-    virtual const basebmp::BitmapDeviceSharedPtr& getDevice() const = 0;
-
-    static sal_uInt32 getBitCountFromScanlineFormat( sal_Int32 nFormat );
-};
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/headless/svpframe.hxx b/vcl/inc/headless/svpframe.hxx
index 112e552..4a052c0 100644
--- a/vcl/inc/headless/svpframe.hxx
+++ b/vcl/inc/headless/svpframe.hxx
@@ -21,9 +21,9 @@
 
 #include <vcl/sysdata.hxx>
 #include <basegfx/range/b2ibox.hxx>
+#include <basebmp/bitmapdevice.hxx>
 
 #include <salframe.hxx>
-#include "svpelement.hxx"
 
 #include <list>
 
@@ -34,7 +34,7 @@
 class SvpSalInstance;
 class SvpSalGraphics;
 
-class SvpSalFrame : public SalFrame, public SvpElement
+class SvpSalFrame : public SalFrame
 {
     SvpSalInstance*                     m_pInstance;
     SvpSalFrame*                        m_pParent;       // pointer to parent frame
@@ -69,8 +69,9 @@ public:
     void PostPaint(bool bImmediate) const;
     void AllocateFrame();
 
-    // SvpElement
-    virtual const basebmp::BitmapDeviceSharedPtr& getDevice() const { return m_aFrame; }
+#if defined IOS || defined ANDROID
+    const basebmp::BitmapDeviceSharedPtr& getDevice() const { return m_aFrame; }
+#endif
 
     // SalFrame
     virtual SalGraphics*        GetGraphics();
diff --git a/vcl/inc/headless/svpgdi.hxx b/vcl/inc/headless/svpgdi.hxx
index be80d29..2757899 100644
--- a/vcl/inc/headless/svpgdi.hxx
+++ b/vcl/inc/headless/svpgdi.hxx
@@ -104,7 +104,6 @@ public:
     SvpSalGraphics();
     virtual ~SvpSalGraphics();
 
-    const basebmp::BitmapDeviceSharedPtr& getDevice() const { return m_aDevice; }
     void setDevice( basebmp::BitmapDeviceSharedPtr& rDevice );
 
     virtual void            GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY );
diff --git a/vcl/inc/headless/svpvd.hxx b/vcl/inc/headless/svpvd.hxx
index 8650a01..2bb850d 100644
--- a/vcl/inc/headless/svpvd.hxx
+++ b/vcl/inc/headless/svpvd.hxx
@@ -21,7 +21,6 @@
 #define _SVP_SVPVD_HXX
 
 #include <salvd.hxx>
-#include "svpelement.hxx"
 
 #include <list>
 
@@ -31,19 +30,16 @@
 
 class SvpSalGraphics;
 
-class SvpSalVirtualDevice : public SalVirtualDevice, public SvpElement
+class SvpSalVirtualDevice : public SalVirtualDevice
 {
     sal_uInt16                          m_nBitCount;
     basebmp::BitmapDeviceSharedPtr      m_aDevice;
     std::list< SvpSalGraphics* >        m_aGraphics;
 
 public:
-    SvpSalVirtualDevice( sal_uInt16 nBitCount ) : SvpElement(), m_nBitCount(nBitCount) {}
+    SvpSalVirtualDevice( sal_uInt16 nBitCount ) : m_nBitCount(nBitCount) {}
     virtual ~SvpSalVirtualDevice();
 
-    // SvpElement
-    virtual const basebmp::BitmapDeviceSharedPtr& getDevice() const { return m_aDevice; }
-
     // SalVirtualDevice
     virtual SalGraphics*    GetGraphics();
     virtual void            ReleaseGraphics( SalGraphics* pGraphics );
commit 42bb40a7ed0009d5c70ebf1e32d033b137203223
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Jun 12 16:14:44 2013 +0200

    Enable -fstrict-aliasing, -fstrict-overflow in -O0 debug builds
    
    ...so that -Wstrict-aliasing, -Wstrict-overflow=1 included in -Wall do not only
    produce warnings/errors in non-debug builds.
    
    Change-Id: I4534427738fa7688853564e8c7255a0c3cd199e1

diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk
index 47f7191..25b52c9 100644
--- a/solenv/gbuild/platform/com_GCC_defs.mk
+++ b/solenv/gbuild/platform/com_GCC_defs.mk
@@ -124,7 +124,7 @@ gb_NoexPrecompiledHeader_NOEXCEPTIONFLAGS := $(gb_LinkTarget_NOEXCEPTIONFLAGS)
 
 # optimization level
 gb_COMPILEROPTFLAGS := $(gb_COMPILERDEFAULTOPTFLAGS)
-gb_COMPILERNOOPTFLAGS := -O0
+gb_COMPILERNOOPTFLAGS := -O0 -fstrict-aliasing -fstrict-overflow
 
 # Clang does not know -ggdb2 or some other options
 ifeq ($(HAVE_GCC_GGDB2),TRUE)
commit 64600ceed4ea2091eab2ea6691ec39e575108196
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Jun 12 16:13:03 2013 +0200

    gb_COMPILERNOOPTFLAGS, gb_COMPLEROPTFLAGS, gb_DEBUG_CFLAGS all already defined
    
    ...in com_GCC_defs.mk
    
    Change-Id: I0a3b29e1a91acf3425afa44dea0353bebf88f58f

diff --git a/solenv/gbuild/platform/macosx.mk b/solenv/gbuild/platform/macosx.mk
index f7ecb71..1becf71 100644
--- a/solenv/gbuild/platform/macosx.mk
+++ b/solenv/gbuild/platform/macosx.mk
@@ -84,10 +84,6 @@ gb_OBJCFLAGS := -x objective-c -fobjc-exceptions
 gb_LinkTarget_LDFLAGS := \
 	$(SOLARLIB) \
 
-gb_DEBUG_CFLAGS := -g
-gb_COMPILEROPTFLAGS := -O2
-gb_COMPILERNOOPTFLAGS := -O0
-
 # LinkTarget class
 
 define gb_LinkTarget__get_rpath_for_layer
diff --git a/solenv/gbuild/platform/solaris.mk b/solenv/gbuild/platform/solaris.mk
index 5dfb5ac..38a7f1b 100644
--- a/solenv/gbuild/platform/solaris.mk
+++ b/solenv/gbuild/platform/solaris.mk
@@ -142,16 +142,6 @@ else
 gb_LINKEROPTFLAGS := -Wl,-O1
 endif
 
-gb_DEBUG_CFLAGS := -ggdb2 -finline-limit=0 -fno-inline -fno-default-inline
-
-ifneq ($(gb_DEBUGLEVEL),0)
-gb_COMPILEROPTFLAGS :=
-else
-gb_COMPILEROPTFLAGS := $(gb_COMPILERDEFAULTOPTFLAGS)
-endif
-
-gb_COMPILERNOOPTFLAGS := -O0
-
 # LinkTarget class
 
 define gb_LinkTarget__get_rpath_for_layer
diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk
index 9b017ba..4283a04 100644
--- a/solenv/gbuild/platform/unxgcc.mk
+++ b/solenv/gbuild/platform/unxgcc.mk
@@ -137,14 +137,6 @@ else
 gb_LINKEROPTFLAGS := -Wl,-O1
 endif
 
-ifneq ($(gb_DEBUGLEVEL),0)
-gb_COMPILEROPTFLAGS :=
-else
-gb_COMPILEROPTFLAGS := $(gb_COMPILERDEFAULTOPTFLAGS)
-endif
-
-gb_COMPILERNOOPTFLAGS := -O0
-
 ifeq ($(gb_SYMBOL),$(true))
 gb_LINKERSTRIPDEBUGFLAGS :=
 else
commit 5ccbd3f5c3adba28aadb00a28b8a80d4c1ef46e8
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Jun 12 16:11:20 2013 +0200

    Generate full backtraces, including local variables
    
    Change-Id: Ia655865b621b1c8e37a52715b89534a00dcda1d7

diff --git a/solenv/bin/gdb-core-bt.sh b/solenv/bin/gdb-core-bt.sh
index 2f205be..69ce22b 100755
--- a/solenv/bin/gdb-core-bt.sh
+++ b/solenv/bin/gdb-core-bt.sh
@@ -22,7 +22,7 @@ then
         echo "It looks like ${EXECUTABLE} generated a core file at ${COREFILE}"
         echo "Backtraces:"
         GDBCOMMANDFILE=`mktemp`
-        echo "thread apply all backtrace" > "$GDBCOMMANDFILE"
+        echo "thread apply all backtrace full" > "$GDBCOMMANDFILE"
         gdb -x "$GDBCOMMANDFILE" --batch "$EXECUTABLE" "$COREFILE"
         rm "$GDBCOMMANDFILE"
         echo
commit 8790f80d68cca7a894164ad84363b42332a1b6ec
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Jun 12 16:08:42 2013 +0200

    Only print the rtl::Reference's pointer
    
    ...but do not pretty-print its dereferenced value.  This is in line with the
    handling of css::uno::Reference, and avoids gdb Python exceptions when trying to
    print uninitialized rtl::Reference instances (which can e.g. happen during a
    "backtrace full").
    
    Change-Id: I9a3c0a6441cf23cba748183226832d2ba23bd531

diff --git a/solenv/gdb/libreoffice/sal.py b/solenv/gdb/libreoffice/sal.py
index c7f4d7c..8b4f0cb 100644
--- a/solenv/gdb/libreoffice/sal.py
+++ b/solenv/gdb/libreoffice/sal.py
@@ -68,8 +68,7 @@ class RtlReferencePrinter(object):
     def to_string(self):
         pointee = self.val['m_pBody']
         if pointee:
-            val = pointee.dereference()
-            return '%s to %s' % (self.typename, str(val))
+            return '%s to %s' % (self.typename, str(pointee))
         else:
             return "empty %s" % self.typename
 


More information about the Libreoffice-commits mailing list