patch to top.c: DEFAULT_PROMPT

Elena Zannoni ezannoni@cygnus.com
Tue Aug 24 06:48:00 GMT 1999


It's in.
Thanks

Elena


J.T. Conklin writes:
 > While browsing through top.c, I saw that the default prompt was set to
 > "(gdb)" if DEFAULT_PROMPT was not defined, otherwise to DEFAULT_PROMPT.
 > As this is done in different ways depending on async_p, it seems a bit
 > cleaner to me if DEFAULT_PROMPT is set to "(gdb)" if not overriden by
 > target/host config files --- similar to how GDBINIT_FILENAME is done
 > today.
 > 
 >         --jtc
 > 
 > 1999-08-20  J.T. Conklin  <jtc@redback.com>
 > 
 > 	* top.c (DEFAULT_PROMPT): Set to "(gdb)" if not already defined.
 > 	(init_main): Always use DEFAULT_PROMPT.
 > 
 > Index: top.c
 > ===================================================================
 > RCS file: /home/jtc/CVSROOT/gdb/gdb/top.c,v
 > retrieving revision 1.1.1.10
 > diff -c -r1.1.1.10 top.c
 > *** top.c	1999/08/11 04:08:18	1.1.1.10
 > --- top.c	1999/08/20 23:51:11
 > ***************
 > *** 158,163 ****
 > --- 158,169 ----
 >   #define ISATTY(FP)	(isatty (fileno (FP)))
 >   #endif
 >   
 > + /* Default command line prompt.  This is overriden in some configs. */
 > + 
 > + #ifndef DEFAULT_PROMPT
 > + #define DEFAULT_PROMPT	"(gdb)"
 > + #endif
 > + 
 >   /* Initialization file name for gdb.  This is overridden in some configs.  */
 >   
 >   #ifndef	GDBINIT_FILENAME
 > ***************
 > *** 3807,3817 ****
 >        we initialize the prompts differently. */
 >     if (!async_p)
 >       {
 > - #ifdef DEFAULT_PROMPT
 >         gdb_prompt_string = savestring (DEFAULT_PROMPT, strlen (DEFAULT_PROMPT));
 > - #else
 > -       gdb_prompt_string = savestring ("(gdb) ", 6);
 > - #endif
 >       }
 >     else
 >       {
 > --- 3813,3819 ----
 > ***************
 > *** 3819,3829 ****
 >            whatever the DEFAULT_PROMPT is. */
 >         the_prompts.top = 0;
 >         PREFIX (0) = "";
 > - #ifdef DEFAULT_PROMPT
 >         PROMPT (0) = savestring (DEFAULT_PROMPT, strlen (DEFAULT_PROMPT));
 > - #else
 > -       PROMPT (0) = savestring ("(gdb) ", 6);
 > - #endif
 >         SUFFIX (0) = "";
 >         /* Set things up for annotation_level > 1, if the user ever decides
 >            to use it. */
 > --- 3821,3827 ----
 > 
 > 
 > -- 
 > J.T. Conklin
 > RedBack Networks


More information about the Gdb-patches mailing list