update the pytorch-gdb example so that it works on current master (#61175)
Summary:
As pointed out by https://github.com/pytorch/pytorch/pull/54339#issuecomment-872827580, the `pytorch-gdb` example is currently broken because the code has been refactored.
This PR updates the example so that it works again.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/61175
Reviewed By: heitorschueroff
Differential Revision: D29660336
Pulled By: ezyang
fbshipit-source-id: 8bcd32fc583c0b28a705ef37203ce7ad4d636732