#!/bin/bash

sed -i .config \
    -e "s/^# CONFIG_SLUB_DEBUG .*$/CONFIG_SLUB_DEBUG=y/" \
    -e "s/^# CONFIG_BC_DEBUG .*$/CONFIG_BC_DEBUG=y/" \
    -e "s/^# CONFIG_DETECT_SOFTLOCKUP .*$/CONFIG_DETECT_SOFTLOCKUP=y/" \
    -e "s/^# CONFIG_SLUB_DEBUG_ON .*$/CONFIG_SLUB_DEBUG_ON=y/" \
    -e "s/^# CONFIG_DEBUG_RT_MUTEXES .*$/CONFIG_DEBUG_RT_MUTEXES=y/" \
    -e "s/^# CONFIG_DEBUG_HIGHMEM .*$/CONFIG_DEBUG_HIGHMEM=y/" \
    -e "s/^# CONFIG_DEBUG_VM .*$/CONFIG_DEBUG_VM=y/" \
    -e "s/^# CONFIG_DEBUG_SG .*$/CONFIG_DEBUG_SG=y/" \
    -e "s/^# CONFIG_DEBUG_FRAME_POINTER .*$/CONFIG_DEBUG_FRAME_POINTER=y/" \
    -e "s/^# CONFIG_DEBUG_SPINLOCK .*$/CONFIG_DEBUG_SPINLOCK=y/" \
    -e "s/^# CONFIG_DEBUG_MUTEXES .*$/CONFIG_DEBUG_MUTEXES=y/" \
    -e "s/^# CONFIG_DEBUG_LOCK_ALLOC .*$/CONFIG_DEBUG_LOCK_ALLOC=y/" \
    -e "s/^# CONFIG_DEBUG_SPINLOCK_SLEEP .*$/CONFIG_DEBUG_SPINLOCK_SLEEP=y/" \
    -e "s/^# CONFIG_DEBUG_LIST .*$/CONFIG_DEBUG_LIST=y/" \
    -e "s/^# CONFIG_DEBUG_RODATA .*$/CONFIG_DEBUG_RODATA=y/" \
    -e "\$a# CONFIG_DEBUG_LOCKDEP is not set" \
    -e "s/^# CONFIG_PROVE_LOCKING .*$/CONFIG_PROVE_LOCKING=y/" \
    -e "\$aCONFIG_BC_DEBUG_IO=y" \
    -e "\$aCONFIG_BC_DEBUG_KMEM=y" \
    -e "\$a# CONFIG_BC_KEEP_UNUSED is not set" \
    -e "\$a# CONFIG_BC_DEBUG_ITEMS is not set" \
    -e "\$a# CONFIG_BC_UNLIMITED is not set" \
