Refactored handling of debug symbols