From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jason Molenda To: gdb-patches@sources.redhat.com Subject: Re: [patch] remove extraneous check_typedef () call in c_val_print () Date: Fri, 31 Aug 2001 14:41:00 -0000 Message-id: References: X-SW-Source: 2001-08/msg00327.html Content-type: multipart/mixed; boundary="----------=_1583534360-29878-8" This is a multi-part message in MIME format... ------------=_1583534360-29878-8 Content-length: 543 On Friday, August 31, 2001, at 02:39 PM, Jason Molenda wrote: > Hello, my name is Jason Molenda, here is my first patch submission to > GDB. I've heard that my employer has a copyright assignment on file > already, so I expect those details are all in order. If I've missed > some bit of documentation about how to submit a patch properly, please > let me know. > Including the patch would be a good first step, I suppose. BTW I did run the gdb testsuite with this patch and there are no additional regressions. Here's the patch: ------------=_1583534360-29878-8 Content-Type: text/x-diff; charset=us-ascii; name="pa" Content-Disposition: inline; filename="pa" Content-Transfer-Encoding: base64 Content-Length: 903 MjAwMS0wOC0zMSAgSmFzb24gTW9sZW5kYSAgKGptb2xlbmRhQGFwcGxlLmNv bSkKCgkqIGMtdmFscHJpbnQuYyAoY192YWxfcHJpbnQpOiAgU2Vjb25kIGNh bGwgdG8gY2hlY2tfdHlwZWRlZiAoKQoJaXMgbm8gbG9uZ2VyIG5lY2Vzc2Fy eS4KCkluZGV4OiBjLXZhbHByaW50LmMKPT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PQpSQ1MgZmlsZTogL2N2cy9zcmMvc3JjL2dkYi9jLXZhbHByaW50LmMsdgpy ZXRyaWV2aW5nIHJldmlzaW9uIDEuOQpkaWZmIC11IC1wIC1yMS45IGMtdmFs cHJpbnQuYwotLS0gYy12YWxwcmludC5jCTIwMDEvMDQvMjcgMDA6MTk6MDkJ MS45CisrKyBjLXZhbHByaW50LmMJMjAwMS8wOC8zMSAyMToyOTowNApAQCAt MTY4LDcgKzE2OCw2IEBAIGNfdmFsX3ByaW50IChzdHJ1Y3QgdHlwZSAqdHlw ZSwgY2hhciAqdmEKIAl7CiAJICBhZGRyID0gdW5wYWNrX3BvaW50ZXIgKHR5 cGUsIHZhbGFkZHIgKyBlbWJlZGRlZF9vZmZzZXQpOwogCXByaW50X3VucGFj a2VkX3BvaW50ZXI6Ci0JICBlbHR0eXBlID0gY2hlY2tfdHlwZWRlZiAoVFlQ RV9UQVJHRVRfVFlQRSAodHlwZSkpOwogCiAJICBpZiAoVFlQRV9DT0RFIChl bHR0eXBlKSA9PSBUWVBFX0NPREVfRlVOQykKIAkgICAgewo= ------------=_1583534360-29878-8-- >From kettenis@wins.uva.nl Sat Sep 01 14:38:00 2001 From: Mark Kettenis To: gdb-patches@sources.redhat.com Subject: [PATCH]: Drop GDB-private regex implementation Date: Sat, 01 Sep 2001 14:38:00 -0000 Message-id: <200109012138.f81LcHd13525@delius.kettenis.local> X-SW-Source: 2001-09/msg00000.html Content-length: 8706 I threatened to do this some time ago. Nobody objected :-). Meanwhile I discovered that two files in cli/ still included gnu-regex.h instead of gdb_regex.h. Attached is the patch actually committed. Mark Index: ChangeLog from Mark Kettenis Make GDB use libiberty regex implementation. * gdb_regex.h: Normalize protection against multiple inclusion. Include "xregex.h" instead of "gnu-regex.h". * cli/cli-cmds.c: Include "gdb_regex.h" instead of "gnu-regex.h". * cli/cli-decode.c: Likewise. * Makefile.in (REGEX): Remove. (GDB_CFLAGS): Remove reference to gnu-regex.h in comment. (ADD_FILES, ADD_DEPS): Remove $(REGEX). (POSSLIBS): Remove. (TAGFILES_NO_SRCDIR): Remove $(POSSLIBS). (irix5-nat.o, solib.o, solib-svr4.o, source.o, symtab.o, xcoffsolib.o, cli-decode.o, cli-cmd.o): Replace gnu-regex.h with gdb_regex.h in list of dependencies. (gnu-regex.o): Remove rule. * gnu-regex.c, gnu-regex.h: Remove files. Index: gdb_regex.h =================================================================== RCS file: /cvs/src/src/gdb/gdb_regex.h,v retrieving revision 1.1 diff -u -p -r1.1 gdb_regex.h --- gdb_regex.h 2000/04/04 02:08:52 1.1 +++ gdb_regex.h 2001/09/01 21:30:45 @@ -1,5 +1,5 @@ /* Portable - Copyright 2000 Free Software Foundation, Inc. + Copyright 2000, 2001 Free Software Foundation, Inc. This file is part of GDB. @@ -18,11 +18,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#ifndef _GDB_REGEX_H -#define _GDB_REGEX_H +#ifndef GDB_REGEX_H +#define GDB_REGEX_H + #ifdef USE_INCLUDED_REGEX -#include "gnu-regex.h" +#include "xregex.h" #else #include #endif -#endif /* _GDB_REGEX_H */ + +#endif /* gdb_regex.h */ Index: Makefile.in =================================================================== RCS file: /cvs/src/src/gdb/Makefile.in,v retrieving revision 1.113 diff -u -p -r1.113 Makefile.in --- Makefile.in 2001/08/17 17:58:25 1.113 +++ Makefile.in 2001/09/01 21:30:46 @@ -109,10 +109,6 @@ MMALLOC_CFLAGS = @MMALLOC_CFLAGS@ # Configured by the --with-uiout option to configure. UIOUT_CFLAGS = @UIOUT_CFLAGS@ -# We are using our own version of REGEX now to be consistent across -# machines. -REGEX = @REGEX@ - # Where is the BFD library? Typically in ../bfd. BFD_DIR = ../bfd BFD = $(BFD_DIR)/libbfd.a @@ -306,7 +302,7 @@ CONFIG_INSTALL = @CONFIG_INSTALL@ CONFIG_UNINSTALL = @CONFIG_UNINSTALL@ # -I. for config files. -# -I$(srcdir) for gdb internal headers and possibly for gnu-regex.h also. +# -I$(srcdir) for gdb internal headers. # -I$(srcdir)/config for more generic config files. # It is also possible that you will need to add -I/usr/include/sys if @@ -366,8 +362,8 @@ CLIBS = $(SIM) $(BFD) $(READLINE) $(OPCO CDEPS = $(XM_CDEPS) $(TM_CDEPS) $(NAT_CDEPS) $(SIM) $(BFD) $(READLINE) \ $(OPCODES) $(MMALLOC) $(INTL_DEPS) $(LIBIBERTY) $(CONFIG_DEPS) -ADD_FILES = $(REGEX) $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES) -ADD_DEPS = $(REGEX) $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES) +ADD_FILES = $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES) +ADD_DEPS = $(XM_ADD_FILES) $(TM_ADD_FILES) $(NAT_ADD_FILES) DIST=gdb @@ -663,8 +659,6 @@ INFOFILES = gdb.info* REMOTE_EXAMPLES = m68k-stub.c i386-stub.c sparc-stub.c rem-multi.shar -POSSLIBS = gnu-regex.c gnu-regex.h - # {X,T,NAT}DEPFILES are something of a pain in that it's hard to # default their values the way we do for SER_HARDWIRE; in the future # maybe much of the stuff now in {X,T,NAT}DEPFILES will go into other @@ -678,7 +672,7 @@ SOURCES = $(SFILES) $(ALLDEPFILES) $(YYF # Don't include YYFILES (*.tab.c) because we already include *.y in SFILES, # and it's more useful to see it in the .y file. TAGFILES_NO_SRCDIR = $(SFILES) $(HFILES_NO_SRCDIR) $(ALLDEPFILES) \ - $(POSSLIBS) $(SUBDIR_CLI_SRCS) + $(SUBDIR_CLI_SRCS) TAGFILES_WITH_SRCDIR = $(HFILES_WITH_SRCDIR) COMMON_OBS = version.o blockframe.o breakpoint.o findvar.o regcache.o \ @@ -1593,8 +1587,8 @@ inftarg.o: inftarg.c gdb_wait.h $(defs_h irix4-nat.o: irix4-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(regcache_h) irix5-nat.o: irix5-nat.c $(defs_h) $(inferior_h) $(gdbcore_h) $(target_h) \ - $(symtab_h) $(symfile_h) objfiles.h $(command_h) $(frame_h) gnu-regex.h \ - language.h $(gdb_string_h) $(regcache_h) + $(symtab_h) $(symfile_h) objfiles.h $(command_h) $(frame_h) \ + gdb_regex.h language.h $(gdb_string_h) $(regcache_h) # OBSOLETE isi-xdep.o: isi-xdep.c @@ -1818,8 +1812,6 @@ lin-lwp.o: lin-lwp.c $(defs_h) gdb_asser proc-service.o: proc-service.c $(defs_h) $(inferior_h) gdb_proc_service.h \ $(symtab_h) $(target_h) gregset.h -gnu-regex.o: gnu-regex.c gnu-regex.h $(defs_h) $(gdb_string_h) - remote-adapt.o: remote-adapt.c $(defs_h) $(gdbcore_h) \ $(inferior_h) $(target_h) terminal.h $(gdb_string_h) $(regcache_h) @@ -1965,18 +1957,19 @@ mon960-rom.o: mon960-rom.c monitor.h $(b $(inferior_h) $(target_h) serial.h terminal.h solib.o: solib.c $(command_h) $(defs_h) $(gdbcore_h) $(inferior_h) \ - objfiles.h gnu-regex.h $(symfile_h) $(target_h) $(gdb_string_h) solist.h \ - $(completer_h) + objfiles.h gdb_regex.h $(symfile_h) $(target_h) $(gdb_string_h) \ + solist.h $(completer_h) solib-svr4.o: solib-svr4.c $(command_h) $(defs_h) $(gdbcore_h) $(inferior_h) \ - objfiles.h gnu-regex.h $(symfile_h) $(target_h) $(gdb_string_h) solist.h \ - solib-svr4.h $(regcache_h) + objfiles.h gdb_regex.h $(symfile_h) $(target_h) $(gdb_string_h) \ + solist.h solib-svr4.h $(regcache_h) solib-legacy.o: solib-legacy.c $(defs_h) $(gdbcore_h) solib-svr4.h source.o: source.c $(defs_h) $(expression_h) $(frame_h) $(gdbcmd_h) \ - $(gdbcore_h) language.h objfiles.h gnu-regex.h $(symfile_h) $(symtab_h) \ - $(gdb_string_h) source.h $(completer_h) linespec.h $(ui_out_h) + $(gdbcore_h) language.h objfiles.h gdb_regex.h $(symfile_h) \ + $(symtab_h) $(gdb_string_h) source.h $(completer_h) linespec.h \ + $(ui_out_h) sparc-nat.o: sparc-nat.c $(bfd_h) $(defs_h) $(inferior_h) $(gdbcore_h) \ $(target_h) $(regcache_h) @@ -2025,7 +2018,7 @@ symmisc.o: symmisc.c $(bfd_h) $(breakpoi symtab.o: symtab.c call-cmds.h $(defs_h) $(expression_h) $(frame_h) \ $(gdbcmd_h) $(gdbcore_h) $(gdbtypes_h) language.h objfiles.h \ - gnu-regex.h $(symfile_h) $(symtab_h) $(target_h) $(value_h) \ + gdb_regex.h $(symfile_h) $(symtab_h) $(target_h) $(value_h) \ $(gdb_string_h) linespec.h $(cp_abi_h) linespec.o: linespec.c linespec.h $(defs_h) $(frame_h) $(value_h) \ @@ -2105,7 +2098,7 @@ xcoffread.o: xcoffread.c $(bfd_h) $(INCL $(symtab_h) partial-stab.h $(gdb_string_h) xcoffsolib.o: xcoffsolib.c $(bfd_h) $(defs_h) xcoffsolib.h $(inferior_h) \ - $(gdbcmd_h) $(symfile_h) $(frame_h) gnu-regex.h + $(gdbcmd_h) $(symfile_h) $(frame_h) gdb_regex.h # FIXME: z8k-tdep.c calls _initialize_gdbtypes(). Since that isn't # declared -Wimplicit fails. It should be using the GDBARCH framework. @@ -2152,12 +2145,12 @@ wrapper.o: wrapper.c $(defs_h) $(frame_h cli-decode.o: $(srcdir)/cli/cli-decode.c $(cli_decode_h) \ $(cli_cmds_h) $(defs_h) $(ui_out_h) \ - $(symtab_h) gnu-regex.h + $(symtab_h) gdb_regex.h $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-decode.c cli-cmds.o: $(srcdir)/cli/cli-cmds.c $(cli_cmds_h) $(cli_decode_h) \ - $(cli_script_h) $(cli_setshow_h) top.h $(completer_h) $(defs_h) \ - $(target_h) gdb_wait.h gnu-regex.h $(ui_out_h) + $(cli_script_h) $(cli_setshow_h) top.h $(completer_h) \ + $(defs_h) $(target_h) gdb_wait.h gdb_regex.h $(ui_out_h) $(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-cmds.c cli-setshow.o: $(srcdir)/cli/cli-setshow.c $(cli_setshow_h) \ Index: cli/cli-cmds.c =================================================================== RCS file: /cvs/src/src/gdb/cli/cli-cmds.c,v retrieving revision 1.9 diff -u -p -r1.9 cli-cmds.c --- cli/cli-cmds.c 2001/07/16 14:13:06 1.9 +++ cli/cli-cmds.c 2001/09/01 21:30:47 @@ -22,7 +22,7 @@ #include "completer.h" #include "target.h" /* For baud_rate, remote_debug and remote_timeout */ #include "gdb_wait.h" /* For shell escape implementation */ -#include "gnu-regex.h" /* Used by apropos_command */ +#include "gdb_regex.h" /* Used by apropos_command */ #include "filenames.h" /* for DOSish file names */ #ifdef UI_OUT Index: cli/cli-decode.c =================================================================== RCS file: /cvs/src/src/gdb/cli/cli-decode.c,v retrieving revision 1.7 diff -u -p -r1.7 cli-decode.c --- cli/cli-decode.c 2001/03/06 08:21:19 1.7 +++ cli/cli-decode.c 2001/09/01 21:30:47 @@ -20,7 +20,7 @@ #include "defs.h" #include "symtab.h" #include -#include "gnu-regex.h" +#include "gdb_regex.h" #ifdef UI_OUT #include "ui-out.h"