From: Michel METZGER <michel.metzger@st.com>
To: Paul Koning <paul_koning@dell.com>
Cc: "gdb@sourceware.org" <gdb@sourceware.org>
Subject: RE: Undefine python command
Date: Thu, 31 Mar 2011 20:10:00 -0000 [thread overview]
Message-ID: <5B4CE209869C6A4797F5FAA0B348F0A0D9F183F47E@SAFEX1MAIL1.st.com> (raw)
In-Reply-To: <4A96DB50-64BB-48FC-8515-E5367E59BA29@dell.com>
Apparently this doesn't work for gdb commands defined in python.
(Assuming I have a class HelloWorld that defines a new gdb command)
(gdb) python c = HelloWorld()
(gdb) hello-world
Hello, World!
(gdb) python del c
(gdb) hello-world
Hello, World!
Michel.
-----Original Message-----
From: Paul Koning [mailto:paul_koning@dell.com]
Sent: Thursday, March 31, 2011 3:46 PM
To: Michel METZGER
Cc: gdb@sourceware.org
Subject: 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.
next prev parent reply other threads:[~2011-03-31 20:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-31 19:28 Michel METZGER
2011-03-31 19:46 ` Paul Koning
2011-03-31 20:10 ` Michel METZGER [this message]
2011-04-01 13:11 ` Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5B4CE209869C6A4797F5FAA0B348F0A0D9F183F47E@SAFEX1MAIL1.st.com \
--to=michel.metzger@st.com \
--cc=gdb@sourceware.org \
--cc=paul_koning@dell.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox