From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 2Ij5LHwRfl8SUQAAWB0awg (envelope-from ) for ; Wed, 07 Oct 2020 15:05:32 -0400 Received: by simark.ca (Postfix, from userid 112) id B215C1EF79; Wed, 7 Oct 2020 15:05:32 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED, MAILING_LIST_MULTI,T_DKIM_INVALID,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 4ABE31E58D for ; Wed, 7 Oct 2020 15:05:28 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A3769385781A; Wed, 7 Oct 2020 19:05:27 +0000 (GMT) Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) by sourceware.org (Postfix) with ESMTPS id 89B8E3858D35 for ; Wed, 7 Oct 2020 19:05:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 89B8E3858D35 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=andrew.burgess@embecosm.com Received: by mail-wm1-x341.google.com with SMTP id j136so3717292wmj.2 for ; Wed, 07 Oct 2020 12:05:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=fT9FxXR4UHma5zR1RTt/zGSqAoX/INMMDUJJ21dg1M8=; b=WyH155wgS4Rn/7rGuAGGXvJgsDrVZNPusuxm0aV4egVrSq328qF7zS/QReAWRmR2re s/1I7+r6z0tovPJX6xFi10HIOHebaoET9/MP5wT/Y41yOKr4uz3yxI991+opRDYUK0EX amkn1yOrxfnXf8K54omCgrti+ofXVMxVXq3QzfU+jzcfns9ZGapflQgnJhqpr1HRSIS+ 3YNEjXqsa1UYJxONSGmweyC3yvMkP5aON21UMLD7KPVc7z3KTbMgr0AIOJCxb78/P4nC sUHsb1+szcK4hehiQ3WLnCqdKxVG67Po/uIBc6oGeBVR9e85JXm9oS1uKlcXzN4QZ4fP jFQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=fT9FxXR4UHma5zR1RTt/zGSqAoX/INMMDUJJ21dg1M8=; b=fQb0dAGfAD4WaNavSY5gmg3cr21WVs3BK/PSuLR1iH8W/kebR/LSlktdHX/8FkJztr 3vJgBtclzOtgKjPG9psnYRdKRqSUMA3WxdvHJQ5YIiBYVN7dZBH6gw3jo3Ku+qabslVv MiOmnnfBt0UuVIslI7MeeQEBoDaHxLLmo1PrQ0yXjyc12m89CYnwCcDpT13WFOuc5Pbd Zw/IVMaaPAsCSy0RVIbWQgcp3RJAC7rAQxuhoFojeaWaMuDOki3PApc3Uxram8/wqgjp H+CnE+zYilvu17qNmdhsPjieTkY1ycITwr4K9If5rjnjdbjnEHp509GviJA8z+LsNKRQ Z79g== X-Gm-Message-State: AOAM531AWngCJj6jpD/EAogcpX19ZtE0AWOuyWcyEzE3MxxQcdUNjaxP UUz6ANZELnnvjh2sryUlaaLA7YXIzWrOoA== X-Google-Smtp-Source: ABdhPJxHzmsXvRPRfx5bDD8ieBfEk1IiuQ9fdsX67EuuNF4TTw+zDVLwvmtOrBpW2V9/NOCWYJMAcw== X-Received: by 2002:a1c:e154:: with SMTP id y81mr4961290wmg.111.1602097521571; Wed, 07 Oct 2020 12:05:21 -0700 (PDT) Received: from localhost (host109-151-14-50.range109-151.btcentralplus.com. [109.151.14.50]) by smtp.gmail.com with ESMTPSA id b200sm4106658wme.44.2020.10.07.12.05.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Oct 2020 12:05:19 -0700 (PDT) From: Andrew Burgess To: gdb-patches@sourceware.org Subject: [PATCH 0/7] Adding startup files to GDB Date: Wed, 7 Oct 2020 21:05:04 +0100 Message-Id: X-Mailer: git-send-email 2.25.4 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tom Tromey Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" This series borrows heavily from some work that Tom submitted here: https://sourceware.org/pipermail/gdb-patches/2020-June/169821.html This work replaces patches 4 -> 7 of Tom's original series. Patches 1->3 of the original work are unrelated and are not impacted by this series. Looking at what I'm submitting here, my patches #1, #6 and #7 are taken directly from Tom's original series with only very minor tweaks. Patches #2, #3, #4, and #5 are significantly different than Tom's original work though. First, the motivation for this series - there are some parts of GDB that can't currently be controlled with normal settings, as the point at which the action is performed in GDB is earlier than the current config files and command line options are processed. This series introduces a new set of command line options and config files that can be read very early during the startup process, these files/command line flags can then be used to control the very early actions that would otherwise not be user controllable. Right now there are just two such settings added in this series, but it is hoped that over time we might be able to add more. Next I'll describe what the patches I wrote do, and the significant differences to the series Tom put forward: Patch #2 makes GDB look for .gdbinit in the standard config directory, this makes this consistent between the standard init file and the new startup file. This is new work in this series. Patch #3 is just a small refactor in preparation for later patches. Patch #4 adds the startup file support. Compared to Tom's original work: (a) there's no auto saving of startup options, (b) there's command line flag support for passing startup options to GDB. (c) there's support for a home directory and current working directory startup file (only because this is basically free given the restructuring of the code). Patch #5 adds back the auto-save feature from Tom's series, however, I have this off by default. I (personally) dislike the auto-save feature, though I can see why some users might want it. I hope the proposal I have here is might be a good middle ground. There's some pretty extensive documentation changes in this series, which I'm sure will need some serious polish before this is ready to commit. --- Andrew Burgess (4): gdb: use get_standard_config_dir when looking for .gdbinit gdb: new function to wrap up executing command line scripts/commands gdb: process startup files and startup command line options gdb: add mechanism to auto-save startup options Tom Tromey (3): Add get_standard_config_dir function Let the user control the startup style Add "set startup-quietly" gdb/ChangeLog | 72 ++++++ gdb/NEWS | 31 +++ gdb/auto-load.c | 27 ++- gdb/cli/cli-setshow.c | 122 +++++++++- gdb/cli/cli-setshow.h | 23 ++ gdb/cli/cli-style.c | 36 ++- gdb/cli/cli-style.h | 9 +- gdb/config.in | 3 + gdb/configure | 6 + gdb/configure.ac | 3 + gdb/doc/ChangeLog | 31 +++ gdb/doc/gdb.texinfo | 364 +++++++++++++++++++++------- gdb/main.c | 370 ++++++++++++++++++++--------- gdb/main.h | 5 + gdb/testsuite/ChangeLog | 8 + gdb/testsuite/gdb.base/persist.exp | 68 ++++++ gdb/top.c | 45 +++- gdb/top.h | 5 + gdbsupport/ChangeLog | 5 + gdbsupport/pathstuff.cc | 81 +++++++ gdbsupport/pathstuff.h | 37 +++ 21 files changed, 1148 insertions(+), 203 deletions(-) create mode 100644 gdb/testsuite/gdb.base/persist.exp -- 2.25.4