[RFA/RFC] New command: ``start''
Joel Brobecker
brobecker@gnat.com
Fri May 21 01:31:00 GMT 2004
> 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.
--
Joel
Attachment:
infcmd.c.diff
Description: Text document
More information about the Gdb-patches
mailing list