Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] fix -Werrors from new readline
@ 2002-12-08 17:25 Elena Zannoni
  2002-12-08 17:36 ` Elena Zannoni
  0 siblings, 1 reply; 5+ messages in thread
From: Elena Zannoni @ 2002-12-08 17:25 UTC (permalink / raw)
  To: gdb-patches


I found a few more places that needed to be updated for readline 4.3.

Committed.

Elena

2002-12-08  Elena Zannoni  <ezannoni@redhat.com>

	More cleanup from import of readline 4.3.
	* completer.h (complete_line, readline_line_completion_function):
	Update prototypes.
	(line_completion_function): Removed, not used outside of completer.c.
	* completer.c (readline_line_completion_function,
	complete_function, line_completion_function): Use const for first
	parameter.
	(line_completion_function): Make static.
	(filename_completer): filename_completion_function is now called
	rl_filename_completion_function
	* corelow.c: Include <readline/readline.h>.
	* exec.c: Ditto.
	* solib.c: Ditto.
	* source.c: Ditto.
	* symfile.c: Ditto.
	* symmisc.c: Ditto.
	* top.c (init_main): No need to coerce
	readline_line_completion_function anymore.
	* cli/cli-dump.c: Include <readline/readline.h>.

Index: exec.c
===================================================================
RCS file: /cvs/uberbaum/gdb/exec.c,v
retrieving revision 1.21
diff -u -p -r1.21 exec.c
--- exec.c	30 Nov 2002 16:33:55 -0000	1.21
+++ exec.c	9 Dec 2002 00:53:10 -0000
@@ -36,6 +36,7 @@
 #endif
 
 #include <fcntl.h>
+#include <readline/readline.h>
 #include "gdb_string.h"
 
 #include "gdbcore.h"
Index: top.c
===================================================================
RCS file: /cvs/uberbaum/gdb/top.c,v
retrieving revision 1.68
diff -u -p -r1.68 top.c
--- top.c	26 Sep 2002 17:46:04 -0000	1.68
+++ top.c	9 Dec 2002 00:53:12 -0000
@@ -1952,7 +1952,7 @@ init_main (void)
   write_history_p = 0;
 
   /* Setup important stuff for command line editing.  */
-  rl_completion_entry_function = (int (*)()) readline_line_completion_function;
+  rl_completion_entry_function = readline_line_completion_function;
   rl_completer_word_break_characters =
 				 get_gdb_completer_word_break_characters ();
   rl_completer_quote_characters = get_gdb_completer_quote_characters ();
Index: symmisc.c
===================================================================
RCS file: /cvs/uberbaum/gdb/symmisc.c,v
retrieving revision 1.12
diff -u -p -r1.12 symmisc.c
--- symmisc.c	29 Jul 2002 22:55:26 -0000	1.12
+++ symmisc.c	9 Dec 2002 00:53:13 -0000
@@ -34,6 +34,7 @@
 #include "bcache.h"
 
 #include "gdb_string.h"
+#include <readline/readline.h>
 
 #ifndef DEV_TTY
 #define DEV_TTY "/dev/tty"
Index: symfile.c
===================================================================
RCS file: /cvs/uberbaum/gdb/symfile.c,v
retrieving revision 1.74
diff -u -p -r1.74 symfile.c
--- symfile.c	25 Nov 2002 21:00:51 -0000	1.74
+++ symfile.c	9 Dec 2002 00:53:16 -0000
@@ -42,6 +42,7 @@
 #include "gdb_obstack.h"
 #include "completer.h"
 #include "bcache.h"
+#include <readline/readline.h>
 
 #include <sys/types.h>
 #include <fcntl.h>
Index: source.c
===================================================================
RCS file: /cvs/uberbaum/gdb/source.c,v
retrieving revision 1.36
diff -u -p -r1.36 source.c
--- source.c	24 Oct 2002 21:02:53 -0000	1.36
+++ source.c	9 Dec 2002 00:53:17 -0000
@@ -44,6 +44,7 @@
 #include "filenames.h"		/* for DOSish file names */
 #include "completer.h"
 #include "ui-out.h"
+#include <readline/readline.h>
 
 #ifdef CRLF_SOURCE_FILES
 
Index: solib.c
===================================================================
RCS file: /cvs/uberbaum/gdb/solib.c,v
retrieving revision 1.50
diff -u -p -r1.50 solib.c
--- solib.c	12 May 2002 04:20:06 -0000	1.50
+++ solib.c	9 Dec 2002 00:53:18 -0000
@@ -42,6 +42,7 @@
 #include "filenames.h"		/* for DOSish file names */
 
 #include "solist.h"
+#include <readline/readline.h>
 
 /* external data declarations */
 
Index: corelow.c
===================================================================
RCS file: /cvs/uberbaum/gdb/corelow.c,v
retrieving revision 1.26
diff -u -p -r1.26 corelow.c
--- corelow.c	30 Nov 2002 16:33:55 -0000	1.26
+++ corelow.c	9 Dec 2002 00:53:18 -0000
@@ -38,6 +38,7 @@
 #include "gdbthread.h"
 #include "regcache.h"
 #include "symfile.h"
+#include <readline/readline.h>
 
 #ifndef O_BINARY
 #define O_BINARY 0
Index: completer.c
===================================================================
RCS file: /cvs/uberbaum/gdb/completer.c,v
retrieving revision 1.12
diff -u -p -r1.12 completer.c
--- completer.c	20 Nov 2002 08:58:01 -0000	1.12
+++ completer.c	9 Dec 2002 00:53:19 -0000
@@ -31,7 +31,7 @@
 #include "gdbcmd.h"
 
 /* Needed for rl_completer_word_break_characters() and for
-   filename_completion_function.  */
+   rl_filename_completion_function.  */
 #include <readline/readline.h>
 
 /* readline defines this.  */
@@ -40,7 +40,8 @@
 #include "completer.h"
 
 /* Prototypes for local functions */
-char *line_completion_function (char *text, int matches, char *line_buffer,
+static
+char *line_completion_function (const char *text, int matches, char *line_buffer,
 				int point);
 
 /* readline uses the word breaks for two things:
@@ -104,7 +105,7 @@ get_gdb_completer_quote_characters (void
 /* Line completion interface function for readline.  */
 
 char *
-readline_line_completion_function (char *text, int matches)
+readline_line_completion_function (const char *text, int matches)
 {
   return line_completion_function (text, matches, rl_line_buffer, rl_point);
 }
@@ -135,7 +136,7 @@ filename_completer (char *text, char *wo
   while (1)
     {
       char *p;
-      p = filename_completion_function (text, subsequent_name);
+      p = rl_filename_completion_function (text, subsequent_name);
       if (return_val_used >= return_val_alloced)
 	{
 	  return_val_alloced *= 2;
@@ -382,7 +383,7 @@ command_completer (char *text, char *wor
    should pretend that the line ends at POINT.  */
 
 char **
-complete_line (char *text, char *line_buffer, int point)
+complete_line (const char *text, char *line_buffer, int point)
 {
   char **list = NULL;
   char *tmp_command, *p;
@@ -628,8 +629,8 @@ complete_line (char *text, char *line_bu
    which is a possible completion, it is the caller's responsibility to
    free the string.  */
 
-char *
-line_completion_function (char *text, int matches, char *line_buffer, int point)
+static char *
+line_completion_function (const char *text, int matches, char *line_buffer, int point)
 {
   static char **list = (char **) NULL;	/* Cache of completions */
   static int index;		/* Next cached completion */
Index: completer.h
===================================================================
RCS file: /cvs/uberbaum/gdb/completer.h,v
retrieving revision 1.7
diff -u -p -r1.7 completer.h
--- completer.h	20 Nov 2002 08:58:01 -0000	1.7
+++ completer.h	9 Dec 2002 00:53:19 -0000
@@ -19,11 +19,9 @@
 #if !defined (COMPLETER_H)
 #define COMPLETER_H 1
 
-extern char **complete_line (char *text, char *line_buffer, int point);
+extern char **complete_line (const char *text, char *line_buffer, int point);
 
-extern char *line_completion_function (char *, int, char *, int);
-
-extern char *readline_line_completion_function (char *text, int matches);
+extern char *readline_line_completion_function (const char *text, int matches);
 
 extern char **noop_completer (char *, char *);
 
Index: cli/cli-dump.c
===================================================================
RCS file: /cvs/uberbaum/gdb/cli/cli-dump.c,v
retrieving revision 1.6
diff -u -p -r1.6 cli-dump.c
--- cli/cli-dump.c	9 Aug 2002 16:36:10 -0000	1.6
+++ cli/cli-dump.c	9 Dec 2002 00:53:20 -0000
@@ -31,6 +31,7 @@
 #include "gdb_assert.h"
 #include <ctype.h>
 #include "target.h"
+#include <readline/readline.h>
 
 #define XMALLOC(TYPE) ((TYPE*) xmalloc (sizeof (TYPE)))
 


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

* Re: [PATCH] fix -Werrors from new readline
  2002-12-08 17:25 [PATCH] fix -Werrors from new readline Elena Zannoni
@ 2002-12-08 17:36 ` Elena Zannoni
  2002-12-08 18:44   ` Daniel Jacobowitz
  0 siblings, 1 reply; 5+ messages in thread
From: Elena Zannoni @ 2002-12-08 17:36 UTC (permalink / raw)
  To: gdb-patches



And the makefile.

2002-12-08  Elena Zannoni  <ezannoni@redhat.com>

	* Makefile.in (readline_h): Define.
	(completer.o): Depend on readline_h.
	(corelow.o): Ditto.
	(event-top.o): Ditto.
	(exec.o): Ditto.
	(solib.o): Ditto.
	(source.o): Ditto. 
	(symfile.o): Ditto. 
	(symmisc.o): Ditto. 
	(top.o): Ditto.
	(tracepoint.o): Ditto. 
	(utils.o): Ditto.
	(cli-dump.o): Ditto.
	(tui-hooks.o): Ditto. 
	(tuiWin.o): Ditto. 

Index: Makefile.in
===================================================================
RCS file: /cvs/uberbaum/gdb/Makefile.in,v
retrieving revision 1.293
diff -u -p -r1.293 Makefile.in
--- Makefile.in	8 Dec 2002 21:10:28 -0000	1.293
+++ Makefile.in	9 Dec 2002 01:27:04 -0000
@@ -589,6 +589,7 @@ remote_sim_h =	$(INCLUDE_DIR)/gdb/remote
 demangle_h =    $(INCLUDE_DIR)/demangle.h
 obstack_h =     $(INCLUDE_DIR)/obstack.h
 opcode_m68hc11_h = $(INCLUDE_DIR)/opcode/m68hc11.h
+readline_h = 	$(READLINE_SRC)/readline.h
 sh_opc_h = 	$(OPCODES_SRC)/sh-opc.h
 gdb_sim_arm_h =	$(INCLUDE_DIR)/gdb/sim-arm.h
 gdb_sim_d10v_h = $(INCLUDE_DIR)/gdb/sim-d10v.h
@@ -1608,7 +1609,7 @@ coffread.o: coffread.c $(defs_h) $(symta
 complaints.o: complaints.c $(defs_h) $(complaints_h) $(gdb_assert_h) \
 	$(command_h) $(gdbcmd_h)
 completer.o: completer.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \
-	$(filenames_h) $(cli_decode_h) $(gdbcmd_h) $(completer_h)
+	$(filenames_h) $(cli_decode_h) $(gdbcmd_h) $(completer_h) $(readline_h)
 copying.o: copying.c $(defs_h) $(command_h) $(gdbcmd_h)
 core-aout.o: core-aout.c $(defs_h) $(gdbcore_h) $(value_h) $(regcache_h) \
 	$(gdb_dirent_h) $(gdb_stat_h)
@@ -1621,7 +1622,7 @@ corefile.o: corefile.c $(defs_h) $(gdb_s
 	$(dis_asm_h) $(gdb_stat_h) $(completer_h)
 corelow.o: corelow.c $(defs_h) $(gdb_string_h) $(frame_h) $(inferior_h) \
 	$(symtab_h) $(command_h) $(bfd_h) $(target_h) $(gdbcore_h) \
-	$(gdbthread_h) $(regcache_h) $(symfile_h)
+	$(gdbthread_h) $(regcache_h) $(symfile_h) $(readline_h)
 cp-abi.o: cp-abi.c $(defs_h) $(value_h) $(cp_abi_h) $(gdb_string_h)
 cp-support.o: cp-support.c $(defs_h) $(cp_support_h)
 cp-valprint.o: cp-valprint.c $(defs_h) $(gdb_obstack_h) $(symtab_h) \
@@ -1687,10 +1688,11 @@ eval.o: eval.c $(defs_h) $(gdb_string_h)
 event-loop.o: event-loop.c $(defs_h) $(event_loop_h) $(event_top_h) \
 	$(gdb_string_h)
 event-top.o: event-top.c $(defs_h) $(top_h) $(inferior_h) $(target_h) \
-	$(terminal_h) $(event_loop_h) $(event_top_h) $(gdbcmd_h)
+	$(terminal_h) $(event_loop_h) $(event_top_h) $(gdbcmd_h) $(readline_h)
 exec.o: exec.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) $(gdbcmd_h) \
 	$(language_h) $(symfile_h) $(objfiles_h) $(completer_h) $(value_h) \
-	$(gdb_string_h) $(gdbcore_h) $(gdb_stat_h) $(xcoffsolib_h)
+	$(gdb_string_h) $(gdbcore_h) $(gdb_stat_h) $(xcoffsolib_h) \
+	$(readline_h)
 expprint.o: expprint.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(expression_h) \
 	$(value_h) $(language_h) $(parser_defs_h) $(target_h) $(gdb_string_h)
 f-lang.o: f-lang.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \
@@ -2189,7 +2191,7 @@ solib-svr4.o: solib-svr4.c $(defs_h) $(e
 solib.o: solib.c $(defs_h) $(gdb_string_h) $(symtab_h) $(bfd_h) $(symfile_h) \
 	$(objfiles_h) $(gdbcore_h) $(command_h) $(target_h) $(frame_h) \
 	$(gdb_regex_h) $(inferior_h) $(environ_h) $(language_h) $(gdbcmd_h) \
-	$(completer_h) $(filenames_h) $(solist_h)
+	$(completer_h) $(filenames_h) $(solist_h) $(readline_h)
 somread.o: somread.c $(defs_h) $(bfd_h) $(symtab_h) $(symfile_h) \
 	$(objfiles_h) $(buildsym_h) $(stabsread_h) $(gdb_stabs_h) \
 	$(complaints_h) $(gdb_string_h) $(demangle_h) $(som_h) $(libhppa_h)
@@ -2201,7 +2203,7 @@ source.o: source.c $(defs_h) $(symtab_h)
 	$(command_h) $(source_h) $(gdbcmd_h) $(frame_h) $(value_h) \
 	$(gdb_string_h) $(gdb_stat_h) $(gdbcore_h) $(gdb_regex_h) \
 	$(symfile_h) $(objfiles_h) $(annotate_h) $(gdbtypes_h) $(linespec_h) \
-	$(filenames_h) $(completer_h) $(ui_out_h)
+	$(filenames_h) $(completer_h) $(ui_out_h) $(readline_h)
 sparc-linux-nat.o: sparc-linux-nat.c $(defs_h) $(regcache_h) $(gregset_h)
 sparc-nat.o: sparc-nat.c $(defs_h) $(inferior_h) $(target_h) $(gdbcore_h) \
 	$(regcache_h)
@@ -2242,14 +2244,16 @@ symfile.o: symfile.c $(defs_h) $(symtab_
 	$(frame_h) $(target_h) $(value_h) $(symfile_h) $(objfiles_h) \
 	$(gdbcmd_h) $(breakpoint_h) $(language_h) $(complaints_h) \
 	$(demangle_h) $(inferior_h) $(gdb_stabs_h) $(gdb_obstack_h) \
-	$(completer_h) $(bcache_h) $(gdb_string_h) $(gdb_stat_h) $(source_h)
+	$(completer_h) $(bcache_h) $(gdb_string_h) $(gdb_stat_h) $(source_h) \
+	$(readline_h)
 symm-nat.o: symm-nat.c $(defs_h) $(frame_h) $(inferior_h) $(symtab_h) \
 	$(target_h) $(regcache_h) $(gdb_stat_h) $(gdbcore_h) $(gdbcore_h)
 symm-tdep.o: symm-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(symtab_h) \
 	$(gdb_stat_h) $(gdbcore_h)
 symmisc.o: symmisc.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(bfd_h) \
 	$(symfile_h) $(objfiles_h) $(breakpoint_h) $(command_h) \
-	$(gdb_obstack_h) $(language_h) $(bcache_h) $(gdb_string_h)
+	$(gdb_obstack_h) $(language_h) $(bcache_h) $(gdb_string_h) \
+	$(readline_h)
 symtab.o: symtab.c $(defs_h) $(symtab_h) $(gdbtypes_h) $(gdbcore_h) \
 	$(frame_h) $(target_h) $(value_h) $(symfile_h) $(objfiles_h) \
 	$(gdbcmd_h) $(call_cmds_h) $(gdb_regex_h) $(expression_h) \
@@ -2271,12 +2275,12 @@ top.o: top.c $(defs_h) $(gdbcmd_h) $(cal
 	$(expression_h) $(value_h) $(language_h) $(terminal_h) $(annotate_h) \
 	$(completer_h) $(top_h) $(version_h) $(serial_h) $(doublest_h) \
 	$(gdb_assert_h) $(event_top_h) $(gdb_string_h) $(gdb_stat_h) \
-	$(ui_out_h) $(cli_out_h)
+	$(ui_out_h) $(cli_out_h) $(readline_h)
 tracepoint.o: tracepoint.c $(defs_h) $(symtab_h) $(frame_h) $(gdbtypes_h) \
 	$(expression_h) $(gdbcmd_h) $(value_h) $(target_h) $(language_h) \
 	$(gdb_string_h) $(inferior_h) $(tracepoint_h) $(remote_h) \
 	$(linespec_h) $(regcache_h) $(completer_h) $(gdb_events_h) $(ax_h) \
-	$(ax_gdb_h)
+	$(ax_gdb_h) $(readline_h)
 typeprint.o: typeprint.c $(defs_h) $(gdb_obstack_h) $(bfd_h) $(symtab_h) \
 	$(gdbtypes_h) $(expression_h) $(value_h) $(gdbcore_h) $(command_h) \
 	$(gdbcmd_h) $(target_h) $(language_h) $(cp_abi_h) $(gdb_string_h)
@@ -2286,7 +2290,7 @@ ui-out.o: ui-out.c $(defs_h) $(gdb_strin
 utils.o: utils.c $(config_h) $(defs_h) $(gdb_assert_h) $(gdb_string_h) \
 	$(event_top_h) $(gdbcmd_h) $(serial_h) $(bfd_h) $(target_h) \
 	$(demangle_h) $(expression_h) $(language_h) $(annotate_h) \
-	$(filenames_h) $(inferior_h) $(mmalloc_h) $(charset_h)
+	$(filenames_h) $(inferior_h) $(mmalloc_h) $(charset_h) $(readline_h)
 uw-thread.o: uw-thread.c $(defs_h) $(gdbthread_h) $(target_h) $(inferior_h) \
 	$(regcache_h) $(gregset_h)
 v850-tdep.o: v850-tdep.c $(defs_h) $(frame_h) $(inferior_h) $(target_h) \
@@ -2365,7 +2369,7 @@ cli-decode.o: $(srcdir)/cli/cli-decode.c
 	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-decode.c
 cli-dump.o: $(srcdir)/cli/cli-dump.c $(defs_h) $(gdb_string_h) \
 	$(cli_decode_h) $(cli_cmds_h) $(value_h) $(completer_h) \
-	$(cli_dump_h) $(gdb_assert_h) $(target_h)
+	$(cli_dump_h) $(gdb_assert_h) $(target_h) $(readline_h)
 	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/cli/cli-dump.c
 cli-script.o: $(srcdir)/cli/cli-script.c $(defs_h) $(value_h) $(language_h) \
 	$(ui_out_h) $(gdb_string_h) $(top_h) $(cli_cmds_h) $(cli_decode_h) \
@@ -2615,7 +2619,7 @@ tui-hooks.o: $(srcdir)/tui/tui-hooks.c $
 	$(target_h) $(gdbcore_h) $(event_loop_h) $(frame_h) $(breakpoint_h) \
 	$(gdb_events_h) $(tui_h) $(tuiData_h) $(tuiLayout_h) $(tuiIO_h) \
 	$(tuiRegs_h) $(tuiWin_h) $(tuiStack_h) $(tuiDataWin_h) \
-	$(tuiSourceWin_h)
+	$(tuiSourceWin_h) $(readline_h)
 	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tui-hooks.c
 tui-out.o: $(srcdir)/tui/tui-out.c $(defs_h) $(ui_out_h) $(tui_h) \
 	$(gdb_string_h) $(gdb_assert_h)
@@ -2673,7 +2677,8 @@ tuiStack.o: $(srcdir)/tui/tuiStack.c $(c
 tuiWin.o: $(srcdir)/tui/tuiWin.c $(config_h) $(defs_h) $(command_h) \
 	$(symtab_h) $(breakpoint_h) $(frame_h) $(cli_cmds_h) $(tui_h) \
 	$(tuiData_h) $(tuiGeneralWin_h) $(tuiStack_h) $(tuiRegs_h) \
-	$(tuiDisassem_h) $(tuiSource_h) $(tuiSourceWin_h) $(tuiDataWin_h)
+	$(tuiDisassem_h) $(tuiSource_h) $(tuiSourceWin_h) $(tuiDataWin_h) \
+	$(readline_h)
 	$(CC) -c $(INTERNAL_CFLAGS) $(srcdir)/tui/tuiWin.c
 
 #


Elena Zannoni writes:
 > 
 > I found a few more places that needed to be updated for readline 4.3.
 > 
 > Committed.
 > 
 > Elena
 > 
 > 2002-12-08  Elena Zannoni  <ezannoni@redhat.com>
 > 
 > 	More cleanup from import of readline 4.3.
 > 	* completer.h (complete_line, readline_line_completion_function):
 > 	Update prototypes.
 > 	(line_completion_function): Removed, not used outside of completer.c.
 > 	* completer.c (readline_line_completion_function,
 > 	complete_function, line_completion_function): Use const for first
 > 	parameter.
 > 	(line_completion_function): Make static.
 > 	(filename_completer): filename_completion_function is now called
 > 	rl_filename_completion_function
 > 	* corelow.c: Include <readline/readline.h>.
 > 	* exec.c: Ditto.
 > 	* solib.c: Ditto.
 > 	* source.c: Ditto.
 > 	* symfile.c: Ditto.
 > 	* symmisc.c: Ditto.
 > 	* top.c (init_main): No need to coerce
 > 	readline_line_completion_function anymore.
 > 	* cli/cli-dump.c: Include <readline/readline.h>.
 > 
 > Index: exec.c
 > ===================================================================
 > RCS file: /cvs/uberbaum/gdb/exec.c,v
 > retrieving revision 1.21
 > diff -u -p -r1.21 exec.c
 > --- exec.c	30 Nov 2002 16:33:55 -0000	1.21
 > +++ exec.c	9 Dec 2002 00:53:10 -0000
 > @@ -36,6 +36,7 @@
 >  #endif
 >  
 >  #include <fcntl.h>
 > +#include <readline/readline.h>
 >  #include "gdb_string.h"
 >  
 >  #include "gdbcore.h"
 > Index: top.c
 > ===================================================================
 > RCS file: /cvs/uberbaum/gdb/top.c,v
 > retrieving revision 1.68
 > diff -u -p -r1.68 top.c
 > --- top.c	26 Sep 2002 17:46:04 -0000	1.68
 > +++ top.c	9 Dec 2002 00:53:12 -0000
 > @@ -1952,7 +1952,7 @@ init_main (void)
 >    write_history_p = 0;
 >  
 >    /* Setup important stuff for command line editing.  */
 > -  rl_completion_entry_function = (int (*)()) readline_line_completion_function;
 > +  rl_completion_entry_function = readline_line_completion_function;
 >    rl_completer_word_break_characters =
 >  				 get_gdb_completer_word_break_characters ();
 >    rl_completer_quote_characters = get_gdb_completer_quote_characters ();
 > Index: symmisc.c
 > ===================================================================
 > RCS file: /cvs/uberbaum/gdb/symmisc.c,v
 > retrieving revision 1.12
 > diff -u -p -r1.12 symmisc.c
 > --- symmisc.c	29 Jul 2002 22:55:26 -0000	1.12
 > +++ symmisc.c	9 Dec 2002 00:53:13 -0000
 > @@ -34,6 +34,7 @@
 >  #include "bcache.h"
 >  
 >  #include "gdb_string.h"
 > +#include <readline/readline.h>
 >  
 >  #ifndef DEV_TTY
 >  #define DEV_TTY "/dev/tty"
 > Index: symfile.c
 > ===================================================================
 > RCS file: /cvs/uberbaum/gdb/symfile.c,v
 > retrieving revision 1.74
 > diff -u -p -r1.74 symfile.c
 > --- symfile.c	25 Nov 2002 21:00:51 -0000	1.74
 > +++ symfile.c	9 Dec 2002 00:53:16 -0000
 > @@ -42,6 +42,7 @@
 >  #include "gdb_obstack.h"
 >  #include "completer.h"
 >  #include "bcache.h"
 > +#include <readline/readline.h>
 >  
 >  #include <sys/types.h>
 >  #include <fcntl.h>
 > Index: source.c
 > ===================================================================
 > RCS file: /cvs/uberbaum/gdb/source.c,v
 > retrieving revision 1.36
 > diff -u -p -r1.36 source.c
 > --- source.c	24 Oct 2002 21:02:53 -0000	1.36
 > +++ source.c	9 Dec 2002 00:53:17 -0000
 > @@ -44,6 +44,7 @@
 >  #include "filenames.h"		/* for DOSish file names */
 >  #include "completer.h"
 >  #include "ui-out.h"
 > +#include <readline/readline.h>
 >  
 >  #ifdef CRLF_SOURCE_FILES
 >  
 > Index: solib.c
 > ===================================================================
 > RCS file: /cvs/uberbaum/gdb/solib.c,v
 > retrieving revision 1.50
 > diff -u -p -r1.50 solib.c
 > --- solib.c	12 May 2002 04:20:06 -0000	1.50
 > +++ solib.c	9 Dec 2002 00:53:18 -0000
 > @@ -42,6 +42,7 @@
 >  #include "filenames.h"		/* for DOSish file names */
 >  
 >  #include "solist.h"
 > +#include <readline/readline.h>
 >  
 >  /* external data declarations */
 >  
 > Index: corelow.c
 > ===================================================================
 > RCS file: /cvs/uberbaum/gdb/corelow.c,v
 > retrieving revision 1.26
 > diff -u -p -r1.26 corelow.c
 > --- corelow.c	30 Nov 2002 16:33:55 -0000	1.26
 > +++ corelow.c	9 Dec 2002 00:53:18 -0000
 > @@ -38,6 +38,7 @@
 >  #include "gdbthread.h"
 >  #include "regcache.h"
 >  #include "symfile.h"
 > +#include <readline/readline.h>
 >  
 >  #ifndef O_BINARY
 >  #define O_BINARY 0
 > Index: completer.c
 > ===================================================================
 > RCS file: /cvs/uberbaum/gdb/completer.c,v
 > retrieving revision 1.12
 > diff -u -p -r1.12 completer.c
 > --- completer.c	20 Nov 2002 08:58:01 -0000	1.12
 > +++ completer.c	9 Dec 2002 00:53:19 -0000
 > @@ -31,7 +31,7 @@
 >  #include "gdbcmd.h"
 >  
 >  /* Needed for rl_completer_word_break_characters() and for
 > -   filename_completion_function.  */
 > +   rl_filename_completion_function.  */
 >  #include <readline/readline.h>
 >  
 >  /* readline defines this.  */
 > @@ -40,7 +40,8 @@
 >  #include "completer.h"
 >  
 >  /* Prototypes for local functions */
 > -char *line_completion_function (char *text, int matches, char *line_buffer,
 > +static
 > +char *line_completion_function (const char *text, int matches, char *line_buffer,
 >  				int point);
 >  
 >  /* readline uses the word breaks for two things:
 > @@ -104,7 +105,7 @@ get_gdb_completer_quote_characters (void
 >  /* Line completion interface function for readline.  */
 >  
 >  char *
 > -readline_line_completion_function (char *text, int matches)
 > +readline_line_completion_function (const char *text, int matches)
 >  {
 >    return line_completion_function (text, matches, rl_line_buffer, rl_point);
 >  }
 > @@ -135,7 +136,7 @@ filename_completer (char *text, char *wo
 >    while (1)
 >      {
 >        char *p;
 > -      p = filename_completion_function (text, subsequent_name);
 > +      p = rl_filename_completion_function (text, subsequent_name);
 >        if (return_val_used >= return_val_alloced)
 >  	{
 >  	  return_val_alloced *= 2;
 > @@ -382,7 +383,7 @@ command_completer (char *text, char *wor
 >     should pretend that the line ends at POINT.  */
 >  
 >  char **
 > -complete_line (char *text, char *line_buffer, int point)
 > +complete_line (const char *text, char *line_buffer, int point)
 >  {
 >    char **list = NULL;
 >    char *tmp_command, *p;
 > @@ -628,8 +629,8 @@ complete_line (char *text, char *line_bu
 >     which is a possible completion, it is the caller's responsibility to
 >     free the string.  */
 >  
 > -char *
 > -line_completion_function (char *text, int matches, char *line_buffer, int point)
 > +static char *
 > +line_completion_function (const char *text, int matches, char *line_buffer, int point)
 >  {
 >    static char **list = (char **) NULL;	/* Cache of completions */
 >    static int index;		/* Next cached completion */
 > Index: completer.h
 > ===================================================================
 > RCS file: /cvs/uberbaum/gdb/completer.h,v
 > retrieving revision 1.7
 > diff -u -p -r1.7 completer.h
 > --- completer.h	20 Nov 2002 08:58:01 -0000	1.7
 > +++ completer.h	9 Dec 2002 00:53:19 -0000
 > @@ -19,11 +19,9 @@
 >  #if !defined (COMPLETER_H)
 >  #define COMPLETER_H 1
 >  
 > -extern char **complete_line (char *text, char *line_buffer, int point);
 > +extern char **complete_line (const char *text, char *line_buffer, int point);
 >  
 > -extern char *line_completion_function (char *, int, char *, int);
 > -
 > -extern char *readline_line_completion_function (char *text, int matches);
 > +extern char *readline_line_completion_function (const char *text, int matches);
 >  
 >  extern char **noop_completer (char *, char *);
 >  
 > Index: cli/cli-dump.c
 > ===================================================================
 > RCS file: /cvs/uberbaum/gdb/cli/cli-dump.c,v
 > retrieving revision 1.6
 > diff -u -p -r1.6 cli-dump.c
 > --- cli/cli-dump.c	9 Aug 2002 16:36:10 -0000	1.6
 > +++ cli/cli-dump.c	9 Dec 2002 00:53:20 -0000
 > @@ -31,6 +31,7 @@
 >  #include "gdb_assert.h"
 >  #include <ctype.h>
 >  #include "target.h"
 > +#include <readline/readline.h>
 >  
 >  #define XMALLOC(TYPE) ((TYPE*) xmalloc (sizeof (TYPE)))
 >  


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

* Re: [PATCH] fix -Werrors from new readline
  2002-12-08 17:36 ` Elena Zannoni
