public inbox for gdb-prs@sourceware.org help / color / mirror / Atom feed
* [Bug python/15637] New: override a command from Python @ 2013-06-17 14:03 tromey at redhat dot com 2013-11-14 19:22 ` [Bug python/15637] " tromey at redhat dot com 2013-11-18 17:58 ` tromey at redhat dot com 0 siblings, 2 replies; 3+ messages in thread From: tromey at redhat dot com @ 2013-06-17 14:03 UTC (permalink / raw) To: gdb-prs http://sourceware.org/bugzilla/show_bug.cgi?id=15637 Bug ID: 15637 Summary: override a command from Python Product: gdb Version: HEAD Status: NEW Severity: enhancement Priority: P2 Component: python Assignee: unassigned at sourceware dot org Reporter: tromey at redhat dot com Right now if you write a command in Python that has the same name as an existing command, there is no way to access the previous command. It would be handy if this were possible. I have a partial patch for this; I'll upload or push it a bit later. Now your command's invoke method can use the super 'invoke' to access the previous command. -- You are receiving this mail because: You are on the CC list for the bug. ^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug python/15637] override a command from Python 2013-06-17 14:03 [Bug python/15637] New: override a command from Python tromey at redhat dot com @ 2013-11-14 19:22 ` tromey at redhat dot com 2013-11-18 17:58 ` tromey at redhat dot com 1 sibling, 0 replies; 3+ messages in thread From: tromey at redhat dot com @ 2013-11-14 19:22 UTC (permalink / raw) To: gdb-prs https://sourceware.org/bugzilla/show_bug.cgi?id=15637 --- Comment #1 from Tom Tromey <tromey at redhat dot com> --- This is on the branch "python/changes-for-gui" in my gitorious repository: https://gitorious.org/binutils-gdb -- You are receiving this mail because: You are on the CC list for the bug. ^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug python/15637] override a command from Python 2013-06-17 14:03 [Bug python/15637] New: override a command from Python tromey at redhat dot com 2013-11-14 19:22 ` [Bug python/15637] " tromey at redhat dot com @ 2013-11-18 17:58 ` tromey at redhat dot com 1 sibling, 0 replies; 3+ messages in thread From: tromey at redhat dot com @ 2013-11-18 17:58 UTC (permalink / raw) To: gdb-prs 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. ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-11-18 17:58 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2013-06-17 14:03 [Bug python/15637] New: override a command from Python tromey at redhat dot com 2013-11-14 19:22 ` [Bug python/15637] " tromey at redhat dot com 2013-11-18 17:58 ` tromey at redhat dot com
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).