Changeset 52 in libcf
- Timestamp:
- 04/03/13 16:34:22 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/cf_debug.c
r51 r52 308 308 push->line = line; 309 309 push->caller = context->callstack.caller; 310 push->frameIndex = context->callstack.frameIndex + 1; 310 push->frameIndex = push->caller == NULL 311 ? 0 312 : push->caller->frameIndex + 1; 311 313 context->callstack.caller = push; 312 314 … … 410 412 return CF_ERROR_DEBUG_INVALID_CTX; 411 413 412 callstack = &ctx->callstack; 413 414 do 415 { 416 if (callstack == NULL) 417 break; 418 419 fprintf (fp, "#%04d %s (%s:%d)\n", 420 iter, 414 for (callstack = ctx->callstack.caller ; callstack ; callstack = callstack->caller) 415 { 416 fprintf (fp, "#%-4d %s <%s:%d>\n", 417 iter++, 421 418 callstack->func, 422 419 callstack->file, 423 420 callstack->line); 424 425 callstack = callstack->caller; 426 } while (iter++ < ctx->callstack.frameIndex); 421 } 427 422 428 423 return CF_OK;
Note:
See TracChangeset
for help on using the changeset viewer.