Convert event_debug_*() helpers from macros to static functions (cherry picked from commit f0fd92f2c41fd5bf3b270ee338089dd9329d0354)