X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fbin%2Fe_log.h;h=99a152950129134f8f2661faefb2ca7d00a999fd;hb=d3804438a62fda5fba2e97a51bdfc8a3ecdb091e;hp=35295254d725a2ded5d1120d3c3f8bbcbc19dbf3;hpb=75c6db32746edd0b3263b1d6fa33ede320517759;p=platform%2Fcore%2Fuifw%2Fe17.git diff --git a/src/bin/e_log.h b/src/bin/e_log.h index 3529525..99a1529 100644 --- a/src/bin/e_log.h +++ b/src/bin/e_log.h @@ -43,6 +43,7 @@ EINTERN int e_log_shutdown(void); #define ELBT_ILLUME 0x00000010 #define ELBT_COMP 0x00000020 #define ELBT_MOVE 0x00000040 +#define ELBT_TRACE 0x00000080 #define ELBT_ALL 0xFFFFFFFF extern EAPI unsigned int e_logbuf_type; @@ -54,9 +55,26 @@ EAPI void e_logbuf_fmt_add(unsigned int type, unsigned int blank, const char #define ELB(t, s, i) do { if ((e_logbuf_type) & (t)) { e_logbuf_add((t), __FUNCTION__, __LINE__, (s), (i)); } } while (0); #define ELBF(t, b, i, f, x...) do { if ((e_logbuf_type) & (t)) { e_logbuf_fmt_add((t), (b), __FUNCTION__, __LINE__, (i), f, ##x); } } while (0); +#define ELB_BACKTRACE() \ + do \ + { \ + void* frame_addrs[16]; \ + char** frame_strings; \ + size_t backtrace_size; \ + int i; \ + backtrace_size = backtrace(frame_addrs, 16); \ + frame_strings = backtrace_symbols(frame_addrs, backtrace_size); \ + for (i = 0; i < backtrace_size; ++i) \ + { \ + ELBF(ELBT_TRACE, 0, 0, "%d: [0x%x] %s", i, frame_addrs[i], frame_strings[i]); \ + } \ + free(frame_strings); \ + } \ + while (0); #else #define ELB(...) ; #define ELBF(...) ; +#define ELB_BACKTRACE() ; #endif #endif