[Pcsclite-cvs-commit] r6967 - trunk/Drivers/ccid/src

ludovic.rousseau at free.fr ludovic.rousseau at free.fr
Tue Sep 2 13:50:51 UTC 2014


Author: rousseau
Date: 2014-09-02 13:50:50 +0000 (Tue, 02 Sep 2014)
New Revision: 6967

Modified:
   trunk/Drivers/ccid/src/debug.h
Log:
Enable effect of --enable-embedded on hex dumps

Use LogXxd() instead of log_xxd() in the definition of DEBUG_XXD and
DEBUG_INFO_XXD.

LogXxd() is defined as nothing (and removed by the compiler) if NO_LOG
is enabled (using --enable-embedded). So the header text of DEBUG_XXD()
is no more stored in the .rodata section of the binary file.

'objdump -h --section=.rodata libccid.so' shows a gain of 38 bytes.


Modified: trunk/Drivers/ccid/src/debug.h
===================================================================
--- trunk/Drivers/ccid/src/debug.h	2014-09-01 18:27:42 UTC (rev 6966)
+++ trunk/Drivers/ccid/src/debug.h	2014-09-02 13:50:50 UTC (rev 6967)
@@ -75,7 +75,7 @@
 
 #define DEBUG_INFO5(fmt, data1, data2, data3, data4) if (LogLevel & DEBUG_LEVEL_INFO) Log5(PCSC_LOG_INFO, fmt, data1, data2, data3, data4)
 
-#define DEBUG_INFO_XXD(msg, buffer, size) if (LogLevel & DEBUG_LEVEL_INFO) log_xxd(PCSC_LOG_INFO, msg, buffer, size)
+#define DEBUG_INFO_XXD(msg, buffer, size) if (LogLevel & DEBUG_LEVEL_INFO) LogXxd(PCSC_LOG_INFO, msg, buffer, size)
 
 /* DEBUG_PERIODIC */
 #define DEBUG_PERIODIC(fmt) if (LogLevel & DEBUG_LEVEL_PERIODIC) Log1(PCSC_LOG_DEBUG, fmt)
@@ -94,7 +94,7 @@
 #define DEBUG_COMM4(fmt, data1, data2, data3) if (LogLevel & DEBUG_LEVEL_COMM) Log4(PCSC_LOG_DEBUG, fmt, data1, data2, data3)
 
 /* DEBUG_XXD */
-#define DEBUG_XXD(msg, buffer, size) if (LogLevel & DEBUG_LEVEL_COMM) log_xxd(PCSC_LOG_DEBUG, msg, buffer, size)
+#define DEBUG_XXD(msg, buffer, size) if (LogLevel & DEBUG_LEVEL_COMM) LogXxd(PCSC_LOG_DEBUG, msg, buffer, size)
 
 #endif
 




More information about the Pcsclite-cvs-commit mailing list