From: Tom Tromey <tom@tromey.com>
To: Thiago Jung Bauermann via Gdb-patches <gdb-patches@sourceware.org>
Cc: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
Subject: Re: [PATCH] gdb/configure.ac: Add option --with-additional-debug-dirs
Date: Tue, 03 Oct 2023 12:59:08 -0600 [thread overview]
Message-ID: <87a5szzg5f.fsf@tromey.com> (raw)
In-Reply-To: <20230606233118.146167-1-thiago.bauermann@linaro.org> (Thiago Jung Bauermann via Gdb-patches's message of "Wed, 7 Jun 2023 01:31:18 +0200")
>>>>> "Thiago" == Thiago Jung Bauermann via Gdb-patches <gdb-patches@sourceware.org> writes:
Thiago> If you want to install GDB in a custom prefix, have it look for debug info
Thiago> in that prefix but also in the distro's default location (typically,
Thiago> /usr/lib/debug) and run the GDB testsuite before doing "make install", you
Thiago> have a bit of a problem:
...
Thiago> I thought it was simpler to add a new option to specify a list of
Thiago> additional directories that will be appended to the debug-file-directory
Thiago> setting.
I don't think this was ever reviewed? Sorry about that.
Thiago> diff --git a/gdb/configure.ac b/gdb/configure.ac
Thiago> index fb43cd10d6c8..715001384177 100644
Thiago> --- a/gdb/configure.ac
Thiago> +++ b/gdb/configure.ac
Thiago> @@ -119,6 +119,12 @@ GDB_AC_WITH_DIR(DEBUGDIR, separate-debug-dir,
Thiago> [look for global separate debug info in this path @<:@LIBDIR/debug@:>@],
Thiago> [${libdir}/debug])
Thiago> +AC_ARG_WITH(additional-debug-dirs,
Thiago> +AS_HELP_STRING([--with-additional-debug-dirs=PATHs],
Thiago> + [list of additional directories to search for separate debug info]),
Thiago> +[AC_DEFINE_UNQUOTED(ADDITIONAL_DEBUG_DIRS, "${withval}",
Thiago> + Additional directories to look for separate debug info.)])
It's a nit but I think it's normal to indent the body of AC_ARG_WITH.
Thiago> +#ifdef ADDITIONAL_DEBUG_DIRS
Thiago> + debug_file_directory = debug_file_directory + DIRNAME_SEPARATOR
Thiago> + + ADDITIONAL_DEBUG_DIRS;
Thiago> +#endif
gdb style is to put parens around the RHS of the assignment in this
case, and indent the 2nd line to line up.
I think a new configure switch could use at least a NEWS entry.
I didn't see --with-separate-debug-dir in the docs, so there's maybe not
a natural place for this there.
Tom
next prev parent reply other threads:[~2023-10-03 18:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-06 23:31 Thiago Jung Bauermann
2023-06-22 22:53 ` Thiago Jung Bauermann
2023-10-03 18:59 ` Tom Tromey [this message]
2023-10-04 18:29 ` Thiago Jung Bauermann
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=87a5szzg5f.fsf@tromey.com \
--to=tom@tromey.com \
--cc=gdb-patches@sourceware.org \
--cc=thiago.bauermann@linaro.org \
/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).