láo​xīn​kǔ​sī

to rack one's brains