public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/4] Fix crash in "set python" and small cleanups
@ 2021-05-18 11:07 Marco Barisione
  2021-05-18 11:07 ` [PATCH 1/4] gdb: Add an overloaded ui_out::text accepting a const std::string & Marco Barisione
                   ` (4 more replies)
  0 siblings, 5 replies; 18+ messages in thread
From: Marco Barisione @ 2021-05-18 11:07 UTC (permalink / raw)
  To: gdb-patches

I noticed by chance that the "set python" command with no arguments
causes a segfault.  This is due to a trivial mistake, the prefix command
meant to be "show python" is added to the list of set commands, and the
"set python" one is added to the list of show commands.

I didn't add a specific test because what's the chance of "set python"
regressing?  I tried writing a self test instead (like the ones in
gdb/unittests/command-def-selftests.c), but I couldn't figure out how to
detect this problem in a generic way.  Any idea?  Or it this patch
OK without a test?

This patch series also includes some cleanups which came up from the
work on the main fix.

Marco Barisione (4):
  gdb: Add an overloaded ui_out::text accepting a const std::string &
  gdb: Pass std::strings to ui_out::field_string () where convenient
  gdb: Fix crash in cmd_show_list () if the prefix doesn't contain "show
    "
  gdb: Add "set|show python" commands to the correct list

 gdb/ada-lang.c          |  4 ++--
 gdb/break-catch-sig.c   |  2 +-
 gdb/break-catch-throw.c |  2 +-
 gdb/cli/cli-setshow.c   | 32 ++++++++++++++++++++++++--------
 gdb/disasm.c            |  2 +-
 gdb/infcmd.c            |  2 +-
 gdb/inferior.c          |  2 +-
 gdb/linux-thread-db.c   |  2 +-
 gdb/mi/mi-cmd-var.c     | 22 +++++++++++-----------
 gdb/mi/mi-main.c        | 14 +++++++-------
 gdb/osdata.c            |  3 +--
 gdb/probe.c             |  5 ++---
 gdb/python/python.c     |  4 ++--
 gdb/source.c            |  2 +-
 gdb/target-connection.c |  2 +-
 gdb/thread.c            |  5 ++---
 gdb/tracepoint.c        |  4 ++--
 gdb/ui-out.c            | 11 +++++++++--
 gdb/ui-out.h            |  4 +++-
 19 files changed, 73 insertions(+), 51 deletions(-)

-- 
2.28.0


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2021-05-24 15:12 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-18 11:07 [PATCH 0/4] Fix crash in "set python" and small cleanups Marco Barisione
2021-05-18 11:07 ` [PATCH 1/4] gdb: Add an overloaded ui_out::text accepting a const std::string & Marco Barisione
2021-05-18 14:18   ` Simon Marchi
2021-05-19 13:43     ` Marco Barisione
2021-05-18 11:07 ` [PATCH 2/4] gdb: Pass std::strings to ui_out::field_string () where convenient Marco Barisione
2021-05-18 14:36   ` Simon Marchi
2021-05-18 14:47   ` Tom Tromey
2021-05-18 11:07 ` [PATCH 3/4] gdb: Fix crash in cmd_show_list () if the prefix doesn't contain "show " Marco Barisione
2021-05-18 13:41   ` Andrew Burgess
2021-05-19  9:22     ` Marco Barisione
2021-05-18 11:07 ` [PATCH 4/4] gdb: Add "set|show python" commands to the correct list Marco Barisione
2021-05-18 13:41   ` Andrew Burgess
2021-05-18 13:44 ` [PATCH 0/4] Fix crash in "set python" and small cleanups Andrew Burgess
2021-05-18 14:50   ` Tom Tromey
2021-05-18 19:34     ` Philippe Waroquiers
2021-05-19  9:04       ` Marco Barisione
2021-05-24 14:22         ` Tom Tromey
2021-05-24 15:12           ` Marco Barisione

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