public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Move gdb_regex to gdbsupport
@ 2022-01-18 17:33 Tom Tromey
  0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2022-01-18 17:33 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=d322d6d69df61a1af481de7e50359c3d92c0de14

commit d322d6d69df61a1af481de7e50359c3d92c0de14
Author: Tom Tromey <tom@tromey.com>
Date:   Sat Jan 1 11:31:47 2022 -0700

    Move gdb_regex to gdbsupport
    
    This moves the gdb_regex convenience class to gdbsupport.

Diff:
---
 gdb/Makefile.in                            |  2 --
 gdb/ada-lang.c                             |  2 +-
 gdb/auto-load.c                            |  2 +-
 gdb/break-catch-throw.c                    |  2 +-
 gdb/breakpoint.c                           |  2 +-
 gdb/cli/cli-cmds.c                         |  2 +-
 gdb/cli/cli-decode.c                       |  2 +-
 gdb/cli/cli-decode.h                       |  2 +-
 gdb/linux-tdep.c                           |  2 +-
 gdb/mi/mi-cmd-file.c                       |  2 +-
 gdb/objc-lang.c                            |  2 +-
 gdb/probe.c                                |  2 +-
 gdb/producer.c                             |  2 +-
 gdb/psymtab.c                              |  2 +-
 gdb/rust-parse.c                           |  2 +-
 gdb/skip.c                                 |  2 +-
 gdb/solib.c                                |  2 +-
 gdb/source.c                               |  2 +-
 gdb/symmisc.c                              |  2 +-
 gdb/symtab.c                               |  2 +-
 gdb/symtab.h                               |  2 +-
 gdb/thread.c                               |  2 +-
 gdb/ui-style.c                             |  2 +-
 gdb/utils.c                                |  2 +-
 gdb/varobj.c                               |  2 +-
 gdbsupport/Makefile.am                     |  1 +
 gdbsupport/Makefile.in                     | 19 +++++++++++--------
 gdb/gdb_regex.c => gdbsupport/gdb_regex.cc |  0
 {gdb => gdbsupport}/gdb_regex.h            |  0
 29 files changed, 36 insertions(+), 34 deletions(-)

diff --git a/gdb/Makefile.in b/gdb/Makefile.in
index ce9f1ad441c..2d9b2a76491 100644
--- a/gdb/Makefile.in
+++ b/gdb/Makefile.in
@@ -1074,7 +1074,6 @@ COMMON_SFILES = \
 	gcore.c \
 	gdb-demangle.c \
 	gdb_bfd.c \
-	gdb_regex.c \
 	gdbtypes.c \
 	gmp-utils.c \
 	gnu-v2-abi.c \
@@ -1316,7 +1315,6 @@ HFILES_NO_SRCDIR = \
 	gdb_curses.h \
 	gdb_expat.h \
 	gdb_proc_service.h \
-	gdb_regex.h \
 	gdb_select.h \
 	gdb-stabs.h \
 	gdb_vfork.h \
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c
index b88b27b55b1..a39c1fdee64 100644
--- a/gdb/ada-lang.c
+++ b/gdb/ada-lang.c
@@ -20,7 +20,7 @@
 
 #include "defs.h"
 #include <ctype.h>
-#include "gdb_regex.h"
+#include "gdbsupport/gdb_regex.h"
 #include "frame.h"
 #include "symtab.h"
 #include "gdbtypes.h"
diff --git a/gdb/auto-load.c b/gdb/auto-load.c
index 98b1373d57f..680b87936b1 100644
--- a/gdb/auto-load.c
+++ b/gdb/auto-load.c
@@ -21,7 +21,7 @@
 #include <ctype.h>
 #include "auto-load.h"
 #include "progspace.h"
-#include "gdb_regex.h"
+#include "gdbsupport/gdb_regex.h"
 #include "ui-out.h"
 #include "filenames.h"
 #include "command.h"
