This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Undefine python command


"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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]