From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31464 invoked by alias); 31 Mar 2011 19:46:18 -0000 Received: (qmail 31455 invoked by uid 22791); 31 Mar 2011 19:46:17 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from ausxippc101.us.dell.com (HELO ausxippc101.us.dell.com) (143.166.85.207) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 31 Mar 2011 19:46:13 +0000 X-Loopcount0: from 10.152.240.141 Subject: Re: Undefine python command Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Paul Koning In-Reply-To: <5B4CE209869C6A4797F5FAA0B348F0A0D9F183F45F@SAFEX1MAIL1.st.com> Date: Thu, 31 Mar 2011 19:46:00 -0000 Cc: "gdb@sourceware.org" Content-Transfer-Encoding: quoted-printable Message-Id: <4A96DB50-64BB-48FC-8515-E5367E59BA29@dell.com> References: <5B4CE209869C6A4797F5FAA0B348F0A0D9F183F45F@SAFEX1MAIL1.st.com> To: Michel METZGER X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2011-03/txt/msg00218.txt.bz2 "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, >=20 > 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,=20 > but if the user loads a new binary with 'file', I will need to remove som= e commands. >=20 > Thanks, >=20 > Michel.