diff --git a/gdb/break-catch-throw.c b/gdb/break-catch-throw.c
index 5d17854d9af..d34e5f9ee53 100644
--- a/gdb/break-catch-throw.c
+++ b/gdb/break-catch-throw.c
@@ -33,7 +33,7 @@
 #include "probe.h"
 #include "objfiles.h"
 #include "cp-abi.h"
-#include "gdb_regex.h"
+#include "gdbsupport/gdb_regex.h"
 #include "cp-support.h"
 #include "location.h"
 #include "cli/cli-decode.h"
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index c7d75731621..e969ef367bc 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -56,7 +56,7 @@
 #include "valprint.h"
 #include "jit.h"
 #include "parser-defs.h"
-#include "gdb_regex.h"
+#include "gdbsupport/gdb_regex.h"
 #include "probe.h"
 #include "cli/cli-utils.h"
 #include "stack.h"
diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c
index e62e7a9331f..563f29067c3 100644
--- a/gdb/cli/cli-cmds.c
+++ b/gdb/cli/cli-cmds.c
@@ -24,7 +24,7 @@
 #include "target.h"	/* For baud_rate, remote_debug and remote_timeout.  */
 #include "gdbsupport/gdb_wait.h"	/* For shell escape implementation.  */
 #include "gdbcmd.h"
-#include "gdb_regex.h"	/* Used by apropos_command.  */
+#include "gdbsupport/gdb_regex.h"	/* Used by apropos_command.  */
 #include "gdb_vfork.h"
 #include "linespec.h"
 #include "expression.h"
diff --git a/gdb/cli/cli-decode.c b/gdb/cli/cli-decode.c
index 7266fb36d0d..c8cd95620a5 100644
--- a/gdb/cli/cli-decode.c
+++ b/gdb/cli/cli-decode.c
@@ -18,7 +18,7 @@
 #include "defs.h"
 #include "symtab.h"
 #include <ctype.h>
-#include "gdb_regex.h"
+#include "gdbsupport/gdb_regex.h"
 #include "completer.h"
 #include "ui-out.h"
 #include "cli/cli-cmds.h"
diff --git a/gdb/cli/cli-decode.h b/gdb/cli/cli-decode.h
index ed75d3dfc15..658142d338d 100644
--- a/gdb/cli/cli-decode.h
+++ b/gdb/cli/cli-decode.h
@@ -23,7 +23,7 @@
 
 /* Include the public interfaces.  */
 #include "command.h"
-#include "gdb_regex.h"
+#include "gdbsupport/gdb_regex.h"
 #include "cli-script.h"
 #include "completer.h"
 #include "gdbsupport/intrusive_list.h"
diff --git a/gdb/linux-tdep.c b/gdb/linux-tdep.c
index 4b69121e4d0..1b48b7fef25 100644
--- a/gdb/linux-tdep.c
+++ b/gdb/linux-tdep.c
@@ -36,7 +36,7 @@
 #include "objfiles.h"
 #include "infcall.h"
 #include "gdbcmd.h"
-#include "gdb_regex.h"
+#include "gdbsupport/gdb_regex.h"
 #include "gdbsupport/enum-flags.h"
 #include "gdbsupport/gdb_optional.h"
 #include "gcore.h"
diff --git a/gdb/mi/mi-cmd-file.c b/gdb/mi/mi-cmd-file.c
index 8fdcf891cf5..23c6d7021e2 100644
--- a/gdb/mi/mi-cmd-file.c
+++ b/gdb/mi/mi-cmd-file.c
@@ -28,7 +28,7 @@
 #include "psymtab.h"
 #include "solib.h"
 #include "solist.h"
-#include "gdb_regex.h"
+#include "gdbsupport/gdb_regex.h"
 
 /* Return to the client the absolute path and line number of the 
    current file being executed.  */
