This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Add support for hooking prefix commands
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Sorin Otescu <sorinu at gmail dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 09 Mar 2011 14:40:19 +0200
- Subject: Re: [patch] Add support for hooking prefix commands
- References: <4D776143.4000200@gmail.com>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> Date: Wed, 09 Mar 2011 13:15:15 +0200
> From: Sorin Otescu <sorinu@gmail.com>
>
> 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:
Thanks.
> define hook-info_threads
> define hookpost-info_threads
Can we have underscore characters in commands? If so, this
implementation would defeat hooking them.
Anyway, if this is accepted, please write a short patch for the manual
as well.