From: Simon Marchi <simon.marchi@polymtl.ca>
To: gdb-patches@sourceware.org
Subject: [PATCH 00/16] Bunch of commands related cleanups
Date: Wed, 14 Jul 2021 00:55:04 -0400 [thread overview]
Message-ID: <20210714045520.1623120-1-simon.marchi@polymtl.ca> (raw)
While making a patch for bug 28085 [1], I put my hands in the command
code, and noticed a lot of potential cleanups to make the code simpler
more robust. My patch queue started to get a bit long, so here's a
mixed bag of patches that I think are improvements on their own right.
The last patch of the series is the biggest and most risky one, it makes
string settings use an std::string variable, instead of a `char *`.
It's quite a big change, but I think it makes things easier going
forward.
Other than that, there are some cleanups in tests, removal of unneeded
fields / declarations, adding of C++-y getters / setters, etc.
This was regtested on Ubuntu 20.04 with the unix and
native-extended-gdbserver boards.
[1] https://sourceware.org/bugzilla/show_bug.cgi?id=28085
Simon Marchi (16):
gdb/testsuite: split gdb.python/py-parameter.exp in procs
gdb.base/setshow.exp: use save_vars to save/restore gdb_prompt
gdb.base/setshow.exp: split in procs
gdb.base/setshow.exp: fix duplicate test name
gdb: un-share set_inferior_cwd declaration
gdb: remove inferior::{argc,argv}
gdb: add setter/getter for inferior arguments
gdb: add setter/getter for inferior cwd
gdb: make inferior::m_args an std::string
gdb: make inferior::m_cwd an std::string
gdb: make inferior::m_terminal an std::string
gdb: rename cfunc to simple_func
gdb: remove cmd_list_element::function::sfunc
gdb/testsuite: test get/set value of unregistered Guile parameter
gdb: make cmd_list_element var an optional union
gdb: make string-like set show commands use std::string variable
gdb/auto-load.c | 48 +-
gdb/breakpoint.c | 28 +-
gdb/breakpoint.h | 2 +-
gdb/build-id.c | 4 +-
gdb/cli/cli-cmds.c | 59 +-
gdb/cli/cli-decode.c | 223 ++++---
gdb/cli/cli-decode.h | 57 +-
gdb/cli/cli-dump.c | 2 +-
gdb/cli/cli-logging.c | 23 +-
gdb/cli/cli-option.c | 9 +-
gdb/cli/cli-option.h | 4 +-
gdb/cli/cli-setshow.c | 101 ++-
gdb/command.h | 79 +--
gdb/compile/compile.c | 46 +-
gdb/corefile.c | 17 +-
gdb/defs.h | 4 +-
gdb/disasm.c | 11 +-
gdb/disasm.h | 2 +-
gdb/dwarf2/dwz.c | 2 +-
gdb/dwarf2/index-cache.c | 10 +-
gdb/dwarf2/read.c | 10 +-
gdb/elf-none-tdep.c | 6 +-
gdb/event-top.c | 12 +-
gdb/fbsd-tdep.c | 6 +-
gdb/fork-child.c | 7 +-
gdb/guile/scm-cmd.c | 3 +-
gdb/guile/scm-param.c | 168 ++++-
gdb/infcmd.c | 103 +--
gdb/inferior.c | 11 +-
gdb/inferior.h | 78 ++-
gdb/inflow.c | 46 +-
gdb/linux-tdep.c | 7 +-
gdb/linux-thread-db.c | 17 +-
gdb/main.c | 17 +-
gdb/maint-test-options.c | 11 +-
gdb/maint-test-settings.c | 8 +-
gdb/mi/mi-cmd-env.c | 27 +-
gdb/nat/fork-inferior.c | 15 +-
gdb/proc-api.c | 5 +-
gdb/procfs.c | 10 +-
gdb/python/py-cmd.c | 3 +-
gdb/python/py-param.c | 48 +-
gdb/python/python-internal.h | 2 +-
gdb/python/python.c | 32 +-
gdb/remote-sim.c | 7 +-
gdb/remote.c | 21 +-
gdb/serial.c | 8 +-
gdb/solib.c | 20 +-
gdb/source.c | 66 +-
gdb/source.h | 5 +-
gdb/stack.c | 22 +-
gdb/symfile.c | 49 +-
gdb/symtab.c | 46 +-
gdb/target-descriptions.c | 2 +-
gdb/target.c | 4 +-
gdb/terminal.h | 2 +-
gdb/testsuite/gdb.base/setshow.exp | 734 +++++++++++++---------
gdb/testsuite/gdb.guile/scm-parameter.exp | 8 +
gdb/testsuite/gdb.python/py-parameter.exp | 237 ++++---
gdb/top.c | 112 ++--
gdb/top.h | 2 +-
gdb/tracepoint.c | 47 +-
gdb/tracepoint.h | 2 +-
gdb/tui/tui-layout.c | 3 +-
gdb/windows-nat.c | 2 +-
gdbserver/inferiors.cc | 18 +-
gdbserver/inferiors.h | 4 +
gdbserver/server.cc | 6 +-
gdbsupport/common-inferior.h | 9 +-
69 files changed, 1559 insertions(+), 1260 deletions(-)
--
2.32.0
next reply other threads:[~2021-07-14 4:55 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-14 4:55 Simon Marchi [this message]
2021-07-14 4:55 ` [PATCH 01/16] gdb/testsuite: split gdb.python/py-parameter.exp in procs Simon Marchi
2021-07-14 4:55 ` [PATCH 02/16] gdb.base/setshow.exp: use save_vars to save/restore gdb_prompt Simon Marchi
2021-07-14 4:55 ` [PATCH 03/16] gdb.base/setshow.exp: split in procs Simon Marchi
2021-07-14 4:55 ` [PATCH 04/16] gdb.base/setshow.exp: fix duplicate test name Simon Marchi
2021-07-14 4:55 ` [PATCH 05/16] gdb: un-share set_inferior_cwd declaration Simon Marchi
2021-07-14 4:55 ` [PATCH 06/16] gdb: remove inferior::{argc,argv} Simon Marchi
2021-07-14 4:55 ` [PATCH 07/16] gdb: add setter/getter for inferior arguments Simon Marchi
2021-07-14 4:55 ` [PATCH 08/16] gdb: add setter/getter for inferior cwd Simon Marchi
2021-07-14 4:55 ` [PATCH 09/16] gdb: make inferior::m_args an std::string Simon Marchi
2021-07-14 4:55 ` [PATCH 10/16] gdb: make inferior::m_cwd " Simon Marchi
2021-07-14 4:55 ` [PATCH 11/16] gdb: make inferior::m_terminal " Simon Marchi
2021-07-14 4:55 ` [PATCH 12/16] gdb: rename cfunc to simple_func Simon Marchi
2021-07-14 4:55 ` [PATCH 13/16] gdb: remove cmd_list_element::function::sfunc Simon Marchi
2021-07-28 19:10 ` Tom Tromey
2021-07-28 21:17 ` Simon Marchi
2021-07-29 17:33 ` Tom Tromey
2021-07-14 4:55 ` [PATCH 14/16] gdb/testsuite: test get/set value of unregistered Guile parameter Simon Marchi
2021-07-23 19:42 ` Simon Marchi
2021-07-14 4:55 ` [PATCH 15/16] gdb: make cmd_list_element var an optional union Simon Marchi
2021-07-14 12:08 ` Lancelot SIX
2021-07-14 17:12 ` Lancelot SIX
2021-07-14 19:22 ` Simon Marchi
2021-07-14 23:22 ` Lancelot SIX
2021-07-19 14:32 ` Simon Marchi
2021-07-19 19:52 ` Simon Marchi
2021-07-20 23:03 ` Lancelot SIX
2021-07-23 19:56 ` Simon Marchi
2021-07-23 20:46 ` Lancelot SIX
2021-07-23 21:15 ` Simon Marchi
2021-07-23 22:55 ` Lancelot SIX
2021-07-24 2:04 ` Simon Marchi
2021-07-28 20:13 ` Tom Tromey
2021-07-28 20:45 ` Lancelot SIX
2021-07-29 17:47 ` Tom Tromey
2021-07-29 20:12 ` Lancelot SIX
2021-07-30 2:09 ` Simon Marchi
2021-07-30 17:47 ` Lancelot SIX
2021-07-18 15:44 ` Lancelot SIX
2021-07-19 14:19 ` Simon Marchi
2021-07-19 20:58 ` Lancelot SIX
2021-07-28 19:47 ` Tom Tromey
2021-07-28 20:59 ` Simon Marchi
2021-07-29 17:41 ` Tom Tromey
2021-07-29 17:44 ` Simon Marchi
2021-07-29 17:49 ` Tom Tromey
2021-07-29 18:00 ` Simon Marchi
2021-07-14 4:55 ` [PATCH 16/16] gdb: make string-like set show commands use std::string variable Simon Marchi
2021-07-28 20:27 ` Tom Tromey
2021-07-28 21:03 ` Simon Marchi
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=20210714045520.1623120-1-simon.marchi@polymtl.ca \
--to=simon.marchi@polymtl.ca \
--cc=gdb-patches@sourceware.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).