From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) by sourceware.org (Postfix) with ESMTPS id 497993857C44 for ; Wed, 4 Oct 2023 18:29:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 497993857C44 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-pl1-x632.google.com with SMTP id d9443c01a7336-1c5bf7871dcso550945ad.1 for ; Wed, 04 Oct 2023 11:29:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696444193; x=1697048993; darn=sourceware.org; h=mime-version:message-id:date:in-reply-to:subject:cc:to:from :user-agent:references:from:to:cc:subject:date:message-id:reply-to; bh=ZcRvHdhoLxay8gEbmwgrs65z9eLNSd0CN2Nub7Jyw+0=; b=cA7c0xAR0EK9iI1Hie+J4SQEEixvXQSGCaPjwLAaCW3u5slicy+5853dFcVyjtHlEK JmUtD6P2pw7WsVy89YVtFiSkhPbW29h5k2/8U6I50tcOEmY/q29P7+Jyk5WBcq2ZiYhO z4eTJoBTCFJlvtpO6bX9Cdvyr0Tep7tIFBqSAZ5IJWKbNOX70IocD4rFpVGuy9303MJI uzOJWuIW/oiXtzNhFdktE7qs0jpFRNmUaE3eH4FgyY90LDXfieIwD7w7jER+s2B9Cunp 3QY7p4f4eL8XYTJdlKudMKhFZTPOB5RoO+Ss6uGGZgpvtSknmYAt8JGnmv3IjrZOwjQf 1YJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696444193; x=1697048993; h=mime-version:message-id:date:in-reply-to:subject:cc:to:from :user-agent:references:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ZcRvHdhoLxay8gEbmwgrs65z9eLNSd0CN2Nub7Jyw+0=; b=PT23BhtCZLsm/hIpPG1Z7ceFebB0zSSjXyiwMD2iCwH232gbI9ct1iAhbVc7gJ+Z8+ IgCG7pyWZDQEdZbSQd14PO2bGyYzx9ahNQupJju93e42zFMuc6xjmhN+m7bEw49L2qge PHWj13Qi99JCPXvTVGVTSD4Tntzb/wW+z5zIpxcPC+EE/hksrMXuUD4CnRU8p/OxJnPg Vbl6+VNA3VgZxMp/zzaCaCcJb55mH149dizfFeVjaS0aYdGNtNQFJHIQFikNO3UuIlfz EUIWM9S+XIiEHfKvbpdXjOiuzy9FZhjDqBQOQZU9RFWmJDzBTYL6mYRxTr1Y5hhHxc6C dK5w== X-Gm-Message-State: AOJu0YxPlz/R6WsYM0JOqzCQmrva/eMpJrZnCvvL/QOBUrnFSnRyNS+F 56YdArE6W2XTlj4LNS+eHFc9w/hBMzNhdgRktLE= X-Google-Smtp-Source: AGHT+IHizU/TQx/nmK9/dxa+l6l1oexuGtMml3WGWN2j8EBjUAlSUs7QdctgiPh32nvyJE53kqYaiw== X-Received: by 2002:a17:902:d2d1:b0:1c3:bbad:9b7c with SMTP id n17-20020a170902d2d100b001c3bbad9b7cmr3421386plc.31.1696444193089; Wed, 04 Oct 2023 11:29:53 -0700 (PDT) Received: from localhost ([2804:14d:7e39:8470:2dfa:6486:a698:5ba9]) by smtp.gmail.com with ESMTPSA id f21-20020a170902ab9500b001c5fc11c085sm4012705plr.264.2023.10.04.11.29.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Oct 2023 11:29:52 -0700 (PDT) References: <20230606233118.146167-1-thiago.bauermann@linaro.org> <87a5szzg5f.fsf@tromey.com> User-agent: mu4e 1.10.7; emacs 29.1 From: Thiago Jung Bauermann To: Tom Tromey Cc: Thiago Jung Bauermann via Gdb-patches Subject: Re: [PATCH] gdb/configure.ac: Add option --with-additional-debug-dirs In-reply-to: <87a5szzg5f.fsf@tromey.com> Date: Wed, 04 Oct 2023 15:29:49 -0300 Message-ID: <87cyxunsv6.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hello Tom, Thank you for your review! Tom Tromey writes: >>>>>> "Thiago" == Thiago Jung Bauermann via Gdb-patches > 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