diff --git a/gdb/objc-lang.c b/gdb/objc-lang.c
index 787e8d647ea..72470144abf 100644
--- a/gdb/objc-lang.c
+++ b/gdb/objc-lang.c
@@ -37,7 +37,7 @@
 #include "gdbcore.h"
 #include "gdbcmd.h"
 #include "frame.h"
-#include "gdb_regex.h"
+#include "gdbsupport/gdb_regex.h"
 #include "regcache.h"
 #include "block.h"
 #include "infcall.h"
diff --git a/gdb/probe.c b/gdb/probe.c
index 689b5f022e4..278b36c3ce8 100644
--- a/gdb/probe.c
+++ b/gdb/probe.c
@@ -27,7 +27,7 @@
 #include "progspace.h"
 #include "filenames.h"
 #include "linespec.h"
-#include "gdb_regex.h"
+#include "gdbsupport/gdb_regex.h"
 #include "frame.h"
 #include "arch-utils.h"
 #include "value.h"
diff --git a/gdb/producer.c b/gdb/producer.c
index ba6e021b94a..ef1dd93afbc 100644
--- a/gdb/producer.c
+++ b/gdb/producer.c
@@ -20,7 +20,7 @@
 #include "defs.h"
 #include "producer.h"
 #include "gdbsupport/selftest.h"
-#include "gdb_regex.h"
+#include "gdbsupport/gdb_regex.h"
 
 /* See producer.h.  */
 
diff --git a/gdb/psymtab.c b/gdb/psymtab.c
index 9db8a7aeba2..406b3b3cccb 100644
--- a/gdb/psymtab.c
+++ b/gdb/psymtab.c
@@ -29,7 +29,7 @@
 #include "ui-out.h"
 #include "command.h"
 #include "readline/tilde.h"
-#include "gdb_regex.h"
+#include "gdbsupport/gdb_regex.h"
 #include "dictionary.h"
 #include "language.h"
 #include "cp-support.h"
diff --git a/gdb/rust-parse.c b/gdb/rust-parse.c
index a3969fe4fa9..31a1ee3b38f 100644
--- a/gdb/rust-parse.c
+++ b/gdb/rust-parse.c
@@ -23,7 +23,7 @@
 #include "charset.h"
 #include "cp-support.h"
 #include "gdbsupport/gdb_obstack.h"
-#include "gdb_regex.h"
+#include "gdbsupport/gdb_regex.h"
 #include "rust-lang.h"
 #include "parser-defs.h"
 #include "gdbsupport/selftest.h"
diff --git a/gdb/skip.c b/gdb/skip.c
index 3308252cb47..62825cbddae 100644
--- a/gdb/skip.c
+++ b/gdb/skip.c
@@ -33,7 +33,7 @@
 #include "source.h"
 #include "filenames.h"
 #include "fnmatch.h"
-#include "gdb_regex.h"
+#include "gdbsupport/gdb_regex.h"
 #include "gdbsupport/gdb_optional.h"
 #include <list>
 #include "cli/cli-style.h"
diff --git a/gdb/solib.c b/gdb/solib.c
index 56b86614a16..b9b1d037187 100644
--- a/gdb/solib.c
+++ b/gdb/solib.c
@@ -29,7 +29,7 @@
 #include "command.h"
 #include "target.h"
 #include "frame.h"
-#include "gdb_regex.h"
+#include "gdbsupport/gdb_regex.h"
 #include "inferior.h"
 #include "gdbsupport/environ.h"
 #include "language.h"
diff --git a/gdb/source.c b/gdb/source.c
index ab5cfc5a9d9..9cfc18b8115 100644
--- a/gdb/source.c
+++ b/gdb/source.c
@@ -31,7 +31,7 @@
 #include <sys/types.h>
 #include <fcntl.h>
 #include "gdbcore.h"
-#include "gdb_regex.h"
+#include "gdbsupport/gdb_regex.h"
 #include "symfile.h"
 #include "objfiles.h"
 #include "annotate.h"
diff --git a/gdb/symmisc.c b/gdb/symmisc.c
index 3b5c3a07fc7..2f4a076c352 100644
--- a/gdb/symmisc.c
+++ b/gdb/symmisc.c
@@ -30,7 +30,7 @@
 #include "language.h"
 #include "bcache.h"
 #include "block.h"
-#include "gdb_regex.h"
+#include "gdbsupport/gdb_regex.h"
 #include <sys/stat.h>
 #include "dictionary.h"
 #include "typeprint.h"
diff --git a/gdb/symtab.c b/gdb/symtab.c
index cf9f6cec34f..9fc96d7baa1 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -27,7 +27,7 @@
 #include "symfile.h"
 #include "objfiles.h"
 #include "gdbcmd.h"
-#include "gdb_regex.h"
+#include "gdbsupport/gdb_regex.h"
 #include "expression.h"
 #include "language.h"
 #include "demangle.h"
diff --git a/gdb/symtab.h b/gdb/symtab.h
index 740c7ed8c74..55d1b772c45 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -27,7 +27,7 @@
 #include "gdbsupport/gdb_vecs.h"
 #include "gdbtypes.h"
 #include "gdbsupport/gdb_obstack.h"
-#include "gdb_regex.h"
+#include "gdbsupport/gdb_regex.h"
 #include "gdbsupport/enum-flags.h"
 #include "gdbsupport/function-view.h"
 #include "gdbsupport/gdb_optional.h"
diff --git a/gdb/thread.c b/gdb/thread.c
index 0f9fbe325bc..611be3f4633 100644
--- a/gdb/thread.c
+++ b/gdb/thread.c
@@ -40,7 +40,7 @@
 #include "annotate.h"
 #include "cli/cli-decode.h"
 #include "cli/cli-option.h"
-#include "gdb_regex.h"
+#include "gdbsupport/gdb_regex.h"
 #include "cli/cli-utils.h"
 #include "thread-fsm.h"
 #include "tid-parse.h"
diff --git a/gdb/ui-style.c b/gdb/ui-style.c
index 253e796d57a..f1a5b8c4101 100644
--- a/gdb/ui-style.c
+++ b/gdb/ui-style.c
@@ -18,7 +18,7 @@
 
 #include "defs.h"
 #include "ui-style.h"
-#include "gdb_regex.h"
+#include "gdbsupport/gdb_regex.h"
 
 /* A regular expression that is used for matching ANSI terminal escape
    sequences.  */
diff --git a/gdb/utils.c b/gdb/utils.c
index bda3b7b5f0d..8489d3fec06 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -63,7 +63,7 @@
 #include <chrono>
 
 #include "interps.h"
-#include "gdb_regex.h"
+#include "gdbsupport/gdb_regex.h"
 #include "gdbsupport/job-control.h"
 #include "gdbsupport/selftest.h"
 #include "gdbsupport/gdb_optional.h"
diff --git a/gdb/varobj.c b/gdb/varobj.c
index b59ddc1e772..3aec027a5b6 100644
--- a/gdb/varobj.c
+++ b/gdb/varobj.c
@@ -23,7 +23,7 @@
 #include "gdbcmd.h"
 #include "block.h"
 #include "valprint.h"
-#include "gdb_regex.h"
+#include "gdbsupport/gdb_regex.h"
 
 #include "varobj.h"
 #include "gdbthread.h"
diff --git a/gdbsupport/Makefile.am b/gdbsupport/Makefile.am
index 9e4334891b5..6049fac20ef 100644
--- a/gdbsupport/Makefile.am
+++ b/gdbsupport/Makefile.am
@@ -54,6 +54,7 @@ libgdbsupport_a_SOURCES = \
     gdb-dlfcn.cc \
     gdb-hashtab.cc \
     gdb_obstack.cc \
