[patch] Add support for hooking prefix commands
Sorin Otescu
sorinu@gmail.com
Wed Mar 9 12:35:00 GMT 2011
Hi all,
I recently needed to add a hook for the "info threads" command.
Unfortunately, this was not possible because GDB only allows hooking of
single word commands.
This patch adds support for multi-word command (prefix command) hooks.
In my case, the format of the hook commands is:
define hook-info_threads
define hookpost-info_threads
Sorin
gdb/cli/
2011-03-09 Sorin Otescu<sorinu@gmail.com>
* cli-script.c (define_command): Add support for hooking prefix commands.
Example usage: for hooking "info threads", a hook command will be defined as:
define hook-info_threads and/or define hookpost-info_threads
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cli-script.c.patch
Type: text/x-patch
Size: 1986 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20110309/28acc94a/attachment.bin>
More information about the Gdb-patches
mailing list