Skip to content
Advertisement

unable to source user defined python gdb command

I’ve been following this amazing (video) tutorial to create custom user defined GDB command using python

here is my code

JavaScript

but when I try to source this code inside gdb I get following error:

JavaScript

what I’m doing wrong?

Advertisement

Answer

what I’m doing wrong?

Python is indentation-sensitive. You want:

JavaScript
Advertisement