public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Andrew Burgess <andrew.burgess@embecosm.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tom@tromey.com>,
	Andrew Burgess <andrew.burgess@embecosm.com>
Subject: [PATCH 0/7] Adding startup files to GDB
Date: Wed,  7 Oct 2020 21:05:04 +0100	[thread overview]
Message-ID: <cover.1601927355.git.andrew.burgess@embecosm.com> (raw)

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


             reply	other threads:[~2020-10-07 19:05 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-07 20:05 Andrew Burgess [this message]
2020-10-07 20:05 ` [PATCH 1/7] Add get_standard_config_dir function Andrew Burgess
2020-10-07 20:05 ` [PATCH 2/7] gdb: use get_standard_config_dir when looking for .gdbinit Andrew Burgess
2020-10-08  6:52   ` Eli Zaretskii
2020-11-02 10:20     ` Andrew Burgess
2020-10-22 19:07   ` Tom Tromey
2020-11-09 13:52   ` Tom Tromey
2020-11-09 13:55     ` Tom Tromey
2020-10-07 20:05 ` [PATCH 3/7] gdb: new function to wrap up executing command line scripts/commands Andrew Burgess
2020-10-08 15:25   ` Aktemur, Tankut Baris
2020-11-02  9:48     ` Andrew Burgess
2020-10-22 19:08   ` Tom Tromey
2020-10-07 20:05 ` [PATCH 4/7] gdb: process startup files and startup command line options Andrew Burgess
2020-10-08  6:28   ` Eli Zaretskii
2020-10-07 20:05 ` [PATCH 5/7] gdb: add mechanism to auto-save startup options Andrew Burgess
2020-10-08  6:36   ` Eli Zaretskii
2020-10-07 20:05 ` [PATCH 6/7] Let the user control the startup style Andrew Burgess
2020-10-08  6:40   ` Eli Zaretskii
2020-10-07 20:05 ` [PATCH 7/7] Add "set startup-quietly" Andrew Burgess
2020-10-08  6:44   ` Eli Zaretskii
2020-10-08  6:56 ` [PATCH 0/7] Adding startup files to GDB Eli Zaretskii
2020-10-22 19:02 ` Tom Tromey
2020-10-28 15:29   ` Andrew Burgess
2021-01-11 16:45   ` Andrew Burgess

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=cover.1601927355.git.andrew.burgess@embecosm.com \
    --to=andrew.burgess@embecosm.com \
    --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).