@ 2002-12-08 18:44   ` Daniel Jacobowitz
  2002-12-08 20:42     ` Elena Zannoni
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Jacobowitz @ 2002-12-08 18:44 UTC (permalink / raw)
  To: gdb-patches

On Sun, Dec 08, 2002 at 08:23:40PM -0500, Elena Zannoni wrote:
> 
> 
> And the makefile.
> 
> 2002-12-08  Elena Zannoni  <ezannoni@redhat.com>
> 
> 	* Makefile.in (readline_h): Define.
> 	(completer.o): Depend on readline_h.
> 	(corelow.o): Ditto.
> 	(event-top.o): Ditto.
> 	(exec.o): Ditto.
> 	(solib.o): Ditto.
> 	(source.o): Ditto. 
> 	(symfile.o): Ditto. 
> 	(symmisc.o): Ditto. 
> 	(top.o): Ditto.
> 	(tracepoint.o): Ditto. 
> 	(utils.o): Ditto.
> 	(cli-dump.o): Ditto.
> 	(tui-hooks.o): Ditto. 
> 	(tuiWin.o): Ditto. 

> +readline_h = 	$(READLINE_SRC)/readline.h

Erk, is this necessary?  It comes from the combined source tree, but
it's basically a 'system' header.  I compile using the system readline
instead of the included one; this is just another thing which would get
in the way of doing that.

(The patches to do this are getting smaller; I'll finish and post them,
really I will!)

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


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

* Re: [PATCH] fix -Werrors from new readline
  2002-12-08 18:44   ` Daniel Jacobowitz
@ 2002-12-08 20:42     ` Elena Zannoni
  2002-12-08 22:07       ` Daniel Jacobowitz
  0 siblings, 1 reply; 5+ messages in thread
From: Elena Zannoni @ 2002-12-08 20:42 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: gdb-patches

Daniel Jacobowitz writes:
 > On Sun, Dec 08, 2002 at 08:23:40PM -0500, Elena Zannoni wrote:
 > > 
 > > 
 > > And the makefile.
 > > 
 > > 2002-12-08  Elena Zannoni  <ezannoni@redhat.com>
 > > 
 > > 	* Makefile.in (readline_h): Define.
 > > 	(completer.o): Depend on readline_h.
 > > 	(corelow.o): Ditto.
 > > 	(event-top.o): Ditto.
 > > 	(exec.o): Ditto.
 > > 	(solib.o): Ditto.
 > > 	(source.o): Ditto. 
 > > 	(symfile.o): Ditto. 
 > > 	(symmisc.o): Ditto. 
 > > 	(top.o): Ditto.
 > > 	(tracepoint.o): Ditto. 
 > > 	(utils.o): Ditto.
 > > 	(cli-dump.o): Ditto.
 > > 	(tui-hooks.o): Ditto. 
 > > 	(tuiWin.o): Ditto. 
 > 
 > > +readline_h = 	$(READLINE_SRC)/readline.h
 > 
 > Erk, is this necessary?  It comes from the combined source tree, but
 > it's basically a 'system' header.  I compile using the system readline
 > instead of the included one; this is just another thing which would get
 > in the way of doing that.
 > 

Hmm, but what happens if the system readline and gdb's readline get
out of sync again?  BTW, there was a readline_h already used in some
tui files, but it wasn't defined.

Rereading your sentence... you are trying to get rid of src/readline?

 > (The patches to do this are getting smaller; I'll finish and post them,
 > really I will!)
 > 
 > -- 
 > Daniel Jacobowitz
 > MontaVista Software                         Debian GNU/Linux Developer


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

* Re: [PATCH] fix -Werrors from new readline
  2002-12-08 20:42     ` Elena Zannoni
@ 2002-12-08 22:07       ` Daniel Jacobowitz
  0 siblings, 0 replies; 5+ messages in thread
From: Daniel Jacobowitz @ 2002-12-08 22:07 UTC (permalink / raw)
  To: Elena Zannoni; +Cc: gdb-patches

On Sun, Dec 08, 2002 at 11:34:02PM -0500, Elena Zannoni wrote:
> Daniel Jacobowitz writes:
>  > On Sun, Dec 08, 2002 at 08:23:40PM -0500, Elena Zannoni wrote:
>  > > 
>  > > 
>  > > And the makefile.
>  > > 
>  > > 2002-12-08  Elena Zannoni  <ezannoni@redhat.com>
>  > > 
>  > > 	* Makefile.in (readline_h): Define.
>  > > 	(completer.o): Depend on readline_h.
>  > > 	(corelow.o): Ditto.
>  > > 	(event-top.o): Ditto.
>  > > 	(exec.o): Ditto.
>  > > 	(solib.o): Ditto.
>  > > 	(source.o): Ditto. 
>  > > 	(symfile.o): Ditto. 
>  > > 	(symmisc.o): Ditto. 
>  > > 	(top.o): Ditto.
>  > > 	(tracepoint.o): Ditto. 
>  > > 	(utils.o): Ditto.
>  > > 	(cli-dump.o): Ditto.
>  > > 	(tui-hooks.o): Ditto. 
>  > > 	(tuiWin.o): Ditto. 
>  > 
>  > > +readline_h = 	$(READLINE_SRC)/readline.h
>  > 
>  > Erk, is this necessary?  It comes from the combined source tree, but
>  > it's basically a 'system' header.  I compile using the system readline
>  > instead of the included one; this is just another thing which would get
>  > in the way of doing that.
>  > 
> 
> Hmm, but what happens if the system readline and gdb's readline get
> out of sync again?  BTW, there was a readline_h already used in some
> tui files, but it wasn't defined.

I cry? :)  I've been maintaining patches to use the system readline. 
You've just integrated pretty much all of them.

> Rereading your sentence... you are trying to get rid of src/readline?

Certainly not.  What I want to do is add a --with-system-readline,
analagous to GCC's --with-system-zlib; it's pretty straightforward to
do as long as the interface stays "reasonably" stable.

Upon rethinking it, I doubt the $(readline_h) dependency will be a
problem.  Someday I would like to make GDB use BFD's make dep-am
mechanism...

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


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

end of thread, other threads:[~2002-12-09  4:42 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-08 17:25 [PATCH] fix -Werrors from new readline Elena Zannoni
2002-12-08 17:36 ` Elena Zannoni
2002-12-08 18:44   ` Daniel Jacobowitz
2002-12-08 20:42     ` Elena Zannoni
2002-12-08 22:07       ` Daniel Jacobowitz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox