* [RFA] Move some funcs from top.c to completer.c
@ 2001-05-09 21:06 Elena Zannoni
2001-05-10 0:26 ` Eli Zaretskii
2001-06-12 1:40 ` Eli Zaretskii
0 siblings, 2 replies; 4+ messages in thread
From: Elena Zannoni @ 2001-05-09 21:06 UTC (permalink / raw)
To: gdb-patches
After staring at completion stuff for a while, I realized that I could
clean this up. [You'll notice that the changes to Makefile.in don't
correspond 100% to the new include's. This is because the dependencies
were already in the Makefile.in, for some files. I think this was left
over from JT include's clean up.]
Ok to apply? [Eli: actually this can go in after your patch is
committed, if this makes your life easier.]
Elena
2001-05-09 Elena Zannoni <ezannoni@redhat.com>
* top.c (readline_line_completion_function, noop_completer): Move
from here...
* completer.c (readline_line_completion_function, noop_completer):
...to here.
* gdbcmd.h (readline_line_completion_function, noop_completer):
Move declarations from here...
* completer.h (readline_line_completion_function, noop_completer):
...to here.
* corefile.c: Include completer.h.
* infcmd.c: Ditto.
* proc-api.c: Ditto.
* source.c: Ditto.
* symfile.c: Ditto.
* tracepoint.c: Ditto.
* Makefile.in: Update dependencies.
Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/gdb/Makefile.in,v
retrieving revision 1.83
diff -u -p -r1.83 Makefile.in
--- Makefile.in 2001/05/09 05:45:30 1.83
+++ Makefile.in 2001/05/10 03:58:08
@@ -1539,7 +1539,7 @@ ia64-tdep.o: ia64-tdep.c $(defs_h) $(inf
$(INCLUDE_DIR)/elf/common.h $(regcache_h)
infcmd.o: infcmd.c $(defs_h) environ.h $(gdbcmd_h) $(gdbcore_h) \
- $(inferior_h) target.h language.h symfile.h $(gdb_string_h)
+ $(inferior_h) target.h language.h symfile.h $(gdb_string_h) completer.h
inflow.o: inflow.c $(bfd_h) $(command_h) $(defs_h) $(inferior_h) \
target.h terminal.h gdbthread.h $(gdb_string_h)
@@ -1753,7 +1753,7 @@ procfs.o: procfs.c $(command_h) $(defs_h
target.h $(gdb_string_h) gdbthread.h proc-utils.h
$(CC) -c $(INTERNAL_WARN_CFLAGS) $(NO_WERROR_CFLAGS) $<
-proc-api.o: proc-api.c $(defs_h) $(gdbcmd_h) proc-utils.h
+proc-api.o: proc-api.c $(defs_h) $(gdbcmd_h) proc-utils.h completer.h
proc-events.o: proc-events.c $(defs_h)
@@ -1787,7 +1787,7 @@ remote-array.o: remote-array.c $(defs_h)
$(version_h) $(regcache_h)
remote-rdi.o: remote-rdi.c $(defs_h) $(gdbcore_h) \
- $(inferior_h) $(gdb_string_h)
+ $(inferior_h) $(gdb_string_h) completer.h
rdi-share/libangsd.a: force
@dir=rdi-share; \
@@ -1929,7 +1929,8 @@ 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
+ objfiles.h gnu-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 \
@@ -2043,7 +2044,7 @@ vax-tdep.o: vax-tdep.c $(OP_INCLUDE)/vax
w65-tdep.o : w65-tdep.c $(gdbcore_h) $(regcache_h)
win32-nat.o: win32-nat.c $(gdbcmd_h) $(gdbcore_h) $(inferior_h) $(defs_h) \
- $(gdb_string_h) $(regcache_h)
+ $(gdb_string_h) $(regcache_h) completer.h
xdr_ld.o: vx-share/xdr_ld.c $(defs_h) vx-share/vxTypes.h \
vx-share/vxWorks.h vx-share/xdr_ld.h
Index: completer.c
===================================================================
RCS file: /cvs/src/src/gdb/completer.c,v
retrieving revision 1.4
diff -u -p -r1.4 completer.c
--- completer.c 2001/03/06 08:21:06 1.4
+++ completer.c 2001/05/10 03:58:08
@@ -36,6 +36,8 @@
#include "completer.h"
/* Prototypes for local functions */
+char *line_completion_function (char *text, int matches, char *line_buffer,
+ int point);
/* readline uses the word breaks for two things:
(1) In figuring out where to point the TEXT parameter to the
@@ -89,6 +91,22 @@ char *
get_gdb_completer_quote_characters (void)
{
return gdb_completer_quote_characters;
+}
+
+/* Line completion interface function for readline. */
+
+char *
+readline_line_completion_function (char *text, int matches)
+{
+ return line_completion_function (text, matches, rl_line_buffer, rl_point);
+}
+
+/* This can be used for functions which don't want to complete on symbols
+ but don't want to complete on anything else either. */
+char **
+noop_completer (char *text, char *prefix)
+{
+ return NULL;
}
/* Complete on filenames. */
Index: completer.h
===================================================================
RCS file: /cvs/src/src/gdb/completer.h,v
retrieving revision 1.2
diff -u -p -r1.2 completer.h
--- completer.h 2001/03/06 08:21:06 1.2
+++ completer.h 2001/05/10 03:58:08
@@ -21,6 +21,10 @@
extern char *line_completion_function (char *, int, char *, int);
+extern char *readline_line_completion_function (char *text, int matches);
+
+extern char **noop_completer (char *, char *);
+
extern char **filename_completer (char *, char *);
extern char *get_gdb_completer_word_break_characters (void);
Index: corefile.c
===================================================================
RCS file: /cvs/src/src/gdb/corefile.c,v
retrieving revision 1.13
diff -u -p -r1.13 corefile.c
--- corefile.c 2001/04/14 19:23:02 1.13
+++ corefile.c 2001/05/10 03:58:08
@@ -34,6 +34,7 @@
#include "gdbcore.h"
#include "dis-asm.h"
#include "gdb_stat.h"
+#include "completer.h"
/* Local function declarations. */
Index: gdbcmd.h
===================================================================
RCS file: /cvs/src/src/gdb/gdbcmd.h,v
retrieving revision 1.5
diff -u -p -r1.5 gdbcmd.h
--- gdbcmd.h 2001/03/06 08:21:07 1.5
+++ gdbcmd.h 2001/05/10 03:58:08
@@ -125,8 +125,4 @@ extern void print_command_lines (struct
struct command_line *, unsigned int);
#endif
-extern char **noop_completer (char *, char *);
-
-extern char **filename_completer (char *, char *);
-
#endif /* !defined (GDBCMD_H) */
Index: infcmd.c
===================================================================
RCS file: /cvs/src/src/gdb/infcmd.c,v
retrieving revision 1.27
diff -u -p -r1.27 infcmd.c
--- infcmd.c 2001/05/04 04:15:25 1.27
+++ infcmd.c 2001/05/10 03:58:08
@@ -41,6 +41,7 @@
#endif
#include "event-top.h"
#include "parser-defs.h"
+#include "completer.h"
/* Functions exported for general use: */
Index: proc-api.c
===================================================================
RCS file: /cvs/src/src/gdb/proc-api.c,v
retrieving revision 1.9
diff -u -p -r1.9 proc-api.c
--- proc-api.c 2001/03/27 02:01:11 1.9
+++ proc-api.c 2001/05/10 03:58:09
@@ -27,6 +27,7 @@ Inc., 59 Temple Place - Suite 330, Bosto
#include "defs.h"
#include "gdbcmd.h"
+#include "completer.h"
#if defined (NEW_PROC_API)
#define _STRUCTURED_PROC 1
Index: source.c
===================================================================
RCS file: /cvs/src/src/gdb/source.c,v
retrieving revision 1.13
diff -u -p -r1.13 source.c
--- source.c 2001/04/19 23:56:13 1.13
+++ source.c 2001/05/10 03:58:09
@@ -40,6 +40,7 @@
#include "annotate.h"
#include "gdbtypes.h"
#include "linespec.h"
+#include "completer.h"
#ifdef UI_OUT
#include "ui-out.h"
#endif
Index: symfile.c
===================================================================
RCS file: /cvs/src/src/gdb/symfile.c,v
retrieving revision 1.31
diff -u -p -r1.31 symfile.c
--- symfile.c 2001/04/05 02:02:13 1.31
+++ symfile.c 2001/05/10 03:58:10
@@ -37,6 +37,7 @@
#include "inferior.h" /* for write_pc */
#include "gdb-stabs.h"
#include "obstack.h"
+#include "completer.h"
#include <sys/types.h>
#include <fcntl.h>
Index: top.c
===================================================================
RCS file: /cvs/src/src/gdb/top.c,v
retrieving revision 1.34
diff -u -p -r1.34 top.c
--- top.c 2001/05/04 04:15:28 1.34
+++ top.c 2001/05/10 03:58:11
@@ -95,8 +95,6 @@ static void init_signals (void);
static void stop_sig (int);
#endif
-static char *readline_line_completion_function (char *, int);
-
static void init_main (void);
static void float_handler (int);
@@ -1065,24 +1063,6 @@ static int write_history_p;
static int history_size;
static char *history_filename;
-/* Functions that are used as part of the fancy command line editing. */
-
-/* This can be used for functions which don't want to complete on symbols
- but don't want to complete on anything else either. */
-/* ARGSUSED */
-char **
-noop_completer (char *text, char *prefix)
-{
- return NULL;
-}
-
-/* Line completion interface function for readline. */
-
-static char *
-readline_line_completion_function (char *text, int matches)
-{
- return line_completion_function (text, matches, rl_line_buffer, rl_point);
-}
\f
#ifdef STOP_SIGNAL
static void
Index: tracepoint.c
===================================================================
RCS file: /cvs/src/src/gdb/tracepoint.c,v
retrieving revision 1.20
diff -u -p -r1.20 tracepoint.c
--- tracepoint.c 2001/04/17 20:16:30 1.20
+++ tracepoint.c 2001/05/10 03:58:11
@@ -33,6 +33,7 @@
#include "remote.h"
#include "linespec.h"
#include "regcache.h"
+#include "completer.h"
#include "ax.h"
#include "ax-gdb.h"
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFA] Move some funcs from top.c to completer.c
2001-05-09 21:06 [RFA] Move some funcs from top.c to completer.c Elena Zannoni
@ 2001-05-10 0:26 ` Eli Zaretskii
2001-06-12 1:40 ` Eli Zaretskii
1 sibling, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2001-05-10 0:26 UTC (permalink / raw)
To: Elena Zannoni; +Cc: gdb-patches
On Thu, 10 May 2001, Elena Zannoni wrote:
> After staring at completion stuff for a while, I realized that I could
> clean this up. [You'll notice that the changes to Makefile.in don't
> correspond 100% to the new include's. This is because the dependencies
> were already in the Makefile.in, for some files. I think this was left
> over from JT include's clean up.]
>
> Ok to apply? [Eli: actually this can go in after your patch is
> committed, if this makes your life easier.]
It _would_ make my life easier.
Btw, I'm still waiting for approval for some of the files involved in
my patch, I think I didn't yet hear all the thumb-ups I need. In
fact, even symtab.c patch was not yet approved by you, Elena. Or did
I miss something?
(I don't care to wait a bit longer, I just don't want to be a
roadblock for other changes.)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFA] Move some funcs from top.c to completer.c
2001-05-09 21:06 [RFA] Move some funcs from top.c to completer.c Elena Zannoni
2001-05-10 0:26 ` Eli Zaretskii
@ 2001-06-12 1:40 ` Eli Zaretskii
2001-06-12 12:20 ` Elena Zannoni
1 sibling, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2001-06-12 1:40 UTC (permalink / raw)
To: ezannoni; +Cc: gdb-patches
> From: Elena Zannoni <ezannoni@cygnus.com>
> Date: Thu, 10 May 2001 00:06:17 -0400
>
> After staring at completion stuff for a while, I realized that I could
> clean this up. [You'll notice that the changes to Makefile.in don't
> correspond 100% to the new include's. This is because the dependencies
> were already in the Makefile.in, for some files. I think this was left
> over from JT include's clean up.]
>
> Ok to apply? [Eli: actually this can go in after your patch is
> committed, if this makes your life easier.]
Elena, you can now commit this, since my completion patches are in.
Thanks for waiting.
>
> Elena
>
> 2001-05-09 Elena Zannoni <ezannoni@redhat.com>
>
> * top.c (readline_line_completion_function, noop_completer): Move
> from here...
> * completer.c (readline_line_completion_function, noop_completer):
> ...to here.
> * gdbcmd.h (readline_line_completion_function, noop_completer):
> Move declarations from here...
> * completer.h (readline_line_completion_function, noop_completer):
> ...to here.
> * corefile.c: Include completer.h.
> * infcmd.c: Ditto.
> * proc-api.c: Ditto.
> * source.c: Ditto.
> * symfile.c: Ditto.
> * tracepoint.c: Ditto.
> * Makefile.in: Update dependencies.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RFA] Move some funcs from top.c to completer.c
2001-06-12 1:40 ` Eli Zaretskii
@ 2001-06-12 12:20 ` Elena Zannoni
0 siblings, 0 replies; 4+ messages in thread
From: Elena Zannoni @ 2001-06-12 12:20 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: ezannoni, gdb-patches
Yes, but I am also waiting for approval from the relevant maintainers.
Even though, I would consider these obvious fixes.
Elena
Eli Zaretskii writes:
> > From: Elena Zannoni <ezannoni@cygnus.com>
> > Date: Thu, 10 May 2001 00:06:17 -0400
> >
> > After staring at completion stuff for a while, I realized that I could
> > clean this up. [You'll notice that the changes to Makefile.in don't
> > correspond 100% to the new include's. This is because the dependencies
> > were already in the Makefile.in, for some files. I think this was left
> > over from JT include's clean up.]
> >
> > Ok to apply? [Eli: actually this can go in after your patch is
> > committed, if this makes your life easier.]
>
> Elena, you can now commit this, since my completion patches are in.
>
> Thanks for waiting.
>
> >
> > Elena
> >
> > 2001-05-09 Elena Zannoni <ezannoni@redhat.com>
> >
> > * top.c (readline_line_completion_function, noop_completer): Move
> > from here...
> > * completer.c (readline_line_completion_function, noop_completer):
> > ...to here.
> > * gdbcmd.h (readline_line_completion_function, noop_completer):
> > Move declarations from here...
> > * completer.h (readline_line_completion_function, noop_completer):
> > ...to here.
> > * corefile.c: Include completer.h.
> > * infcmd.c: Ditto.
> > * proc-api.c: Ditto.
> > * source.c: Ditto.
> > * symfile.c: Ditto.
> > * tracepoint.c: Ditto.
> > * Makefile.in: Update dependencies.
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2001-06-12 12:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-09 21:06 [RFA] Move some funcs from top.c to completer.c Elena Zannoni
2001-05-10 0:26 ` Eli Zaretskii
2001-06-12 1:40 ` Eli Zaretskii
2001-06-12 12:20 ` Elena Zannoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox