From a972d4d88892efb06d920d74cc55a6a91a63a2a2 Mon Sep 17 00:00:00 2001 From: Kitae Kim Date: Thu, 8 Mar 2012 16:52:08 +0900 Subject: [PATCH] [Title] Enable DEBUG_CHANNEL feature. [Type] [Module] emulator / logging [Priority] [CQ#] [Redmine#] [Problem] [Cause] [Solution] [TestCase] --- tizen/src/Makefile.tizen | 2 +- tizen/src/debug_ch.c | 13 ++++++++++++- tizen/src/debug_ch.h | 2 +- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/tizen/src/Makefile.tizen b/tizen/src/Makefile.tizen index 111816b1e3..b6b4122fed 100644 --- a/tizen/src/Makefile.tizen +++ b/tizen/src/Makefile.tizen @@ -12,7 +12,7 @@ obj-y += emulator.o obj-y += sdb.o # debugch -#obj-y += debug_ch.c +obj-y += debug_ch.o # maru hw #hw-obj-y += maru_board.o diff --git a/tizen/src/debug_ch.c b/tizen/src/debug_ch.c index 50bd9b6892..b8767efef6 100644 --- a/tizen/src/debug_ch.c +++ b/tizen/src/debug_ch.c @@ -34,9 +34,12 @@ #include #include #include "debug_ch.h" -#include "fileio.h" +// #include "fileio.h" +#if 0 extern STARTUP_OPTION startup_option; +#endif + static char logfile[256] = { 0, }; static char debugchfile[256] = {0, }; static inline int interlocked_xchg_add( int *dest, int incr ) @@ -257,8 +260,13 @@ static void debug_init(void) return; /* already initialized */ nb_debug_options = 0; + +#if 0 strcpy(debugchfile, get_etc_path()); strcat(debugchfile, "/DEBUGCH"); +#endif + strcpy(debugchfile, "DEBUGCH"); + fp= fopen(debugchfile, "r"); if( fp == NULL){ @@ -289,8 +297,11 @@ static void debug_init(void) free(tmp); } +#if 0 strcpy(logfile, get_virtual_target_abs_path(startup_option.vtm)); strcat(logfile, "logs/emulator.log"); +#endif + strcpy(logfile, "emulator.log"); if(access(logfile, F_OK | R_OK) == 0) remove(logfile); diff --git a/tizen/src/debug_ch.h b/tizen/src/debug_ch.h index 89327fc2e2..c50023374a 100644 --- a/tizen/src/debug_ch.h +++ b/tizen/src/debug_ch.h @@ -33,7 +33,7 @@ #include -#define NO_DEBUG +// #define NO_DEBUG #ifdef __cplusplus extern "C" { -- 2.34.1