发布时间:2013-01-05 15:33:53
Sometimes you may want to get offsets of a structure fields. This will be useful when you are doing manual debugging of memory dump. So, there should be a way to calculate the offsets of a particular fields. Debugging information in an object file contains offsets of a data structure as wel......【阅读全文】
发布时间:2012-12-21 09:58:25
1. 点击(此处)折叠或打开#ifndef _DEBUG_H_#define _DEBUG_H_#include <stdio.h>#define DEBUG 0#define TRACE 0#if DEBUG#define PDEBUG(fmt, args...) fprintf(stderr, fmt, ##args)#else#define PDEBUG(fmt, args...)#endif#if TRACE#define PTRACE(fmt, args...) fprintf(stdout, fmt, ##args)#else#define PTRACE(fmt, ......【阅读全文】