This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Undefine python command
- From: Paul Koning <paul_koning at dell dot com>
- To: Michel METZGER <michel dot metzger at st dot com>
- Cc: "gdb at sourceware dot org" <gdb at sourceware dot org>
- Date: Thu, 31 Mar 2011 15:46:04 -0400
- Subject: Re: Undefine python command
- References: <5B4CE209869C6A4797F5FAA0B348F0A0D9F183F45F@SAFEX1MAIL1.st.com>
"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.