Re: GDB BoF notes - GNU Cauldron 2023

John Baldwin <[email protected]>
Newsgroups gmane.comp.gdb.devel
Message-ID <[email protected]>
On 9/27/23 1:41 PM, Pedro Alves wrote:
> - Can we require C++17?
> 
>    Lancelot has patches for this.
> 
>    Looked at / discussed policy established when we migrated to C++11:
>     https://sourceware.org/gdb/wiki/Internals%20GDB-C-Coding-Standards#When_is_GDB_going_to_start_requiring_C.2B-.2B-NN_.3F
> 
>       "Our general policy is to wait until the oldest compiler that
>        supports C++NN is at least 3 years old."
> 
>    Discussion about whether the bump is problematic for current
>    distros.
> 
>    Looked for first GCC version that claims supports C++17.  In GCC 9
>    release notes: "The C++17 implementation is no longer experimental."
>    GCC 9.1 was released on May 3, 2019.
> 
>    Do we need full C++17, though?  We can use language features even if
>    the standard library implementation doesn't support everything.
> 
>    Were there actual ABI breakages between compiler releases before it
>    was made non-experimental, though?  AI: ask Jonathan Wakely.
> 
>    On whether we have easy availability of a new enough compiler in
>    distros, in practice:
> 
>    - Tom de Vries to double check for SuSE.
> 
>    - Carlos O'Donell confirms that for RHEL we're good, because of GCC
>      Toolset.
> 
>    - Someone should check Debian/Ubuntu and others.
> 
>    - BSDs tend to have easy access to recent Clang.

Confirming this point.  Lancelot had asked me about this earlier and all
of the BSD's have succifient clang or GCC in relevant releases.

> - Revisiting defaults
> 
>    - Can we turn history saving on by default?  Maybe default to
>      history on home dir by default, too (~/.gdb_history).  That would
>      align us with bash.  Some in the room have had this enabled in
>      their gdbinits for so long they no longer remembered this wasn't
>      on by default.  Others weren't even aware you can turn this on.
> 
>    - Can we disable pagination by default?  Surprisingly, no one in the
>      room expressed that they like pagination on.  Sevearl people
>      mentioned that they have it off by default, and then use either
>      the terminal scroll function, or:
> 
>        "(gdb) pipe GDB_COMMAND | less"
> 
>      when necessary.

+1 to both of these.  One caveat about the pagination case is that I
use custom commands that can sometimes generate a lot of output (e.g.
walking linked-lists in a kernel crash image outputting info about
each entry, or similar things for entries in descriptor rings).  If one
of these scripts has a bug that causes an infinite loop, the pager
seems to be the only way to stop the command.  In particular, Ctrl-C
doesn't work in my experience to cancel a user command stuck in an
infinite loop.  It might be nice to ensure that Ctrl-C can cancel both
user and builtin commands that are either stuck or generating reams of
output.

-- 
John Baldwin
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.