From: Elena Zannoni Date: Mon, 4 Nov 2002 21:50:39 +0000 (+0000) Subject: 2002-11-04 Elena Zannoni X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=78e2079a5891c2d4a44669eece1cde1bae51e82c;p=thirdparty%2Fbinutils-gdb.git 2002-11-04 Elena Zannoni * interps.c (interpreter_completer): Initialize alloced. (struct gdb_interpreter): Reformat. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 443b3f43f77..75f5ec3ae90 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2002-11-04 Elena Zannoni + + * interps.c (interpreter_completer): Initialize alloced. + (struct gdb_interpreter): Reformat. + 2002-11-04 Elena Zannoni * interps.h (struct gdb_interpreter_procs): Remove do_one_event_proc. diff --git a/gdb/interps.c b/gdb/interps.c index bf60bbbe33b..68305bea3e1 100644 --- a/gdb/interps.c +++ b/gdb/interps.c @@ -42,18 +42,24 @@ struct gdb_interpreter { - char *name; /* This is the name in "-i=" and set interpreter. */ - struct gdb_interpreter *next; /* Interpreters are stored in a linked list, - this is the next one... */ - void *data; /* This is a cookie that the instance of the - interpreter can use, for instance to call - itself in hook functions */ - int inited; /* Has the init_proc been run? */ - struct ui_out *interpreter_out; /* This is the ui_out used to collect - results for this interpreter. It can - be a formatter for stdout, as is the - case for the console & mi outputs, or it - might be a result formatter. */ + /* This is the name in "-i=" and set interpreter. */ + char *name; + + /* Interpreters are stored in a linked list, this is the next one... */ + struct gdb_interpreter *next; + + /* This is a cookie that the instance of the interpreter can use, for + instance to call itself in hook functions */ + void *data; + + /* Has the init_proc been run? */ + int inited; + + /* This is the ui_out used to collect results for this interpreter. + It can be a formatter for stdout, as is the case for the console + & mi outputs, or it might be a result formatter. */ + struct ui_out *interpreter_out; + struct gdb_interpreter_procs procs; int quiet_p; }; @@ -556,7 +562,8 @@ interpreter_exec_cmd (char *args, int from_tty) static char ** interpreter_completer (char *text, char *word) { - int alloced, textlen; + int alloced = 0; + int textlen; int num_matches; char **matches; struct gdb_interpreter *interp;