Re: / (slash) command : fast way to temporarily change setting(s) to run a command

Philippe Waroquiers <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
On Fri, 2019-05-03 at 09:23 +0100, Pedro Alves wrote:
> > 
> > I like this rationale for the global / command.
> > 
> > I'd like to wait a bit longer before reviewing Philippe's patch, however.
> > I know that one of my colleagues has some thoughts on the interface
> > and I'd like to give him a little extra time to express them here...
> 
> That was me.  :-)  See here:
> 
>  https://sourceware.org/ml/gdb-patches/2019-05/msg00002.html
> 
> I'll follow up when I have a chance.  Yesterday I fixed the
> regressions that Philippe pointed at (fixes already in the branch) -- I
> wanted to see if it was possible to get to a clean slate for better
> experimenting / better ground for discussion.
Thanks for this.
Note that  I have listed some points for the discussion in
https://sourceware.org/ml/gdb-patches/2019-05/msg00019.html

IMO, a (the?) major question I still have about keeping (or not) the "/"
patch is for options that have a 'wide' impact.
The "/" command avoids that this option has to be added as a specific
argument to all the commands that are impacted directly or indirectly.
An example is the new max-depth.
As far as I understand, max-depth will at least impact:
   backtrace
   print
   frame
   info args
   ...
(in fact all commands that are printing directly or indirectly
some variables).
With the "/" command, you have a way to influence all these commands.
Otherwise, as far as I understand, an option --max-depth has
to be added to all these commands.
(or the user has to do set/launch command/reset).

Philippe
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.