public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Fix gdb.base/print-file-var.exp with Clang
@ 2020-10-13 17:26 Gary Benson
  2020-10-13 17:26 ` [PATCH 1/2] Detect and report incompatible gdb_compile options Gary Benson
  2020-10-13 17:26 ` [PATCH 2/2] Fix gdb.base/print-file-var.exp with Clang Gary Benson
  0 siblings, 2 replies; 9+ messages in thread
From: Gary Benson @ 2020-10-13 17:26 UTC (permalink / raw)
  To: gdb-patches

Hi all,

The C++ parts of gdb.base/print-file-var.exp failed to build with
Clang because the "-x c++" option added by gdb_compile caused the
compiler to attempt to parse .so files as C++.  Not only did this
fail to compile, it also resulted in a MAHOOSSIVE gdb.log of over
100Mb for that single test, as Clang happily dumped the "lines"
of the binary file it felt violated the C++ standard.

The first patch of this series adds code to gdb_compile to detect
this situation and report an error.  The second patch is the actual
fix: it separates the options for the compiler and linker into two
lists, and uses build_executable_from_specs to perform the build
as it can handle this separation.

Checked on Fedora 32 x86_64, with GCC and Clang.  Is this ok to
commit?

Cheers,
Gary

--
Gary Benson - he / him / his
Principal Software Engineer, Red Hat


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-11-02 14:24 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-13 17:26 [PATCH 0/2] Fix gdb.base/print-file-var.exp with Clang Gary Benson
2020-10-13 17:26 ` [PATCH 1/2] Detect and report incompatible gdb_compile options Gary Benson
2020-10-23 13:04   ` Pedro Alves
2020-11-02 14:23     ` Gary Benson
2020-10-30 18:45   ` Tom Tromey
2020-10-13 17:26 ` [PATCH 2/2] Fix gdb.base/print-file-var.exp with Clang Gary Benson
2020-10-23 13:05   ` Pedro Alves
2020-11-02 14:24     ` Gary Benson
2020-10-30 18:45   ` Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).