ipdb: change generic callback API

Refer to the code