From: Tom Tromey <tom@tromey.com>
To: Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
Cc: Simon Marchi <simon.marchi@polymtl.ca>,
Simon Marchi <simon.marchi@efficios.com>
Subject: Re: [PATCH 4/6] gdb/testsuite: add "macros" option to gdb_compile
Date: Thu, 07 Apr 2022 08:01:01 -0600 [thread overview]
Message-ID: <871qy9dmci.fsf@tromey.com> (raw)
In-Reply-To: <20220407015159.1734834-5-simon.marchi@polymtl.ca> (Simon Marchi via Gdb-patches's message of "Wed, 6 Apr 2022 21:51:57 -0400")
>>>>> "Simon" == Simon Marchi via Gdb-patches <gdb-patches@sourceware.org> writes:
Simon> From: Simon Marchi <simon.marchi@efficios.com>
Simon> Make gdb_compile handle a new "macros" option, which makes it pass the
Simon> appropriate flag to make the compiler include macro information in the
Simon> debug info. This will help simplify tests using macros, reduce
Simon> redundant code, and make it easier to add support for a new compiler.
Simon> Right now it only handles clang specially (using -fdebug-macro) and
Simon> falls back to -g3 otherwise (which works for gcc). Other compilers can
Simon> be added as needed.
I like this idea but I think the patch changes some tests a bit.
Simon> -set options {debug}
Simon> -
Simon> -get_compiler_info
Simon> -if { [test_compiler_info gcc*] } {
Simon> - lappend options "additional_flags=-g3"
Simon> -} elseif { [test_compiler_info clang*] } {
Simon> - lappend options "additional_flags=-fdebug-macro"
Simon> -} else {
Simon> - untested "no compiler info"
Simon> - return -1
Simon> -}
Simon> -
Simon> -if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} $options] } {
Simon> +if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug macros}] } {
Simon> return -1
This one used to be untested for non-{gcc,clang} compilers, but now I
think the test will just fail.
There are some other cases like this as well.
Maybe this was intentional? I suppose if there's a compiler that
doesn't support this, we can go back and re-added the untested / "if"s.
Tom
next prev parent reply other threads:[~2022-04-07 14:01 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-07 1:51 [PATCH 0/6] Fix printing macros Simon Marchi
2022-04-07 1:51 ` [PATCH 1/6] gdb/testsuite/dwarf: remove two unused variables Simon Marchi
2022-04-07 13:51 ` Tom Tromey
2022-04-07 1:51 ` [PATCH 2/6] gdb/testsuite/dwarf: simplify line number program syntax Simon Marchi
2022-04-07 13:52 ` Tom Tromey
2022-04-07 17:10 ` Simon Marchi
2022-04-07 1:51 ` [PATCH 3/6] gdb/testsuite/dwarf: don't automatically add directory and file entry for DWARF 5 Simon Marchi
2022-04-18 16:28 ` Tom Tromey
2022-04-18 17:32 ` Simon Marchi
2022-04-18 19:28 ` Tom Tromey
2022-04-18 20:58 ` Simon Marchi
2022-04-07 1:51 ` [PATCH 4/6] gdb/testsuite: add "macros" option to gdb_compile Simon Marchi
2022-04-07 14:01 ` Tom Tromey [this message]
2022-04-07 17:22 ` Simon Marchi
2022-04-07 18:31 ` Tom Tromey
2022-04-07 18:41 ` Simon Marchi
2022-04-07 1:51 ` [PATCH 5/6] gdb: prepend comp_dir to symtab name in buildsym_compunit Simon Marchi
2022-04-07 6:09 ` Eli Zaretskii
2022-04-07 16:44 ` Simon Marchi
2022-04-07 17:04 ` Eli Zaretskii
2022-04-07 17:26 ` Simon Marchi
2022-04-07 19:15 ` Eli Zaretskii
2022-04-07 19:45 ` Simon Marchi
2022-04-08 4:07 ` Eli Zaretskii
2022-04-08 13:54 ` Simon Marchi
2022-04-09 6:59 ` Eli Zaretskii
2022-04-18 16:35 ` Tom Tromey
2022-04-18 17:36 ` Simon Marchi
2022-04-18 17:59 ` Pedro Alves
2022-04-18 18:19 ` Simon Marchi
2022-04-18 18:25 ` Pedro Alves
2022-04-18 20:33 ` Samuel Thibault
2022-04-18 20:56 ` Simon Marchi
2022-04-07 15:19 ` Hannes Domani
2022-04-07 18:01 ` Simon Marchi
2022-04-21 10:56 ` Hannes Domani
2022-04-21 20:26 ` Simon Marchi
2022-04-18 16:36 ` Tom Tromey
2022-04-18 20:18 ` Simon Marchi
2022-04-07 1:51 ` [PATCH 6/6] gdb/testsuite: add macros test for source files compiled in various ways Simon Marchi
2022-04-18 16:53 ` Tom Tromey
2022-04-21 18:36 ` Simon Marchi
2022-04-21 18:45 ` Pedro Alves
2022-04-21 18:47 ` Pedro Alves
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=871qy9dmci.fsf@tromey.com \
--to=tom@tromey.com \
--cc=gdb-patches@sourceware.org \
--cc=simon.marchi@efficios.com \
--cc=simon.marchi@polymtl.ca \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).