Undefine python command

Paul Koning paul_koning@dell.com
Thu Mar 31 19:46:00 GMT 2011


"del" is the way.

def foo():
  print "hello world"

foo()
hello world
del foo
foo()
Traceback...
NameError: name 'foo' is not defined.

	paul

On Mar 31, 2011, at 3:27 PM, Michel METZGER wrote:

> Hi,
> 
> Is there a way to remove a commands defined in Python?
> I need to define specific commands depending on the type of binary being debugged. It's not a problem for the first binary loaded, 
> but if the user loads a new binary with 'file', I will need to remove some commands.
> 
> Thanks,
> 
> Michel.



More information about the Gdb mailing list