10 Debug System
akallabeth edited this page 2018-12-17 09:18:09 +01:00

FreeRDP relies on the debug primitives provided by WinPR

It consists of

  • A logging system (defined in winpr/include/winpr/wlog.h)
  • A backtrace system (defined in winpr/include/winpr/debug.h)

Logger

  • The logger WLog is capable of supporting various backends (stdout, files, sockets, ...)
  • Can be filtered:
    • Global log level
    • Different logging levels per TAG
  • Static and dynamic use
    • Static for use where the message is not performance critical (A global tree is searched to finding the corresponding logger)
    • Dynamic to speed things up (A reference to the logging configuration is held in memory)

Backtracing

  • With the primitives in winpr/include/winpr/debug.h a stack trace can be obtained (or logged to WLog)
  • Verbosity of these backtraces depends on compilation settings
  • Debug symbols are required for human readable traces