From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7655 invoked by alias); 9 Mar 2011 12:40:56 -0000 Received: (qmail 7647 invoked by uid 22791); 9 Mar 2011 12:40:55 -0000 X-SWARE-Spam-Status: No, hits=-0.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtaout21.012.net.il (HELO mtaout21.012.net.il) (80.179.55.169) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 09 Mar 2011 12:40:50 +0000 Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0LHS00E00J4LGI00@a-mtaout21.012.net.il> for gdb-patches@sourceware.org; Wed, 09 Mar 2011 14:40:21 +0200 (IST) Received: from HOME-C4E4A596F7 ([77.124.58.59]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LHS00DLJJ77ZV80@a-mtaout21.012.net.il>; Wed, 09 Mar 2011 14:40:20 +0200 (IST) Date: Wed, 09 Mar 2011 12:58:00 -0000 From: Eli Zaretskii Subject: Re: [patch] Add support for hooking prefix commands In-reply-to: <4D776143.4000200@gmail.com> To: Sorin Otescu Cc: gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <83oc5kpivg.fsf@gnu.org> References: <4D776143.4000200@gmail.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-03/txt/msg00592.txt.bz2 > Date: Wed, 09 Mar 2011 13:15:15 +0200 > From: Sorin Otescu > > 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.