Re: [PATCH 9/9] C++ compile support

Eli Zaretskii
2018-08-17T18:57:36Z

> Cc: gdb-patches@sourceware.org
> From: Keith Seitz <keiths@redhat.com>
> Date: Fri, 17 Aug 2018 10:50:53 -0700
>
> * GDB now has experimental support for the compilation and injection of
> C++ source code into the inferior. This beta release does not include
> support for several language features, such as templates, constructors,
> and operators.

This is fine, thanks.

> >> +* GDB now has experimental support for the compilation and injection of
> >> + C++ source code into the inferior. This feature requires the GCC C++
> >> + plug-in available since GCC 7.1.
> >
> > The last sentence basically means "only on ELF platforms", right? So
> > IMO this limitation should be stated explicitly, lest people get
> > excited, and then get disappointed.
>
> I'm not sure how to answer this. That seems like enumerating all the dependencies
> of every dependency GDB has (bfd, libiberty, bison, etc). The feature (like the
> C compile feature already included) requires the compiler plug-in. Whatever that
> plug-in supports is what GDB supports.

It is okay to say that this is supported only on platforms where
libcc1.so and the 'compile' command are available. My problem was
with not qualifying this at all.

> Would you like me to include something like: "Currently tested on x86_64
> GNU/Linux."

Using "currently" is generally not advisable, as the meaning of that
word changes with time.

> >> +set debug compile-oracle
> >> +show debug compile-oracle
> >> + Control the display of debug output about symbol requests from
> >> + the compiler plug-in.
> >> +
> >> +set debug compile-cplus-types
> >> +show debug compile-cplus-types
> >> + Control the display of debug output about C++ type conversion
> >> + in the compile feature.
> >
> > I suggest to mention that these commands are only available/have
> > effect if the C++ compilation is supported.
>
> Maybe this is better/clearer?
>
> set debug compile-cplus-types
> show debug compile-cplus-types
> Control the display of debug output about type conversion in the
> C++ compile feature. Commands have no effect while compiling for
> other languages.

Yes, better.

> Nonetheless, on second thought, it seems almost nonsensical to have a
> special debug flag just for this. So I've removed the option and just
> added the "oracle" debug output when the "normal" compile debug flag
> is set. WDYT?

OK.

> Would you like me to repost this patch?

That won't be needed, thanks.