Am 29.01.2013 10:23, schrieb Guan Xuetao: >> -----邮件原件----- >> 发件人: Andreas Färber [mailto:afaer...@suse.de] >> 发送时间: Sunday, January 27, 2013 21:32 >> 收件人: qemu-devel@nongnu.org >> 抄送: Andreas Färber; Guan Xuetao (maintainer:UniCore32) >> 主题: [RFC 19/19] target-unicore32: Refactor debug output macros >> >> Make debug output compile-testable even if disabled. >> >> Signed-off-by: Andreas Färber <afaer...@suse.de> > > The patch could work, but I don't think it's a good idea.
Yes, I agree. The plan for v2 is to use static inline functions and to keep using #ifdef rather than #if. > Perhaps tracetools can be better. Tracepoints are not as flexible as they require a fixed set of up to 6(?) arguments. But yes, if you were to replace these macros in unicore32 code with specific tracepoints that would solve the issue at hand as well and would even allow to enable/disable them at runtime. CC'ing some more people on this new input. Maybe there would be a common subset of tracepoints? Anthony mentioned LOG_EXCP and LOG_DIS; would not only the names but also the arguments be generalizable? Regards, Andreas -- SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg