This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA/RFC] New command: ``start''


On Thu, May 20, 2004 at 06:31:33PM -0700, Joel Brobecker wrote:
> > This looks pretty good.  I have one question:
> > 
> > > +  /* Check that there is a program to debug.  Some languages such as Ada
> > > +     need to search inside the program symbols for the location where to
> > > +     put the temporary breakpoint before starting.  */
> > > +  if (!have_full_symbols () && !have_partial_symbols ())
> > > +    error ("No symbol table loaded.  Use the \"file\" command.");
> > 
> > Shouldn't you accept have_minimal_symbols here?
> 
> Hmmmm, that's a very sharp remark. 
> 
> Looking at our current implementation in begin_command, we indeed only
> rely on minimal symbols, which makes sense (we only need the address,
> we know how to read it afterwards). So a check against
> have_minimal_symbols is indeed more appropriate.
> 
> Thanks for catching this.
> Here is an updated version.
> 
> 2004-05-20  Joel Brobecker  <brobecker@gnat.com>
> 
>         * infcmd.c (kill_if_already_running): New function, extracted
>         from run_command().
>         (run_command): Replace extracted code by call to
>         kill_if_already_running().
>         (start_command): New function.
>         (_initialize_infcmd): Add "start" command.

I believe everyone's comments have been satisfied now, so this is OK. 
Please make some minor typographical fixes and check it in:
> +static void
> +run_command (char *args, int from_tty)
> +{
> +  char *exec_file;
> +
> +  dont_repeat ();
> +
> +

Extra blank line.

> +  /* Insert the temporary breakpoint, and run...  */
> +  tbreak_command (main_name(), 0);

Missing space.

> +Run the debugged program until the beginning of the main procedure.\n\
> +This command is a combination of a tbreak command followed by run.\n\
> +You may specify arguments to give to your program, they will be given\n\
> +to the underlying run command.");

How would you feel about this instead?

+Run the debugged program until the beginning of the main procedure.\n\
+You may specify arguments to give to your program, just as with the\n\
+\"run\" command.");


-- 
Daniel Jacobowitz


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]