Cleanup of trace logs from Simon Richter.
This commit is contained in:
parent
45d1c19eb7
commit
3be876c388
|
@ -1,270 +1,272 @@
|
||||||
/*
|
/*
|
||||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2018 Wayne Stambaugh <stambaughw@gmail.com>
|
* Copyright (C) 2018 Wayne Stambaugh <stambaughw@gmail.com>
|
||||||
* Copyright (C) 2018 KiCad Developers, see change_log.txt for contributors.
|
* Copyright (C) 2018 KiCad Developers, see change_log.txt for contributors.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
* as published by the Free Software Foundation; either version 2
|
* as published by the Free Software Foundation; either version 2
|
||||||
* of the License, or (at your option) any later version.
|
* of the License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, you may find one here:
|
* along with this program; if not, you may find one here:
|
||||||
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||||
* or you may search the http://www.gnu.org website for the version 2 license,
|
* or you may search the http://www.gnu.org website for the version 2 license,
|
||||||
* or you may write to the Free Software Foundation, Inc.,
|
* or you may write to the Free Software Foundation, Inc.,
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file trace_helpers.cpp
|
* @file trace_helpers.cpp
|
||||||
* @brief wxLogTrace helper implementation.
|
* @brief wxLogTrace helper implementation.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <wx/defs.h>
|
#include <wx/defs.h>
|
||||||
#include <wx/string.h>
|
#include <wx/string.h>
|
||||||
#include <wx/event.h>
|
#include <wx/event.h>
|
||||||
#include <wx/arrstr.h>
|
#include <wx/arrstr.h>
|
||||||
|
|
||||||
|
#include <trace_helpers.h>
|
||||||
const wxChar* traceFindReplace = wxT( "KICAD_FIND_REPLACE" );
|
|
||||||
const wxChar* kicadTraceCoords = wxT( "KICAD_COORDS" );
|
|
||||||
const wxChar* kicadTraceKeyEvent = wxT( "KICAD_KEY_EVENTS" );
|
const wxChar* const traceFindReplace = wxT( "KICAD_FIND_REPLACE" );
|
||||||
const wxChar* traceSchLibMem = wxT( "KICAD_SCH_LIB_MEM" );
|
const wxChar* const kicadTraceCoords = wxT( "KICAD_COORDS" );
|
||||||
const wxChar* traceFindItem = wxT( "KICAD_FIND_ITEM" );
|
const wxChar* const kicadTraceKeyEvent = wxT( "KICAD_KEY_EVENTS" );
|
||||||
const wxChar* traceSchLegacyPlugin = wxT( "KICAD_SCH_LEGACY_PLUGIN" );
|
const wxChar* const traceSchLibMem = wxT( "KICAD_SCH_LIB_MEM" );
|
||||||
const wxChar* traceGedaPcbPlugin = wxT( "KICAD_GEDA_PLUGIN" );
|
const wxChar* const traceFindItem = wxT( "KICAD_FIND_ITEM" );
|
||||||
const wxChar* traceKicadPcbPlugin = wxT( "KICAD_PCB_PLUGIN" );
|
const wxChar* const traceSchLegacyPlugin = wxT( "KICAD_SCH_LEGACY_PLUGIN" );
|
||||||
const wxChar* tracePrinting = wxT( "KICAD_PRINT" );
|
const wxChar* const traceGedaPcbPlugin = wxT( "KICAD_GEDA_PLUGIN" );
|
||||||
const wxChar* traceAutoSave = wxT( "KICAD_AUTOSAVE" );
|
const wxChar* const traceKicadPcbPlugin = wxT( "KICAD_PCB_PLUGIN" );
|
||||||
|
const wxChar* const tracePrinting = wxT( "KICAD_PRINT" );
|
||||||
|
const wxChar* const traceAutoSave = wxT( "KICAD_AUTOSAVE" );
|
||||||
wxString dump( const wxArrayString& aArray )
|
|
||||||
{
|
|
||||||
wxString tmp;
|
wxString dump( const wxArrayString& aArray )
|
||||||
|
{
|
||||||
for( unsigned i = 0; i < aArray.GetCount(); i++ )
|
wxString tmp;
|
||||||
{
|
|
||||||
if( aArray[i].IsEmpty() )
|
for( unsigned i = 0; i < aArray.GetCount(); i++ )
|
||||||
tmp << wxT( "\"\" " );
|
{
|
||||||
else
|
if( aArray[i].IsEmpty() )
|
||||||
tmp << aArray[i] << wxT( " " );
|
tmp << wxT( "\"\" " );
|
||||||
}
|
else
|
||||||
|
tmp << aArray[i] << wxT( " " );
|
||||||
return tmp;
|
}
|
||||||
}
|
|
||||||
|
return tmp;
|
||||||
|
}
|
||||||
// The following code was shamelessly copied from the wxWidgets keyboard sample
|
|
||||||
// at https://github.com/wxWidgets/wxWidgets/blob/master/samples/keyboard/keyboard.cpp.
|
|
||||||
|
// The following code was shamelessly copied from the wxWidgets keyboard sample
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
// at https://github.com/wxWidgets/wxWidgets/blob/master/samples/keyboard/keyboard.cpp.
|
||||||
// Author: Vadim Zeitlin
|
|
||||||
// Modified by: Marcin Wojdyr
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Created: 07.04.02
|
// Author: Vadim Zeitlin
|
||||||
// Copyright: (c) 2002 Vadim Zeitlin
|
// Modified by: Marcin Wojdyr
|
||||||
// Licence: wxWindows licence
|
// Created: 07.04.02
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
// Copyright: (c) 2002 Vadim Zeitlin
|
||||||
|
// Licence: wxWindows licence
|
||||||
// helper function that returns textual description of wx virtual keycode
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
const char* GetVirtualKeyCodeName(int keycode)
|
|
||||||
{
|
// helper function that returns textual description of wx virtual keycode
|
||||||
switch ( keycode )
|
const char* GetVirtualKeyCodeName(int keycode)
|
||||||
{
|
{
|
||||||
#define WXK_(x) \
|
switch ( keycode )
|
||||||
case WXK_##x: return #x;
|
{
|
||||||
|
#define WXK_(x) \
|
||||||
WXK_(BACK)
|
case WXK_##x: return #x;
|
||||||
WXK_(TAB)
|
|
||||||
WXK_(RETURN)
|
WXK_(BACK)
|
||||||
WXK_(ESCAPE)
|
WXK_(TAB)
|
||||||
WXK_(SPACE)
|
WXK_(RETURN)
|
||||||
WXK_(DELETE)
|
WXK_(ESCAPE)
|
||||||
WXK_(START)
|
WXK_(SPACE)
|
||||||
WXK_(LBUTTON)
|
WXK_(DELETE)
|
||||||
WXK_(RBUTTON)
|
WXK_(START)
|
||||||
WXK_(CANCEL)
|
WXK_(LBUTTON)
|
||||||
WXK_(MBUTTON)
|
WXK_(RBUTTON)
|
||||||
WXK_(CLEAR)
|
WXK_(CANCEL)
|
||||||
WXK_(SHIFT)
|
WXK_(MBUTTON)
|
||||||
WXK_(ALT)
|
WXK_(CLEAR)
|
||||||
WXK_(CONTROL)
|
WXK_(SHIFT)
|
||||||
WXK_(MENU)
|
WXK_(ALT)
|
||||||
WXK_(PAUSE)
|
WXK_(CONTROL)
|
||||||
WXK_(CAPITAL)
|
WXK_(MENU)
|
||||||
WXK_(END)
|
WXK_(PAUSE)
|
||||||
WXK_(HOME)
|
WXK_(CAPITAL)
|
||||||
WXK_(LEFT)
|
WXK_(END)
|
||||||
WXK_(UP)
|
WXK_(HOME)
|
||||||
WXK_(RIGHT)
|
WXK_(LEFT)
|
||||||
WXK_(DOWN)
|
WXK_(UP)
|
||||||
WXK_(SELECT)
|
WXK_(RIGHT)
|
||||||
WXK_(PRINT)
|
WXK_(DOWN)
|
||||||
WXK_(EXECUTE)
|
WXK_(SELECT)
|
||||||
WXK_(SNAPSHOT)
|
WXK_(PRINT)
|
||||||
WXK_(INSERT)
|
WXK_(EXECUTE)
|
||||||
WXK_(HELP)
|
WXK_(SNAPSHOT)
|
||||||
WXK_(NUMPAD0)
|
WXK_(INSERT)
|
||||||
WXK_(NUMPAD1)
|
WXK_(HELP)
|
||||||
WXK_(NUMPAD2)
|
WXK_(NUMPAD0)
|
||||||
WXK_(NUMPAD3)
|
WXK_(NUMPAD1)
|
||||||
WXK_(NUMPAD4)
|
WXK_(NUMPAD2)
|
||||||
WXK_(NUMPAD5)
|
WXK_(NUMPAD3)
|
||||||
WXK_(NUMPAD6)
|
WXK_(NUMPAD4)
|
||||||
WXK_(NUMPAD7)
|
WXK_(NUMPAD5)
|
||||||
WXK_(NUMPAD8)
|
WXK_(NUMPAD6)
|
||||||
WXK_(NUMPAD9)
|
WXK_(NUMPAD7)
|
||||||
WXK_(MULTIPLY)
|
WXK_(NUMPAD8)
|
||||||
WXK_(ADD)
|
WXK_(NUMPAD9)
|
||||||
WXK_(SEPARATOR)
|
WXK_(MULTIPLY)
|
||||||
WXK_(SUBTRACT)
|
WXK_(ADD)
|
||||||
WXK_(DECIMAL)
|
WXK_(SEPARATOR)
|
||||||
WXK_(DIVIDE)
|
WXK_(SUBTRACT)
|
||||||
WXK_(F1)
|
WXK_(DECIMAL)
|
||||||
WXK_(F2)
|
WXK_(DIVIDE)
|
||||||
WXK_(F3)
|
WXK_(F1)
|
||||||
WXK_(F4)
|
WXK_(F2)
|
||||||
WXK_(F5)
|
WXK_(F3)
|
||||||
WXK_(F6)
|
WXK_(F4)
|
||||||
WXK_(F7)
|
WXK_(F5)
|
||||||
WXK_(F8)
|
WXK_(F6)
|
||||||
WXK_(F9)
|
WXK_(F7)
|
||||||
WXK_(F10)
|
WXK_(F8)
|
||||||
WXK_(F11)
|
WXK_(F9)
|
||||||
WXK_(F12)
|
WXK_(F10)
|
||||||
WXK_(F13)
|
WXK_(F11)
|
||||||
WXK_(F14)
|
WXK_(F12)
|
||||||
WXK_(F15)
|
WXK_(F13)
|
||||||
WXK_(F16)
|
WXK_(F14)
|
||||||
WXK_(F17)
|
WXK_(F15)
|
||||||
WXK_(F18)
|
WXK_(F16)
|
||||||
WXK_(F19)
|
WXK_(F17)
|
||||||
WXK_(F20)
|
WXK_(F18)
|
||||||
WXK_(F21)
|
WXK_(F19)
|
||||||
WXK_(F22)
|
WXK_(F20)
|
||||||
WXK_(F23)
|
WXK_(F21)
|
||||||
WXK_(F24)
|
WXK_(F22)
|
||||||
WXK_(NUMLOCK)
|
WXK_(F23)
|
||||||
WXK_(SCROLL)
|
WXK_(F24)
|
||||||
WXK_(PAGEUP)
|
WXK_(NUMLOCK)
|
||||||
WXK_(PAGEDOWN)
|
WXK_(SCROLL)
|
||||||
WXK_(NUMPAD_SPACE)
|
WXK_(PAGEUP)
|
||||||
WXK_(NUMPAD_TAB)
|
WXK_(PAGEDOWN)
|
||||||
WXK_(NUMPAD_ENTER)
|
WXK_(NUMPAD_SPACE)
|
||||||
WXK_(NUMPAD_F1)
|
WXK_(NUMPAD_TAB)
|
||||||
WXK_(NUMPAD_F2)
|
WXK_(NUMPAD_ENTER)
|
||||||
WXK_(NUMPAD_F3)
|
WXK_(NUMPAD_F1)
|
||||||
WXK_(NUMPAD_F4)
|
WXK_(NUMPAD_F2)
|
||||||
WXK_(NUMPAD_HOME)
|
WXK_(NUMPAD_F3)
|
||||||
WXK_(NUMPAD_LEFT)
|
WXK_(NUMPAD_F4)
|
||||||
WXK_(NUMPAD_UP)
|
WXK_(NUMPAD_HOME)
|
||||||
WXK_(NUMPAD_RIGHT)
|
WXK_(NUMPAD_LEFT)
|
||||||
WXK_(NUMPAD_DOWN)
|
WXK_(NUMPAD_UP)
|
||||||
WXK_(NUMPAD_PAGEUP)
|
WXK_(NUMPAD_RIGHT)
|
||||||
WXK_(NUMPAD_PAGEDOWN)
|
WXK_(NUMPAD_DOWN)
|
||||||
WXK_(NUMPAD_END)
|
WXK_(NUMPAD_PAGEUP)
|
||||||
WXK_(NUMPAD_BEGIN)
|
WXK_(NUMPAD_PAGEDOWN)
|
||||||
WXK_(NUMPAD_INSERT)
|
WXK_(NUMPAD_END)
|
||||||
WXK_(NUMPAD_DELETE)
|
WXK_(NUMPAD_BEGIN)
|
||||||
WXK_(NUMPAD_EQUAL)
|
WXK_(NUMPAD_INSERT)
|
||||||
WXK_(NUMPAD_MULTIPLY)
|
WXK_(NUMPAD_DELETE)
|
||||||
WXK_(NUMPAD_ADD)
|
WXK_(NUMPAD_EQUAL)
|
||||||
WXK_(NUMPAD_SEPARATOR)
|
WXK_(NUMPAD_MULTIPLY)
|
||||||
WXK_(NUMPAD_SUBTRACT)
|
WXK_(NUMPAD_ADD)
|
||||||
WXK_(NUMPAD_DECIMAL)
|
WXK_(NUMPAD_SEPARATOR)
|
||||||
WXK_(NUMPAD_DIVIDE)
|
WXK_(NUMPAD_SUBTRACT)
|
||||||
|
WXK_(NUMPAD_DECIMAL)
|
||||||
WXK_(WINDOWS_LEFT)
|
WXK_(NUMPAD_DIVIDE)
|
||||||
WXK_(WINDOWS_RIGHT)
|
|
||||||
#ifdef __WXOSX__
|
WXK_(WINDOWS_LEFT)
|
||||||
WXK_(RAW_CONTROL)
|
WXK_(WINDOWS_RIGHT)
|
||||||
#endif
|
#ifdef __WXOSX__
|
||||||
#undef WXK_
|
WXK_(RAW_CONTROL)
|
||||||
|
#endif
|
||||||
default:
|
#undef WXK_
|
||||||
return NULL;
|
|
||||||
}
|
default:
|
||||||
}
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
// helper function that returns textual description of key in the event
|
|
||||||
wxString GetKeyName( const wxKeyEvent &aEvent )
|
|
||||||
{
|
// helper function that returns textual description of key in the event
|
||||||
int keycode = aEvent.GetKeyCode();
|
wxString GetKeyName( const wxKeyEvent &aEvent )
|
||||||
const char* virt = GetVirtualKeyCodeName( keycode );
|
{
|
||||||
|
int keycode = aEvent.GetKeyCode();
|
||||||
if( virt )
|
const char* virt = GetVirtualKeyCodeName( keycode );
|
||||||
return virt;
|
|
||||||
|
if( virt )
|
||||||
if( keycode > 0 && keycode < 32 )
|
return virt;
|
||||||
return wxString::Format( "Ctrl-%c", (unsigned char)('A' + keycode - 1) );
|
|
||||||
|
if( keycode > 0 && keycode < 32 )
|
||||||
if( keycode >= 32 && keycode < 128 )
|
return wxString::Format( "Ctrl-%c", (unsigned char)('A' + keycode - 1) );
|
||||||
return wxString::Format( "'%c'", (unsigned char)keycode );
|
|
||||||
|
if( keycode >= 32 && keycode < 128 )
|
||||||
#if wxUSE_UNICODE
|
return wxString::Format( "'%c'", (unsigned char)keycode );
|
||||||
int uc = aEvent.GetUnicodeKey();
|
|
||||||
|
#if wxUSE_UNICODE
|
||||||
if( uc != WXK_NONE )
|
int uc = aEvent.GetUnicodeKey();
|
||||||
return wxString::Format( "'%c'", uc );
|
|
||||||
#endif
|
if( uc != WXK_NONE )
|
||||||
|
return wxString::Format( "'%c'", uc );
|
||||||
return "unknown";
|
#endif
|
||||||
}
|
|
||||||
|
return "unknown";
|
||||||
|
}
|
||||||
wxString dump( const wxKeyEvent& aEvent )
|
|
||||||
{
|
|
||||||
wxString msg;
|
wxString dump( const wxKeyEvent& aEvent )
|
||||||
wxString eventType = "unknown";
|
{
|
||||||
|
wxString msg;
|
||||||
if( aEvent.GetEventType() == wxEVT_KEY_DOWN )
|
wxString eventType = "unknown";
|
||||||
eventType = "KeyDown";
|
|
||||||
else if( aEvent.GetEventType() == wxEVT_KEY_UP )
|
if( aEvent.GetEventType() == wxEVT_KEY_DOWN )
|
||||||
eventType = "KeyUp";
|
eventType = "KeyDown";
|
||||||
else if( aEvent.GetEventType() == wxEVT_CHAR )
|
else if( aEvent.GetEventType() == wxEVT_KEY_UP )
|
||||||
eventType = "Char";
|
eventType = "KeyUp";
|
||||||
else if( aEvent.GetEventType() == wxEVT_CHAR_HOOK )
|
else if( aEvent.GetEventType() == wxEVT_CHAR )
|
||||||
eventType = "Hook";
|
eventType = "Char";
|
||||||
|
else if( aEvent.GetEventType() == wxEVT_CHAR_HOOK )
|
||||||
// event key_name KeyCode modifiers Unicode raw_code raw_flags pos
|
eventType = "Hook";
|
||||||
msg.Printf( "%7s %15s %5d %c%c%c%c"
|
|
||||||
#if wxUSE_UNICODE
|
// event key_name KeyCode modifiers Unicode raw_code raw_flags pos
|
||||||
"%5d (U+%04x)"
|
msg.Printf( "%7s %15s %5d %c%c%c%c"
|
||||||
#else
|
#if wxUSE_UNICODE
|
||||||
" none "
|
"%5d (U+%04x)"
|
||||||
#endif
|
#else
|
||||||
#ifdef wxHAS_RAW_KEY_CODES
|
" none "
|
||||||
" %7lu 0x%08lx"
|
#endif
|
||||||
#else
|
#ifdef wxHAS_RAW_KEY_CODES
|
||||||
" not-set not-set"
|
" %7lu 0x%08lx"
|
||||||
#endif
|
#else
|
||||||
" (%5d,%5d)"
|
" not-set not-set"
|
||||||
"\n",
|
#endif
|
||||||
eventType,
|
" (%5d,%5d)"
|
||||||
GetKeyName( aEvent ),
|
"\n",
|
||||||
aEvent.GetKeyCode(),
|
eventType,
|
||||||
aEvent.ControlDown() ? 'C' : '-',
|
GetKeyName( aEvent ),
|
||||||
aEvent.AltDown() ? 'A' : '-',
|
aEvent.GetKeyCode(),
|
||||||
aEvent.ShiftDown() ? 'S' : '-',
|
aEvent.ControlDown() ? 'C' : '-',
|
||||||
aEvent.MetaDown() ? 'M' : '-'
|
aEvent.AltDown() ? 'A' : '-',
|
||||||
#if wxUSE_UNICODE
|
aEvent.ShiftDown() ? 'S' : '-',
|
||||||
, aEvent.GetUnicodeKey()
|
aEvent.MetaDown() ? 'M' : '-'
|
||||||
, aEvent.GetUnicodeKey()
|
#if wxUSE_UNICODE
|
||||||
#endif
|
, aEvent.GetUnicodeKey()
|
||||||
#ifdef wxHAS_RAW_KEY_CODES
|
, aEvent.GetUnicodeKey()
|
||||||
, (unsigned long) aEvent.GetRawKeyCode()
|
#endif
|
||||||
, (unsigned long) aEvent.GetRawKeyFlags()
|
#ifdef wxHAS_RAW_KEY_CODES
|
||||||
#endif
|
, (unsigned long) aEvent.GetRawKeyCode()
|
||||||
, aEvent.GetX()
|
, (unsigned long) aEvent.GetRawKeyFlags()
|
||||||
, aEvent.GetY()
|
#endif
|
||||||
);
|
, aEvent.GetX()
|
||||||
|
, aEvent.GetY()
|
||||||
return msg;
|
);
|
||||||
}
|
|
||||||
|
return msg;
|
||||||
|
}
|
||||||
|
|
|
@ -47,6 +47,7 @@
|
||||||
#include <lib_pin.h>
|
#include <lib_pin.h>
|
||||||
#include <transform.h>
|
#include <transform.h>
|
||||||
#include <sch_component.h>
|
#include <sch_component.h>
|
||||||
|
#include <trace_helpers.h>
|
||||||
|
|
||||||
|
|
||||||
static const int pin_orientation_codes[] =
|
static const int pin_orientation_codes[] =
|
||||||
|
|
|
@ -57,6 +57,8 @@
|
||||||
|
|
||||||
#include <eeschema_id.h> // for MAX_UNIT_COUNT_PER_PACKAGE definition
|
#include <eeschema_id.h> // for MAX_UNIT_COUNT_PER_PACKAGE definition
|
||||||
|
|
||||||
|
#include <trace_helpers.h>
|
||||||
|
|
||||||
#define NULL_STRING "_NONAME_"
|
#define NULL_STRING "_NONAME_"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -50,6 +50,7 @@
|
||||||
#include <sch_component.h>
|
#include <sch_component.h>
|
||||||
#include <sch_field.h>
|
#include <sch_field.h>
|
||||||
#include <kicad_string.h>
|
#include <kicad_string.h>
|
||||||
|
#include <trace_helpers.h>
|
||||||
|
|
||||||
|
|
||||||
SCH_FIELD::SCH_FIELD( const wxPoint& aPos, int aFieldId, SCH_COMPONENT* aParent, const wxString& aName ) :
|
SCH_FIELD::SCH_FIELD( const wxPoint& aPos, int aFieldId, SCH_COMPONENT* aParent, const wxString& aName ) :
|
||||||
|
|
|
@ -44,16 +44,6 @@ class NETLIST_OBJECT;
|
||||||
class NETLIST_OBJECT_LIST;
|
class NETLIST_OBJECT_LIST;
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @ingroup trace_env_vars
|
|
||||||
*
|
|
||||||
* Flag to enable finding schematic item debug output.
|
|
||||||
*
|
|
||||||
* @warning This generates a log of debug output.
|
|
||||||
*/
|
|
||||||
extern const wxString traceFindItem;
|
|
||||||
|
|
||||||
|
|
||||||
enum DANGLING_END_T {
|
enum DANGLING_END_T {
|
||||||
UNKNOWN = 0,
|
UNKNOWN = 0,
|
||||||
WIRE_START_END,
|
WIRE_START_END,
|
||||||
|
|
|
@ -41,6 +41,7 @@
|
||||||
#include <sch_sheet_path.h>
|
#include <sch_sheet_path.h>
|
||||||
#include <sch_component.h>
|
#include <sch_component.h>
|
||||||
#include <netlist_object.h>
|
#include <netlist_object.h>
|
||||||
|
#include <trace_helpers.h>
|
||||||
|
|
||||||
|
|
||||||
SCH_SHEET::SCH_SHEET( const wxPoint& pos ) :
|
SCH_SHEET::SCH_SHEET( const wxPoint& pos ) :
|
||||||
|
|
|
@ -40,6 +40,7 @@
|
||||||
#include <general.h>
|
#include <general.h>
|
||||||
#include <sch_sheet.h>
|
#include <sch_sheet.h>
|
||||||
#include <kicad_string.h>
|
#include <kicad_string.h>
|
||||||
|
#include <trace_helpers.h>
|
||||||
|
|
||||||
|
|
||||||
SCH_SHEET_PIN::SCH_SHEET_PIN( SCH_SHEET* parent, const wxPoint& pos, const wxString& text ) :
|
SCH_SHEET_PIN::SCH_SHEET_PIN( SCH_SHEET* parent, const wxPoint& pos, const wxString& text ) :
|
||||||
|
|
|
@ -43,6 +43,7 @@
|
||||||
#include <list_operations.h>
|
#include <list_operations.h>
|
||||||
#include <sch_text.h>
|
#include <sch_text.h>
|
||||||
#include <netlist_object.h>
|
#include <netlist_object.h>
|
||||||
|
#include <trace_helpers.h>
|
||||||
|
|
||||||
|
|
||||||
extern void IncrementLabelMember( wxString& name, int aIncrement );
|
extern void IncrementLabelMember( wxString& name, int aIncrement );
|
||||||
|
|
|
@ -1,110 +1,115 @@
|
||||||
/*
|
/*
|
||||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2018 Wayne Stambaugh <stambaughw@gmail.com>
|
* Copyright (C) 2018 Wayne Stambaugh <stambaughw@gmail.com>
|
||||||
* Copyright (C) 2018 KiCad Developers, see change_log.txt for contributors.
|
* Copyright (C) 2018 KiCad Developers, see change_log.txt for contributors.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
* as published by the Free Software Foundation; either version 2
|
* as published by the Free Software Foundation; either version 2
|
||||||
* of the License, or (at your option) any later version.
|
* of the License, or (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program; if not, you may find one here:
|
* along with this program; if not, you may find one here:
|
||||||
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
||||||
* or you may search the http://www.gnu.org website for the version 2 license,
|
* or you may search the http://www.gnu.org website for the version 2 license,
|
||||||
* or you may write to the Free Software Foundation, Inc.,
|
* or you may write to the Free Software Foundation, Inc.,
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file trace_helpers.h
|
* @file trace_helpers.h
|
||||||
* @brief wxLogTrace helper definitions.
|
* @brief wxLogTrace helper definitions.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _TRACE_HELPERS_H_
|
#ifndef _TRACE_HELPERS_H_
|
||||||
#define _TRACE_HELPERS_H_
|
#define _TRACE_HELPERS_H_
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @defgroup trace_env_vars Trace Environment Variables
|
* @defgroup trace_env_vars Trace Environment Variables
|
||||||
*
|
*
|
||||||
* wxWidgets provides trace control of debug messages using the WXTRACE environment variable.
|
* wxWidgets provides trace control of debug messages using the WXTRACE environment variable.
|
||||||
* This section defines the strings passed to WXTRACE to for debug output control of various
|
* This section defines the strings passed to WXTRACE to for debug output control of various
|
||||||
* sections of the KiCad code. See the wxWidgets <a href="http://docs.wxwidgets.org/3.0/
|
* sections of the KiCad code. See the wxWidgets <a href="http://docs.wxwidgets.org/3.0/
|
||||||
* group__group__funcmacro__log.html#ga947e317db477914c12b13c4534867ec9"> wxLogTrace </a>
|
* group__group__funcmacro__log.html#ga947e317db477914c12b13c4534867ec9"> wxLogTrace </a>
|
||||||
* documentation for more information.
|
* documentation for more information.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
///@{
|
///@{
|
||||||
/// \ingroup trace_env_vars
|
/// \ingroup trace_env_vars
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Flag to enable find and replace debug tracing.
|
* Flag to enable find debug tracing.
|
||||||
*/
|
*/
|
||||||
extern wxChar* traceFindReplace;
|
extern const wxChar* const traceFindItem;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Flag to enable draw panel coordinate debug tracing.
|
* Flag to enable find and replace debug tracing.
|
||||||
*/
|
*/
|
||||||
extern wxChar* kicadTraceCoords;
|
extern const wxChar* const traceFindReplace;
|
||||||
|
|
||||||
|
/**
|
||||||
/**
|
* Flag to enable draw panel coordinate debug tracing.
|
||||||
* Flag to enable wxKeyEvent debug tracing.
|
*/
|
||||||
*/
|
extern const wxChar* const kicadTraceCoords;
|
||||||
extern wxChar* kicadTraceKeyEvent;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Flag to enable auto save feature debug tracing.
|
* Flag to enable wxKeyEvent debug tracing.
|
||||||
*/
|
*/
|
||||||
extern wxChar* traceAutoSave;
|
extern const wxChar* const kicadTraceKeyEvent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Flag to enable schematic library memory deletion debug output.
|
* Flag to enable auto save feature debug tracing.
|
||||||
*/
|
*/
|
||||||
extern wxChar* traceSchLibMem;
|
extern const wxChar* const traceAutoSave;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Flag to enable legacy schematic plugin debug output.
|
* Flag to enable schematic library memory deletion debug output.
|
||||||
*/
|
*/
|
||||||
extern wxChar* traceSchLegacyPlugin;
|
extern const wxChar* const traceSchLibMem;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Flag to enable GEDA PCB plugin debug output.
|
* Flag to enable legacy schematic plugin debug output.
|
||||||
*/
|
*/
|
||||||
extern wxChar* traceKicadPcbPlugin;
|
extern const wxChar* const traceSchLegacyPlugin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Flag to enable GEDA PCB plugin debug output.
|
* Flag to enable GEDA PCB plugin debug output.
|
||||||
*/
|
*/
|
||||||
extern wxChar* traceGedaPcbPlugin;
|
extern const wxChar* const traceKicadPcbPlugin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Flag to enable print controller debug output.
|
* Flag to enable GEDA PCB plugin debug output.
|
||||||
*/
|
*/
|
||||||
extern wxChar* tracePrinting;
|
extern const wxChar* const traceGedaPcbPlugin;
|
||||||
|
|
||||||
///@}
|
/**
|
||||||
|
* Flag to enable print controller debug output.
|
||||||
/**
|
*/
|
||||||
* Debug helper for printing wxKeyEvent information.
|
extern const wxChar* const tracePrinting;
|
||||||
*
|
|
||||||
* @param aEvent is the wxKeyEvent to generate the print string from.
|
///@}
|
||||||
* @return the wxKeyEvent information.
|
|
||||||
*/
|
/**
|
||||||
extern wxString dump( const wxKeyEvent& aEvent );
|
* Debug helper for printing wxKeyEvent information.
|
||||||
|
*
|
||||||
/**
|
* @param aEvent is the wxKeyEvent to generate the print string from.
|
||||||
* Debug helper for printing wxArrayString contents.
|
* @return the wxKeyEvent information.
|
||||||
*
|
*/
|
||||||
* @param aArray is the string array to output.
|
extern wxString dump( const wxKeyEvent& aEvent );
|
||||||
* @return the wxArrayString contents in a formatted string for debugging output.
|
|
||||||
*/
|
/**
|
||||||
extern wxString dump( const wxArrayString& aArray );
|
* Debug helper for printing wxArrayString contents.
|
||||||
|
*
|
||||||
#endif // _TRACE_HELPERS_H_
|
* @param aArray is the string array to output.
|
||||||
|
* @return the wxArrayString contents in a formatted string for debugging output.
|
||||||
|
*/
|
||||||
|
extern wxString dump( const wxArrayString& aArray );
|
||||||
|
|
||||||
|
#endif // _TRACE_HELPERS_H_
|
||||||
|
|
Loading…
Reference in New Issue