Kaydet (Commit) 85a52fbb authored tarafından Thomas Arnhold's avatar Thomas Arnhold Kaydeden (comit) Cédric Bosdonnat

Remove DBG_TRACE_BASIC, DBG_SAVE_DISASSEMBLY and sbtrace.hxx

üst 964f93e0
...@@ -36,7 +36,6 @@ ...@@ -36,7 +36,6 @@
#include "sb.hxx" #include "sb.hxx"
#include "iosys.hxx" #include "iosys.hxx"
#include "disas.hxx" #include "disas.hxx"
#include "sbtrace.hxx"
static const char* pOp1[] = { static const char* pOp1[] = {
...@@ -364,10 +363,6 @@ BOOL SbiDisas::DisasLine( String& rText ) ...@@ -364,10 +363,6 @@ BOOL SbiDisas::DisasLine( String& rText )
if( !Fetch() ) if( !Fetch() )
return FALSE; return FALSE;
#ifdef DBG_TRACE_BASIC
String aTraceStr_STMNT;
#endif
// New line? // New line?
if( eOp == _STMNT && nOp1 != nLine ) if( eOp == _STMNT && nOp1 != nLine )
{ {
...@@ -400,10 +395,6 @@ BOOL SbiDisas::DisasLine( String& rText ) ...@@ -400,10 +395,6 @@ BOOL SbiDisas::DisasLine( String& rText )
rText.AppendAscii( "; " ); rText.AppendAscii( "; " );
rText += s; rText += s;
rText.AppendAscii( _crlf() ); rText.AppendAscii( _crlf() );
#ifdef DBG_TRACE_BASIC
aTraceStr_STMNT = s;
#endif
} }
} }
...@@ -463,10 +454,6 @@ BOOL SbiDisas::DisasLine( String& rText ) ...@@ -463,10 +454,6 @@ BOOL SbiDisas::DisasLine( String& rText )
rText += aPCodeStr; rText += aPCodeStr;
#ifdef DBG_TRACE_BASIC
dbg_RegisterTraceTextForPC( pMod, nPC, aTraceStr_STMNT, aPCodeStr );
#endif
return TRUE; return TRUE;
} }
......
...@@ -45,7 +45,6 @@ ...@@ -45,7 +45,6 @@
#include "runtime.hxx" #include "runtime.hxx"
#include "token.hxx" #include "token.hxx"
#include "sbunoobj.hxx" #include "sbunoobj.hxx"
#include "sbtrace.hxx"
#include <svtools/syntaxhighlight.hxx> #include <svtools/syntaxhighlight.hxx>
...@@ -1121,9 +1120,6 @@ USHORT SbModule::Run( SbMethod* pMeth ) ...@@ -1121,9 +1120,6 @@ USHORT SbModule::Run( SbMethod* pMeth )
StarBASICRef xBasic; StarBASICRef xBasic;
if( bDelInst ) if( bDelInst )
{ {
#ifdef DBG_TRACE_BASIC
dbg_InitTrace();
#endif
// #32779: Hold Basic during the execution // #32779: Hold Basic during the execution
xBasic = (StarBASIC*) GetParent(); xBasic = (StarBASIC*) GetParent();
...@@ -1180,10 +1176,6 @@ USHORT SbModule::Run( SbMethod* pMeth ) ...@@ -1180,10 +1176,6 @@ USHORT SbModule::Run( SbMethod* pMeth )
pMOD = this; pMOD = this;
SbiRuntime* pRt = new SbiRuntime( this, pMeth, pMeth->nStart ); SbiRuntime* pRt = new SbiRuntime( this, pMeth, pMeth->nStart );
#ifdef DBG_TRACE_BASIC
dbg_traceNotifyCall( this, pMeth, pINST->nCallLvl );
#endif
pRt->pNext = pINST->pRun; pRt->pNext = pINST->pRun;
if( pRt->pNext ) if( pRt->pNext )
pRt->pNext->block(); pRt->pNext->block();
...@@ -1196,11 +1188,6 @@ USHORT SbModule::Run( SbMethod* pMeth ) ...@@ -1196,11 +1188,6 @@ USHORT SbModule::Run( SbMethod* pMeth )
if( pRt->pNext ) if( pRt->pNext )
pRt->pNext->unblock(); pRt->pNext->unblock();
#ifdef DBG_TRACE_BASIC
bool bLeave = true;
dbg_traceNotifyCall( this, pMeth, pINST->nCallLvl, bLeave );
#endif
// #63710 It can happen by an another thread handling at events, // #63710 It can happen by an another thread handling at events,
// that the show call returns to an dialog (by closing the // that the show call returns to an dialog (by closing the
// dialog per UI), before a by an event triggered further call returned, // dialog per UI), before a by an event triggered further call returned,
...@@ -1304,19 +1291,10 @@ void SbModule::RunInit() ...@@ -1304,19 +1291,10 @@ void SbModule::RunInit()
// The init code starts always here // The init code starts always here
SbiRuntime* pRt = new SbiRuntime( this, NULL, 0 ); SbiRuntime* pRt = new SbiRuntime( this, NULL, 0 );
#ifdef DBG_TRACE_BASIC
dbg_traceNotifyCall( this, NULL, 0 );
#endif
pRt->pNext = pINST->pRun; pRt->pNext = pINST->pRun;
pINST->pRun = pRt; pINST->pRun = pRt;
while( pRt->Step() ) {} while( pRt->Step() ) {}
#ifdef DBG_TRACE_BASIC
bool bLeave = true;
dbg_traceNotifyCall( this, NULL, 0, bLeave );
#endif
pINST->pRun = pRt->pNext; pINST->pRun = pRt->pNext;
delete pRt; delete pRt;
pMOD = pOldMod; pMOD = pOldMod;
......
This diff is collapsed.
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
#ifndef _SBTRACE_HXX
#define _SBTRACE_HXX
// #define DBG_TRACE_BASIC
#ifdef DBG_TRACE_BASIC
void dbg_InitTrace( void );
void dbg_traceStep( SbModule* pModule, UINT32 nPC, INT32 nCallLvl );
void dbg_traceNotifyCall( SbModule* pModule, SbMethod* pMethod, INT32 nCallLvl, bool bLeave = false );
void dbg_traceNotifyError( SbError nTraceErr, const String& aTraceErrMsg, bool bTraceErrHandled, INT32 nCallLvl );
void dbg_RegisterTraceTextForPC( SbModule* pModule, UINT32 nPC,
const String& aTraceStr_STMNT, const String& aTraceStr_PCode );
#endif
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -45,7 +45,6 @@ ...@@ -45,7 +45,6 @@
#include <com/sun/star/container/XEnumerationAccess.hpp> #include <com/sun/star/container/XEnumerationAccess.hpp>
#include "sbunoobj.hxx" #include "sbunoobj.hxx"
#include "errobject.hxx" #include "errobject.hxx"
#include "sbtrace.hxx"
SbxVariable* getDefaultProp( SbxVariable* pRef ); SbxVariable* getDefaultProp( SbxVariable* pRef );
...@@ -732,11 +731,6 @@ BOOL SbiRuntime::Step() ...@@ -732,11 +731,6 @@ BOOL SbiRuntime::Step()
Application::Reschedule(); Application::Reschedule();
} }
#ifdef DBG_TRACE_BASIC
UINT32 nPC = ( pCode - (const BYTE* )pImg->GetCode() );
dbg_traceStep( pMod, nPC, pINST->nCallLvl );
#endif
SbiOpcode eOp = (SbiOpcode ) ( *pCode++ ); SbiOpcode eOp = (SbiOpcode ) ( *pCode++ );
UINT32 nOp1, nOp2; UINT32 nOp1, nOp2;
if( eOp <= SbOP0_END ) if( eOp <= SbOP0_END )
...@@ -773,11 +767,6 @@ BOOL SbiRuntime::Step() ...@@ -773,11 +767,6 @@ BOOL SbiRuntime::Step()
// (insbesondere nicht nach Compiler-Fehlern zur Laufzeit) // (insbesondere nicht nach Compiler-Fehlern zur Laufzeit)
if( nError && bRun ) if( nError && bRun )
{ {
#ifdef DBG_TRACE_BASIC
SbError nTraceErr = nError;
String aTraceErrMsg = GetSbData()->aErrMsg;
bool bTraceErrHandled = true;
#endif
SbError err = nError; SbError err = nError;
ClearExprStack(); ClearExprStack();
nError = 0; nError = 0;
...@@ -858,19 +847,12 @@ BOOL SbiRuntime::Step() ...@@ -858,19 +847,12 @@ BOOL SbiRuntime::Step()
// Kein Error-Hdl gefunden -> altes Vorgehen // Kein Error-Hdl gefunden -> altes Vorgehen
else else
{ {
#ifdef DBG_TRACE_BASIC
bTraceErrHandled = false;
#endif
pInst->Abort(); pInst->Abort();
} }
// ALT: Nur // ALT: Nur
// pInst->Abort(); // pInst->Abort();
} }
#ifdef DBG_TRACE_BASIC
dbg_traceNotifyError( nTraceErr, aTraceErrMsg, bTraceErrHandled, pINST->nCallLvl );
#endif
} }
} }
return bRun; return bRun;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment