Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Andrew Burgess <andrew.burgess@embecosm.com>,
	Marco Barisione <mbarisione@undo.io>
Cc: Tom Tromey <tom@tromey.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH v2] Add a way to preserve overridden GDB commands for later invocation
Date: Wed, 06 Nov 2019 16:00:00 -0000	[thread overview]
Message-ID: <88223a28-9edf-d7bb-92ed-2fdeaea0c491@redhat.com> (raw)
In-Reply-To: <20191105101745.GC11037@embecosm.com>

On 11/5/19 10:17 AM, Andrew Burgess wrote:
> in order to get the base version of the command.  Second, with some
> extra work we could make the existing hook mechanism redundant, and
> possibly provide something more flexible (maybe?), consider:
> 
>   define delete
>     echo Basically a pre-hook here\n
>     uplevel -1 delete $argv
>     echo Basically a post-hook here\n
>   end
> 
> Notice I just invented '$argv' on the fly there - this doesn't exist
> currently, but I'm imagining that this would expand to all of the
> arguments passed to the newly defined 'delete' command.

Something like "$@" would be better than $argv, because the latter
implies that arguments are split into an "argument vector", which doesn't
work correctly in general because different commands split arguments
in different forms.

Thanks,
Pedro Alves


      parent reply	other threads:[~2019-11-06 16:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-28 13:33 [PATCH] " Marco Barisione
2019-10-28 17:36 ` Eli Zaretskii
2019-10-28 18:12   ` Marco Barisione
2019-11-01  8:55 ` [PATCH v2] " Marco Barisione
2019-11-01  9:14   ` Eli Zaretskii
2019-11-01 19:18   ` Tom Tromey
2019-11-01 21:01     ` Marco Barisione
2019-11-05 10:17       ` Andrew Burgess
2019-11-06  8:42         ` Marco Barisione
2019-11-07 10:22           ` Marco Barisione
2019-11-06 16:00         ` Pedro Alves [this message]

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=88223a28-9edf-d7bb-92ed-2fdeaea0c491@redhat.com \
    --to=palves@redhat.com \
    --cc=andrew.burgess@embecosm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=mbarisione@undo.io \
    --cc=tom@tromey.com \
    /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