[powerdebug 02/23] reorganize code to prevent forward declaration