public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
To: Tom Tromey <tom@tromey.com>
Cc: Thiago Jung Bauermann via Gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH] gdb/configure.ac: Add option --with-additional-debug-dirs
Date: Wed, 04 Oct 2023 15:29:49 -0300	[thread overview]
Message-ID: <87cyxunsv6.fsf@linaro.org> (raw)
In-Reply-To: <87a5szzg5f.fsf@tromey.com>


Hello Tom,

Thank you for your review!

Tom Tromey <tom@tromey.com> writes:

>>>>>> "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.

It wasn't. Not a big deal though. I've been applying the patch locally
in our CI in the meantime.

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

Ah, I hadn't noticed. Fixed.

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

That's true. Fixed.

> I think a new configure switch could use at least a NEWS entry.

Ah, I didn't know new configure options also got NEWS entries.
Added one.

> I didn't see --with-separate-debug-dir in the docs, so there's maybe not
> a natural place for this there.

I actually found a good spot for it, so I mentioned the new option
there.

I'm sending a v2 with these changes shortly.

-- 
Thiago

      reply	other threads:[~2023-10-04 18:29 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
2023-10-04 18:29   ` Thiago Jung Bauermann [this message]

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=87cyxunsv6.fsf@linaro.org \
    --to=thiago.bauermann@linaro.org \
    --cc=gdb-patches@sourceware.org \
    --cc=tom@tromey.com \
    /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).