[6] | 1 | /**
|
---|
[28] | 2 | * @file cf_debug.c
|
---|
| 3 | * @author myusgun <myusgun@gmail.com>
|
---|
| 4 | * @version 0.1
|
---|
[6] | 5 | */
|
---|
| 6 | #include "cf_debug.h"
|
---|
| 7 | #include "cf_local.h"
|
---|
[40] | 8 | #include "cf_error.h"
|
---|
[51] | 9 | #include "cf_thread.h"
|
---|
[6] | 10 |
|
---|
| 11 | #include <stdlib.h>
|
---|
| 12 | #include <ctype.h>
|
---|
| 13 | #include <stdarg.h>
|
---|
[9] | 14 | #include <string.h>
|
---|
[6] | 15 |
|
---|
[50] | 16 | #if defined(_WIN32) || defined(_WIN64)
|
---|
[7] | 17 | # include <io.h>
|
---|
[6] | 18 | #else
|
---|
| 19 | # include <unistd.h>
|
---|
| 20 | #endif
|
---|
| 21 |
|
---|
| 22 | #define IS_READABLE_CHAR(__c) (' ' <= __c && __c <= '~')
|
---|
| 23 |
|
---|
| 24 | #define CHECK_INVALID_CTX(__ctx) \
|
---|
| 25 | if (__ctx == NULL) \
|
---|
| 26 | return CF_ERROR_DEBUG_INVALID_CTX
|
---|
[10] | 27 |
|
---|
[6] | 28 | #define GET_CTX_OSTREAM(__ctx) \
|
---|
| 29 | ((((CF_DEBUG_CTX *)__ctx)->fp == NULL) \
|
---|
| 30 | ? stderr \
|
---|
| 31 | : ((CF_DEBUG_CTX *)__ctx)->fp)
|
---|
| 32 |
|
---|
[51] | 33 | /**
|
---|
| 34 | * 디버그 컨텍스트
|
---|
| 35 | *
|
---|
| 36 | * @remark change from public to private
|
---|
| 37 | */
|
---|
| 38 | typedef void * CF_Debug_Ctx;
|
---|
| 39 |
|
---|
[53] | 40 | /* *
|
---|
[51] | 41 | * 콜스택 데이터
|
---|
| 42 | *
|
---|
| 43 | * @remark change from public to private
|
---|
| 44 | */
|
---|
| 45 | typedef struct cf_debug_callStack {
|
---|
[53] | 46 | char file[NAME_LENGTH + 1]; /* *< 파일 이름 */
|
---|
| 47 | char function[NAME_LENGTH + 1]; /* *< 함수 이름 */
|
---|
| 48 | int line; /* *< 라인 넘버 */
|
---|
[51] | 49 | } CF_Debug_CallStack;
|
---|
| 50 |
|
---|
[6] | 51 | typedef struct __cf_debug_callstack__
|
---|
| 52 | {
|
---|
[9] | 53 | char file[NAME_LENGTH + 1];
|
---|
[6] | 54 | char func[NAME_LENGTH + 1];
|
---|
| 55 | int line;
|
---|
| 56 |
|
---|
[51] | 57 | int frameIndex;
|
---|
| 58 |
|
---|
[6] | 59 | struct __cf_debug_callstack__ * caller;
|
---|
| 60 | } S_CF_DEBUG_CALLSTACK, CF_DEBUG_CALLSTACK;
|
---|
| 61 |
|
---|
[10] | 62 | typedef struct __cf_debug_ctx__
|
---|
[6] | 63 | {
|
---|
[51] | 64 | char file[NAME_LENGTH + 1];
|
---|
| 65 | char func[NAME_LENGTH + 1];
|
---|
| 66 | int line;
|
---|
[6] | 67 |
|
---|
[51] | 68 | FILE * fp;
|
---|
| 69 | CF_Mutex mutex;
|
---|
[6] | 70 |
|
---|
| 71 | CF_DEBUG_CALLSTACK callstack;
|
---|
| 72 | } S_CF_DEBUG_CTX, CF_DEBUG_CTX;
|
---|
| 73 |
|
---|
[51] | 74 | CF_Debug_Ctx gDebugSingleCtx = NULL;
|
---|
| 75 |
|
---|
[23] | 76 | static int
|
---|
[26] | 77 | CF_Debug_Local_UpdateCtx (CF_Debug_Ctx ctx,
|
---|
| 78 | const char * file,
|
---|
| 79 | const char * func,
|
---|
| 80 | const int line)
|
---|
| 81 | {
|
---|
| 82 | CF_DEBUG_CTX * context = (CF_DEBUG_CTX *) ctx;
|
---|
| 83 |
|
---|
| 84 | CHECK_INVALID_CTX (ctx);
|
---|
| 85 |
|
---|
| 86 | strncpy (context->file, file, strlen (file));
|
---|
| 87 | strncpy (context->func, func, strlen (func));
|
---|
| 88 | context->line = line;
|
---|
| 89 |
|
---|
| 90 | return CF_OK;
|
---|
| 91 | }
|
---|
| 92 |
|
---|
| 93 | static int
|
---|
[16] | 94 | CF_Debug_Local_Print (FILE * fp,
|
---|
| 95 | const char * file,
|
---|
| 96 | const char * func,
|
---|
| 97 | const int line,
|
---|
[12] | 98 | const char * fmt,
|
---|
| 99 | va_list valist)
|
---|
[6] | 100 | {
|
---|
[16] | 101 | fprintf (fp, "[DEBUG][%s:%d][%s] ", file, line, func);
|
---|
| 102 | vfprintf (fp, fmt, valist);
|
---|
[14] | 103 |
|
---|
| 104 | return CF_OK;
|
---|
[6] | 105 | }
|
---|
| 106 |
|
---|
[23] | 107 | static int
|
---|
[16] | 108 | CF_Debug_Local_PrintBin (FILE * fp,
|
---|
| 109 | const char * file,
|
---|
| 110 | const char * func,
|
---|
| 111 | const int line,
|
---|
| 112 | const unsigned char * bin,
|
---|
| 113 | const int len)
|
---|
| 114 | {
|
---|
| 115 | int i, j;
|
---|
| 116 |
|
---|
| 117 | for (i = 0 ; i < len ; i += 16)
|
---|
| 118 | {
|
---|
| 119 | fprintf (fp, "[DEBUG][%s:%d][%s] ", file, line, func);
|
---|
| 120 | fprintf (fp, "%06x : ", i);
|
---|
| 121 |
|
---|
| 122 | for (j = 0 ; j < 16 ; j++)
|
---|
| 123 | {
|
---|
| 124 | if (i+j < len)
|
---|
| 125 | fprintf (fp, "%02x ", bin[i+j]);
|
---|
| 126 | else
|
---|
| 127 | fprintf (fp, " ");
|
---|
| 128 | }
|
---|
| 129 | fprintf (fp, " ");
|
---|
| 130 |
|
---|
| 131 | for (j = 0 ; j < 16 ; j++)
|
---|
| 132 | {
|
---|
| 133 | if (i+j < len)
|
---|
| 134 | fprintf (fp, "%c", IS_READABLE_CHAR(bin[i+j]) ? bin[i+j] : '.');
|
---|
| 135 | }
|
---|
| 136 | fprintf (fp, "\n");
|
---|
| 137 | }
|
---|
| 138 |
|
---|
| 139 | return CF_OK;
|
---|
| 140 | }
|
---|
| 141 |
|
---|
[35] | 142 | /**
|
---|
| 143 | * 디버그 컨텍스트를 해제
|
---|
| 144 | *
|
---|
| 145 | * @return 성공 시, CF_OK; 실패 시, 오류 코드
|
---|
| 146 | *
|
---|
| 147 | * @param ctx 디버그 컨텍스트
|
---|
| 148 | *
|
---|
| 149 | * @see CF_DEBUG_DESTROY_CTX
|
---|
| 150 | */
|
---|
[51] | 151 | static int
|
---|
[6] | 152 | CF_Debug_DestroyCtx (CF_Debug_Ctx ctx)
|
---|
| 153 | {
|
---|
| 154 | CF_DEBUG_CTX * context = (CF_DEBUG_CTX *) ctx;
|
---|
| 155 | CF_DEBUG_CALLSTACK * pop = NULL;
|
---|
| 156 | CF_DEBUG_CALLSTACK * next = NULL;
|
---|
| 157 |
|
---|
| 158 | CHECK_INVALID_CTX (ctx);
|
---|
| 159 |
|
---|
| 160 | if (context->fp != NULL)
|
---|
| 161 | fclose (context->fp);
|
---|
| 162 |
|
---|
| 163 | for (pop = next = context->callstack.caller ; pop ; pop = next)
|
---|
| 164 | {
|
---|
| 165 | next = next->caller;
|
---|
| 166 | free (pop);
|
---|
| 167 | }
|
---|
| 168 |
|
---|
[51] | 169 | if (context->mutex)
|
---|
| 170 | CF_Mutex_Destory (&context->mutex);
|
---|
| 171 |
|
---|
[6] | 172 | free (context);
|
---|
| 173 |
|
---|
| 174 | return CF_OK;
|
---|
| 175 | }
|
---|
| 176 |
|
---|
[35] | 177 | /**
|
---|
[51] | 178 | * 디버그 컨텍스트를 생성
|
---|
[35] | 179 | *
|
---|
[51] | 180 | * @return 성공 시, CF_Debug_Ctx 형태의 컨텍스트; 실패 시, NULL
|
---|
| 181 | * @see CF_DEBUG_CREATE_CTX
|
---|
[35] | 182 | */
|
---|
[51] | 183 | static int
|
---|
| 184 | CF_Debug_CreateCtx (CF_Debug_Ctx * ctx)
|
---|
[6] | 185 | {
|
---|
[51] | 186 | int result = 0;
|
---|
| 187 | CF_DEBUG_CTX * context = NULL;
|
---|
[6] | 188 |
|
---|
| 189 | TRY
|
---|
| 190 | {
|
---|
[51] | 191 | context = (CF_DEBUG_CTX *) calloc (sizeof (CF_DEBUG_CTX), 1);
|
---|
| 192 | if (context == NULL)
|
---|
[6] | 193 | {
|
---|
[51] | 194 | result = CF_ERROR_DEBUG_ALLOCATE_CTX;
|
---|
[6] | 195 | TRY_BREAK;
|
---|
| 196 | }
|
---|
| 197 |
|
---|
[51] | 198 | result = CF_Mutex_Create (&context->mutex);
|
---|
| 199 | if (result < 0)
|
---|
[6] | 200 | {
|
---|
| 201 | TRY_BREAK;
|
---|
| 202 | }
|
---|
| 203 |
|
---|
[51] | 204 | *ctx = (CF_Debug_Ctx) context;
|
---|
[6] | 205 | }
|
---|
| 206 | CATCH_IF (result < 0)
|
---|
| 207 | {
|
---|
[51] | 208 | CF_Debug_DestroyCtx (context);
|
---|
[6] | 209 | }
|
---|
| 210 |
|
---|
| 211 | return CF_OK;
|
---|
| 212 | }
|
---|
| 213 |
|
---|
[35] | 214 | /**
|
---|
| 215 | * 디버그 메시지를 지정된 파일 포인터로 출력
|
---|
| 216 | *
|
---|
| 217 | * @return 성공 시, CF_OK; 실패 시, 오류 코드
|
---|
| 218 | *
|
---|
| 219 | * @param fp 파일 포인터. 표준출력(stdout) 및 표준오류(stderr) 사용 가능
|
---|
| 220 | * @param file 파일 경로
|
---|
| 221 | * @param func 함수 이름
|
---|
| 222 | * @param line 라인 넘버
|
---|
| 223 | * @param fmt 포맷 스트링
|
---|
| 224 | * @param ... 가변 인자
|
---|
| 225 | *
|
---|
| 226 | * @see CF_DEBUG_PRINT
|
---|
| 227 | */
|
---|
[6] | 228 | int
|
---|
[16] | 229 | CF_Debug_Print (FILE * fp,
|
---|
| 230 | const char * file,
|
---|
| 231 | const char * func,
|
---|
| 232 | const int line,
|
---|
| 233 | const char * fmt, ...)
|
---|
| 234 | {
|
---|
| 235 | va_list valist;
|
---|
| 236 |
|
---|
| 237 | va_start (valist, fmt);
|
---|
| 238 | CF_Debug_Local_Print (fp, file, func, line, fmt, valist);
|
---|
| 239 | va_end (valist);
|
---|
| 240 |
|
---|
| 241 | return CF_OK;
|
---|
| 242 | }
|
---|
| 243 |
|
---|
[35] | 244 | /**
|
---|
| 245 | * 바이너리 데이터를 디버그 메시지와 함께 지정된 파일 포인터로 출력
|
---|
| 246 | *
|
---|
| 247 | * @return CF_OK 반환
|
---|
| 248 | *
|
---|
| 249 | * @param fp 파일 포인터. 표준출력(stdout) 및 표준오류(stderr) 사용 가능
|
---|
| 250 | * @param file 파일 경로
|
---|
| 251 | * @param func 함수 이름
|
---|
| 252 | * @param line 라인 넘버
|
---|
| 253 | * @param bin 라인 넘버
|
---|
| 254 | * @param len 바이너리 길이
|
---|
| 255 | * @param fmt 포맷 스트링
|
---|
| 256 | * @param ... 가변 인자
|
---|
| 257 | *
|
---|
| 258 | * @see CF_DEBUG_PRINT_BIN
|
---|
| 259 | */
|
---|
[16] | 260 | int
|
---|
| 261 | CF_Debug_PrintBin (FILE * fp,
|
---|
| 262 | const char * file,
|
---|
| 263 | const char * func,
|
---|
| 264 | const int line,
|
---|
| 265 | const unsigned char * bin,
|
---|
| 266 | const int len,
|
---|
| 267 | const char * fmt, ...)
|
---|
| 268 | {
|
---|
| 269 | va_list valist;
|
---|
| 270 |
|
---|
| 271 | va_start (valist, fmt);
|
---|
| 272 | CF_Debug_Local_Print (fp, file, func, line, fmt, valist);
|
---|
| 273 | va_end (valist);
|
---|
| 274 |
|
---|
| 275 | CF_Debug_Local_PrintBin (fp, file, func, line, bin, len);
|
---|
| 276 |
|
---|
| 277 | return CF_OK;
|
---|
| 278 | }
|
---|
| 279 |
|
---|
[35] | 280 | /**
|
---|
| 281 | * 컨텍스트에 콜스택 푸시
|
---|
| 282 | *
|
---|
| 283 | * @return 성공 시, CF_OK; 실패 시, 오류 코드
|
---|
| 284 | *
|
---|
| 285 | * @param ctx 디버그 컨텍스트
|
---|
| 286 | * @param file 파일 경로
|
---|
| 287 | * @param func 함수 이름
|
---|
| 288 | * @param line 라인 넘버
|
---|
| 289 | */
|
---|
[51] | 290 | static int
|
---|
[6] | 291 | CF_Debug_CallStackPush (CF_Debug_Ctx ctx,
|
---|
[9] | 292 | const char * file,
|
---|
[6] | 293 | const char * func,
|
---|
| 294 | const int line)
|
---|
| 295 | {
|
---|
| 296 | CF_DEBUG_CTX * context = (CF_DEBUG_CTX *) ctx;
|
---|
| 297 | CF_DEBUG_CALLSTACK * push = NULL;
|
---|
| 298 |
|
---|
| 299 | CHECK_INVALID_CTX (ctx);
|
---|
| 300 |
|
---|
| 301 | push = (CF_DEBUG_CALLSTACK *) calloc (sizeof (CF_DEBUG_CALLSTACK), 1);
|
---|
| 302 | if (push == NULL)
|
---|
| 303 | return CF_ERROR_DEBUG_PUSH_CALLSTACK;
|
---|
| 304 |
|
---|
[9] | 305 | /* push to callstack */
|
---|
| 306 | sprintf (push->file, "%s", file);
|
---|
[6] | 307 | sprintf (push->func, "%s", func);
|
---|
| 308 | push->line = line;
|
---|
| 309 | push->caller = context->callstack.caller;
|
---|
[52] | 310 | push->frameIndex = push->caller == NULL
|
---|
| 311 | ? 0
|
---|
| 312 | : push->caller->frameIndex + 1;
|
---|
[6] | 313 | context->callstack.caller = push;
|
---|
| 314 |
|
---|
[26] | 315 | CF_Debug_Local_UpdateCtx (ctx, file, func, line);
|
---|
[9] | 316 |
|
---|
[6] | 317 | return CF_OK;
|
---|
| 318 | }
|
---|
| 319 |
|
---|
[35] | 320 | /**
|
---|
[51] | 321 | * 컨텍스트에서 콜스택에서 TOP을 제거하지 않고 가져옴
|
---|
[35] | 322 | *
|
---|
| 323 | * @return 성공 시, CF_OK; 실패 시, 오류 코드
|
---|
| 324 | *
|
---|
| 325 | * @param ctx 디버그 컨텍스트
|
---|
| 326 | * @param callstack 콜스택 정보를 가져올 콜스택 데이터 구조체 포인터
|
---|
| 327 | *
|
---|
[51] | 328 | * @see CF_Debug_CallStack
|
---|
[35] | 329 | */
|
---|
[51] | 330 | static int
|
---|
| 331 | CF_Debug_CallStackPeek (CF_Debug_Ctx ctx,
|
---|
| 332 | CF_Debug_CallStack * callstack)
|
---|
[6] | 333 | {
|
---|
| 334 | CF_DEBUG_CTX * context = (CF_DEBUG_CTX *) ctx;
|
---|
| 335 | CF_DEBUG_CALLSTACK * pop = NULL;
|
---|
| 336 |
|
---|
| 337 | pop = context->callstack.caller;
|
---|
| 338 | if (pop == NULL)
|
---|
[51] | 339 | return CF_ERROR_DEBUG_PEEK_CALLSTACK;
|
---|
[6] | 340 |
|
---|
[9] | 341 | if (callstack != NULL)
|
---|
| 342 | {
|
---|
[14] | 343 | sprintf (callstack->file , "%s", pop->file);
|
---|
[9] | 344 | sprintf (callstack->function, "%s", pop->func);
|
---|
| 345 | callstack->line = pop->line;
|
---|
| 346 | }
|
---|
[6] | 347 |
|
---|
[51] | 348 | return CF_OK;
|
---|
| 349 | }
|
---|
| 350 |
|
---|
| 351 | /**
|
---|
| 352 | * 컨텍스트에서 콜스택 팝
|
---|
| 353 | *
|
---|
| 354 | * @return 성공 시, CF_OK; 실패 시, 오류 코드
|
---|
| 355 | *
|
---|
| 356 | * @param ctx 디버그 컨텍스트
|
---|
| 357 | * @param callstack 콜스택 정보를 가져올 콜스택 데이터 구조체 포인터
|
---|
| 358 | *
|
---|
| 359 | * @see CF_Debug_CallStack
|
---|
| 360 | */
|
---|
| 361 | static int
|
---|
| 362 | CF_Debug_CallStackPop (CF_Debug_Ctx ctx,
|
---|
| 363 | CF_Debug_CallStack * callstack)
|
---|
| 364 | {
|
---|
| 365 | CF_DEBUG_CTX * context = (CF_DEBUG_CTX *) ctx;
|
---|
| 366 | CF_DEBUG_CALLSTACK * pop = NULL;
|
---|
| 367 |
|
---|
| 368 | CHECK_INVALID_CTX (ctx);
|
---|
| 369 |
|
---|
| 370 | pop = context->callstack.caller;
|
---|
| 371 | if (pop == NULL)
|
---|
| 372 | return CF_ERROR_DEBUG_POP_CALLSTACK;
|
---|
| 373 |
|
---|
| 374 | if (CF_Debug_CallStackPeek (ctx, callstack) < 0)
|
---|
| 375 | return CF_ERROR_DEBUG_PEEK_CALLSTACK;
|
---|
| 376 |
|
---|
[9] | 377 | memset (context->file, 0x00, sizeof (context->file));
|
---|
| 378 | memset (context->func, 0x00, sizeof (context->func));
|
---|
| 379 | context->line = 0;
|
---|
| 380 |
|
---|
| 381 | /* restore current context */
|
---|
| 382 | if (pop->caller != NULL)
|
---|
| 383 | {
|
---|
[26] | 384 | CF_Debug_Local_UpdateCtx (ctx,
|
---|
| 385 | pop->caller->file,
|
---|
| 386 | pop->caller->func,
|
---|
| 387 | pop->caller->line);
|
---|
[9] | 388 | }
|
---|
| 389 |
|
---|
[14] | 390 | context->callstack.caller = pop->caller;
|
---|
[6] | 391 | free (pop);
|
---|
| 392 |
|
---|
| 393 | return CF_OK;
|
---|
| 394 | }
|
---|
[51] | 395 |
|
---|
| 396 | /**
|
---|
| 397 | * 현재 콜스택을 출력
|
---|
| 398 | *
|
---|
| 399 | * @return 성공 시, CF_OK; 실패 시, 오류 코드
|
---|
| 400 | *
|
---|
| 401 | * @param fp 출력 할 파일 포인터
|
---|
| 402 | */
|
---|
| 403 | int
|
---|
| 404 | CF_Debug_PrintCallStack (FILE * fp)
|
---|
| 405 | {
|
---|
| 406 | int iter = 0;
|
---|
| 407 |
|
---|
| 408 | CF_DEBUG_CTX * ctx = gDebugSingleCtx;
|
---|
| 409 | CF_DEBUG_CALLSTACK * callstack = NULL;
|
---|
| 410 |
|
---|
| 411 | if (ctx == NULL)
|
---|
| 412 | return CF_ERROR_DEBUG_INVALID_CTX;
|
---|
| 413 |
|
---|
[53] | 414 | for ( callstack = ctx->callstack.caller
|
---|
| 415 | ; callstack
|
---|
| 416 | ; callstack = callstack->caller)
|
---|
[51] | 417 | {
|
---|
[52] | 418 | fprintf (fp, "#%-4d %s <%s:%d>\n",
|
---|
| 419 | iter++,
|
---|
[51] | 420 | callstack->func,
|
---|
| 421 | callstack->file,
|
---|
| 422 | callstack->line);
|
---|
[52] | 423 | }
|
---|
[51] | 424 |
|
---|
| 425 | return CF_OK;
|
---|
| 426 | }
|
---|
| 427 |
|
---|
| 428 | /**
|
---|
| 429 | * 함수 진입을 명시
|
---|
| 430 | *
|
---|
| 431 | * @return 성공 시, CF_OK; 실패 시, 오류 코드
|
---|
| 432 | *
|
---|
| 433 | * @param file 파일 경로
|
---|
| 434 | * @param func 함수 이름
|
---|
| 435 | * @param line 라인 넘버
|
---|
| 436 | *
|
---|
| 437 | * @see CF_Debug_LeaveFunction
|
---|
| 438 | */
|
---|
| 439 | int
|
---|
| 440 | CF_Debug_EnterFunction (const char * file,
|
---|
| 441 | const char * func,
|
---|
| 442 | const int line)
|
---|
| 443 | {
|
---|
| 444 | int result = 0;
|
---|
| 445 | CF_DEBUG_CTX * ctx = NULL;
|
---|
| 446 |
|
---|
| 447 | if (gDebugSingleCtx == NULL)
|
---|
| 448 | {
|
---|
| 449 | result = CF_Debug_CreateCtx (&gDebugSingleCtx);
|
---|
| 450 | if (result != CF_OK)
|
---|
| 451 | return result;
|
---|
| 452 | }
|
---|
| 453 | ctx = (CF_DEBUG_CTX *)gDebugSingleCtx;
|
---|
| 454 |
|
---|
| 455 | CF_Mutex_Lock (&ctx->mutex);
|
---|
| 456 | CF_Debug_CallStackPush (gDebugSingleCtx, file, func, line);
|
---|
| 457 | CF_Mutex_Unlock (&ctx->mutex);
|
---|
| 458 |
|
---|
| 459 | return CF_OK;
|
---|
| 460 | }
|
---|
| 461 |
|
---|
| 462 | /**
|
---|
| 463 | * 함수 종료를 명시
|
---|
| 464 | *
|
---|
| 465 | * @return 성공 시, CF_OK; 실패 시, 오류 코드
|
---|
| 466 | *
|
---|
| 467 | * @see CF_Debug_EnterFunction
|
---|
| 468 | */
|
---|
| 469 | int
|
---|
| 470 | CF_Debug_LeaveFunction (void)
|
---|
| 471 | {
|
---|
| 472 | CF_DEBUG_CTX * ctx = (CF_DEBUG_CTX *)gDebugSingleCtx;
|
---|
| 473 |
|
---|
| 474 | if (ctx == NULL)
|
---|
| 475 | return CF_ERROR_DEBUG_INVALID_CTX;
|
---|
| 476 |
|
---|
| 477 | CF_Mutex_Lock (&ctx->mutex);
|
---|
| 478 | CF_Debug_CallStackPop (gDebugSingleCtx, NULL);
|
---|
| 479 | CF_Mutex_Unlock (&ctx->mutex);
|
---|
| 480 |
|
---|
| 481 | return CF_OK;
|
---|
| 482 | }
|
---|