Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Philippe Waroquiers <philippe.waroquiers@skynet.be>
Cc: Pedro Alves <palves@redhat.com>,  Tom Tromey <tom@tromey.com>,
	 gdb-patches@sourceware.org
Subject: Re: [RFA 0/4] Improve "show style", use style in "help" and "apropos".
Date: Wed, 19 Jun 2019 19:44:00 -0000	[thread overview]
Message-ID: <87tvcle4xs.fsf@tromey.com> (raw)
In-Reply-To: <1560903910.8865.10.camel@skynet.be> (Philippe Waroquiers's	message of "Wed, 19 Jun 2019 02:25:10 +0200")

>>>>> "Philippe" == Philippe Waroquiers <philippe.waroquiers@skynet.be> writes:

Philippe> Note that I am envisaging to do a small addition
Philippe> to the 'define' command so as to make it slightly
Philippe> easier to write a 'define wrapper shortcut' around
Philippe> a 'with command'.

Philippe> Something like:
Philippe> define Lc
Philippe>   with language c -- $arg@
Philippe> end

Philippe> But the 'define' parser seems to not understand that
Philippe> a 'with' line can start an 'if' that needs a
Philippe> corresponding 'end'.

I'm surprised "with if" is intended to work, but if it is, then that's
just a bug.

If it needs special handling for "if" it will probably also need it for
the other multi-line commands.

Philippe> Alternatively, we should allow alias to accept 'arguments':
Philippe> Instead of:
Philippe>    (gdb) alias Lc = with language c --
Philippe>    Invalid command to alias to: with language c --

I think that would be a reasonable addition.  I was surprised this
wasn't done initially.

Philippe> I have in a corner a patch that allows to add default arguments to
Philippe> a command or an alias, which gives more or less the above, but using
Philippe> 2 successive actions:
Philippe>   (gdb) alias bt2 = bt
Philippe>   (gdb) help add-args 
Philippe>   Specify additional arguments to preprend to user provided command arguments.
Philippe>   Usage:  add-args COMMAND [= ADDITIONAL_ARGS...]
Philippe>   Allows to specify or clear the additional arguments automatically
Philippe>   prepended to the user provided arguments when COMMAND is run.

I am not so sure about this.  It seems pretty obscure.  Maybe a more
gdb-ish way of doing this would be to introduce "set" parameters to
control the defaults of the relevant commands.

Philippe> So, maybe I should finalize an RFA for this add-args idea in preference
Philippe> to the 'alias argument idea' and/or to the '$arg@' idea.

I'm also not sure about the $arg@ idea, or maybe just the spelling of
it.

Tom


  reply	other threads:[~2019-06-19 19:44 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-31 13:19 Philippe Waroquiers
2019-05-31 13:19 ` [RFA 1/4] Add highlight style, title style, fputs_highlighted. Improve 'show style' Philippe Waroquiers
2019-05-31 20:10   ` Tom Tromey
2019-06-01  8:47     ` Philippe Waroquiers
2019-06-03 14:21       ` Tom Tromey
2019-05-31 13:19 ` [RFA 2/4] Improve usability and/or readibility of help and apropos output Philippe Waroquiers
2019-05-31 20:22   ` Tom Tromey
2019-05-31 13:19 ` [RFA 4/4] Document in NEWS and gdb.texinfo the "help", "apropos" and "show style" changes Philippe Waroquiers
2019-05-31 13:46   ` Eli Zaretskii
2019-05-31 13:19 ` [RFA 3/4] Update tests following changes to "help" and "apropos" Philippe Waroquiers
2019-05-31 20:34   ` Tom Tromey
2019-05-31 20:35 ` [RFA 0/4] Improve "show style", use style in " Tom Tromey
2019-06-18 13:09 ` Pedro Alves
2019-06-18 16:04   ` Tom Tromey
2019-06-18 20:11   ` Philippe Waroquiers
2019-06-18 20:46     ` Tom Tromey
2019-06-18 20:53       ` Philippe Waroquiers
2019-06-18 20:58         ` Philippe Waroquiers
2019-06-18 22:40           ` Pedro Alves
2019-06-19  0:25             ` Philippe Waroquiers
2019-06-19 19:44               ` Tom Tromey [this message]
2019-06-19 19:26             ` Tom Tromey
2019-06-19 22:56               ` Pedro Alves
2019-06-20 14:21                 ` Tom Tromey

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=87tvcle4xs.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.com \
    --cc=philippe.waroquiers@skynet.be \
    /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