+    gdb_regex.cc \
     gdb_tilde_expand.cc \
     gdb_wait.cc \
     gdb_vecs.cc \
diff --git a/gdbsupport/Makefile.in b/gdbsupport/Makefile.in
index 59e1dfedd8b..852e98c6bdf 100644
--- a/gdbsupport/Makefile.in
+++ b/gdbsupport/Makefile.in
@@ -152,14 +152,15 @@ am_libgdbsupport_a_OBJECTS = agent.$(OBJEXT) btrace-common.$(OBJEXT) \
 	environ.$(OBJEXT) errors.$(OBJEXT) event-loop.$(OBJEXT) \
 	fileio.$(OBJEXT) filestuff.$(OBJEXT) format.$(OBJEXT) \
 	gdb-dlfcn.$(OBJEXT) gdb-hashtab.$(OBJEXT) \
-	gdb_obstack.$(OBJEXT) gdb_tilde_expand.$(OBJEXT) \
-	gdb_wait.$(OBJEXT) gdb_vecs.$(OBJEXT) job-control.$(OBJEXT) \
-	netstuff.$(OBJEXT) new-op.$(OBJEXT) pathstuff.$(OBJEXT) \
-	print-utils.$(OBJEXT) ptid.$(OBJEXT) rsp-low.$(OBJEXT) \
-	run-time-clock.$(OBJEXT) safe-strerror.$(OBJEXT) \
-	scoped_mmap.$(OBJEXT) search.$(OBJEXT) signals.$(OBJEXT) \
-	signals-state-save-restore.$(OBJEXT) tdesc.$(OBJEXT) \
-	thread-pool.$(OBJEXT) xml-utils.$(OBJEXT) $(am__objects_1)
+	gdb_obstack.$(OBJEXT) gdb_regex.$(OBJEXT) \
+	gdb_tilde_expand.$(OBJEXT) gdb_wait.$(OBJEXT) \
+	gdb_vecs.$(OBJEXT) job-control.$(OBJEXT) netstuff.$(OBJEXT) \
+	new-op.$(OBJEXT) pathstuff.$(OBJEXT) print-utils.$(OBJEXT) \
+	ptid.$(OBJEXT) rsp-low.$(OBJEXT) run-time-clock.$(OBJEXT) \
+	safe-strerror.$(OBJEXT) scoped_mmap.$(OBJEXT) search.$(OBJEXT) \
+	signals.$(OBJEXT) signals-state-save-restore.$(OBJEXT) \
+	tdesc.$(OBJEXT) thread-pool.$(OBJEXT) xml-utils.$(OBJEXT) \
+	$(am__objects_1)
 libgdbsupport_a_OBJECTS = $(am_libgdbsupport_a_OBJECTS)
 AM_V_P = $(am__v_P_@AM_V@)
 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
@@ -379,6 +380,7 @@ libgdbsupport_a_SOURCES = \
     gdb-dlfcn.cc \
     gdb-hashtab.cc \
     gdb_obstack.cc \
+    gdb_regex.cc \
     gdb_tilde_expand.cc \
     gdb_wait.cc \
     gdb_vecs.cc \
@@ -486,6 +488,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gdb-dlfcn.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gdb-hashtab.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gdb_obstack.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gdb_regex.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gdb_tilde_expand.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gdb_vecs.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gdb_wait.Po@am__quote@
diff --git a/gdb/gdb_regex.c b/gdbsupport/gdb_regex.cc
similarity index 100%
rename from gdb/gdb_regex.c
rename to gdbsupport/gdb_regex.cc
diff --git a/gdb/gdb_regex.h b/gdbsupport/gdb_regex.h
similarity index 100%
rename from gdb/gdb_regex.h
rename to gdbsupport/gdb_regex.h


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-01-18 17:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-18 17:33 [binutils-gdb] Move gdb_regex to gdbsupport Tom Tromey

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