It's easier if the program is compiled with debug information, but you can do it even with an optimized "release" executable, although you're depending a lot more on your knowledge of the underlying ...