This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug python/15637] override a command from Python
- From: "tromey at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Mon, 18 Nov 2013 17:58:33 +0000
- Subject: [Bug python/15637] override a command from Python
- Auto-submitted: auto-generated
- References: <bug-15637-4717 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=15637
--- Comment #2 from Tom Tromey <tromey at redhat dot com> ---
It occurred to me that a single change could fix both
this and bug #13077.
If we had an API to get an existing gdb command as a
Command object, then we could simply invoke methods on it.
Redefining the CLI command would still work fine, since
the new command could simply keep a reference to the old
command.
For this to work nicely I think we'd want to have the
API return both a command and the unparsed part of a command
line (for completion). So:
(command, remainder) = gdb.command('p x * y')
would yield the <print> command and the string "x * y".
--
You are receiving this mail because:
You are on the CC list for the bug.