Last change
on this file since 51 was 51, checked in by cheese, 11 years ago |
#1 change the debugging utiltity to support single context with mutex
|
File size:
647 bytes
|
Rev | Line | |
---|
[35] | 1 | /**
|
---|
| 2 | * @file debug.c
|
---|
| 3 | * @author myusgun <myusgun@gmail.com>
|
---|
| 4 | * @version 0.1
|
---|
| 5 | */
|
---|
| 6 | #include "cf_file.h"
|
---|
| 7 | #include "cf_debug.h"
|
---|
| 8 |
|
---|
[51] | 9 | #include <string.h>
|
---|
[35] | 10 |
|
---|
| 11 | void callee (void) {
|
---|
[51] | 12 | CF_DEBUG_BEGIN_FUNCTION;
|
---|
| 13 |
|
---|
| 14 | CF_Debug_PrintCallStack (stdout);
|
---|
| 15 |
|
---|
| 16 | CF_DEBUG_END_FUNCTION;
|
---|
[35] | 17 | }
|
---|
| 18 |
|
---|
| 19 | int main (void) {
|
---|
[51] | 20 | char data[] =
|
---|
| 21 | "【 曲名 : 사랑하고 있는데 】\n"
|
---|
| 22 | "《 歌 : Kylee 》\n"
|
---|
| 23 | "『 절원의 템페스트 OP2 Theme 』\n";
|
---|
[35] | 24 |
|
---|
[51] | 25 | CF_DEBUG_BEGIN_FUNCTION;
|
---|
[35] | 26 |
|
---|
[51] | 27 | CF_DEBUG_PRINT (stderr, "print message with context to stderr\n");
|
---|
[35] | 28 |
|
---|
[51] | 29 | CF_DEBUG_PRINT_BIN (stdout, (unsigned char *) data, (int) sizeof (data), "hehehehe\n");
|
---|
[35] | 30 |
|
---|
[51] | 31 | callee ();
|
---|
[35] | 32 |
|
---|
[51] | 33 | CF_DEBUG_END_FUNCTION;
|
---|
[35] | 34 |
|
---|
| 35 | return 0;
|
---|
| 36 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.