1
0
Fork 0
forked from len0rd/rockbox

added debug and panic support for the simulator

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@357 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Felix Arends 2002-05-01 09:34:55 +00:00
parent 9469b0458f
commit 53a7dd242c
5 changed files with 106 additions and 7 deletions

View file

@ -0,0 +1,38 @@
/***************************************************************************
* __________ __ ___.
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
* \/ \/ \/ \/ \/
* $Id$
*
* Copyright (C) 2002 by Felix Arends
*
* All files in this archive are subject to the GNU General Public License.
* See the file COPYING in the source tree root for full license agreement.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
*
****************************************************************************/
#include <windows.h>
char debugmembuf[100];
char debugbuf[200];
void debug( const char *message )
{
OutputDebugString (message);
}
void debugf(char *fmt, ...)
{
va_list ap;
va_start( ap, fmt );
wsprintf( debugmembuf, fmt, ap );
va_end( ap );
debug ( debugmembuf );
}

View file

@ -0,0 +1,43 @@
/***************************************************************************
* __________ __ ___.
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
* \/ \/ \/ \/ \/
* $Id$
*
* Copyright (C) 2002 by Felix Arends
*
* All files in this archive are subject to the GNU General Public License.
* See the file COPYING in the source tree root for full license agreement.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
*
****************************************************************************/
#include <windows.h>
#include "debug.h"
char panic_buf[128];
// panic
// whatever it says ;)
void panic( char *message )
{
debug( message );
PostQuitMessage (-1);
}
// panicf
// formatted panic
void panicf( char *fmt, ...)
{
va_list ap;
va_start( ap, fmt );
wsprintf( panic_buf, fmt, ap );
va_end( ap );
panic( panic_buf );
}

View file

@ -9,8 +9,8 @@ Global
GlobalSection(ProjectDependencies) = postSolution
EndGlobalSection
GlobalSection(ProjectConfiguration) = postSolution
{A81A8EFA-647A-427A-BD04-F6B469752E7A}.Debug.ActiveCfg = Release|Win32
{A81A8EFA-647A-427A-BD04-F6B469752E7A}.Debug.Build.0 = Release|Win32
{A81A8EFA-647A-427A-BD04-F6B469752E7A}.Debug.ActiveCfg = Debug|Win32
{A81A8EFA-647A-427A-BD04-F6B469752E7A}.Debug.Build.0 = Debug|Win32
{A81A8EFA-647A-427A-BD04-F6B469752E7A}.Release.ActiveCfg = Release|Win32
{A81A8EFA-647A-427A-BD04-F6B469752E7A}.Release.Build.0 = Release|Win32
EndGlobalSection

Binary file not shown.

View file

@ -19,7 +19,7 @@
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="&quot;C:\Programming\CVS Checkout\firmware&quot;;&quot;C:\Programming\CVS Checkout\firmware\drivers&quot;"
AdditionalIncludeDirectories="&quot;C:\Programming\CVS Checkout\RockBox\firmware&quot;;&quot;C:\Programming\CVS Checkout\RockBox\firmware\drivers&quot;;&quot;C:\Programming\CVS Checkout\RockBox\firmware\common&quot;"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;ARCHOS_RECORDER;SIMULATOR"
MinimalRebuild="TRUE"
BasicRuntimeChecks="3"
@ -106,18 +106,24 @@
<Filter
Name="Source Files"
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm">
<File
RelativePath="..\app.c">
</File>
<File
RelativePath="button.c">
</File>
<File
RelativePath="..\..\firmware\chartables.c">
</File>
<File
RelativePath="debug-win32.c">
</File>
<File
RelativePath="dir-win32.c">
</File>
<File
RelativePath="..\..\firmware\disk.c">
</File>
<File
RelativePath="..\..\firmware\test\wavey\harness.c">
</File>
<File
RelativePath="kernel.c">
</File>
@ -128,7 +134,16 @@
RelativePath="..\..\firmware\drivers\lcd.c">
</File>
<File
RelativePath="..\tetris.c">
RelativePath="panic-win32.c">
</File>
<File
RelativePath="..\..\firmware\playlist.c">
</File>
<File
RelativePath="..\..\firmware\settings.c">
</File>
<File
RelativePath="..\tree.c">
</File>
<File
RelativePath="uisw32.c">
@ -137,6 +152,9 @@
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc">
<File
RelativePath="harness.h">
</File>
<File
RelativePath="lcd-win32.h">
</File>