Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Sorin Otescu <sorinu@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: gdb-patches@sourceware.org
Subject: Re: [patch] Add support for hooking prefix commands
Date: Wed, 09 Mar 2011 13:36:00 -0000	[thread overview]
Message-ID: <4D777894.5040204@gmail.com> (raw)
In-Reply-To: <83oc5kpivg.fsf@gnu.org>

On 03/09/2011 02:40 PM, Eli Zaretskii wrote:
>> 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.
>
It is possible to define commands containing underscores, but none of 
the built-in commands
contain any (they all use dash).
> Anyway, if this is accepted, please write a short patch for the manual
> as well.
>
The documentation for 7.2 suggests this functionality is already there; 
the difference is that
you need to hook the last word of the command (in this case, 
hook-threads). I wonder if
that's enough / better... This patch was generated from 7.0 and adapted 
to 7.2.


  reply	other threads:[~2011-03-09 12:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-09 12:35 Sorin Otescu
2011-03-09 12:58 ` Eli Zaretskii
2011-03-09 13:36   ` Sorin Otescu [this message]
2011-03-09 14:01     ` Eli Zaretskii
2011-03-09 14:03       ` Sorin Otescu
2011-03-09 14:15         ` Eli Zaretskii
2011-03-09 14:22         ` Eli Zaretskii
2011-03-09 15:08           ` Sorin Otescu

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=4D777894.5040204@gmail.com \
    --to=sorinu@gmail.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    /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