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] re-read symbols before "start"-ing...


On Mon, Mar 07, 2005 at 10:45:29PM -0800, Joel Brobecker wrote:
> What happens here is that we insert the breakpoint *before* the
> notification is received. So we end up using the cached value
> for the main procedure name, which is out of date. The answer
> is to make sure the symbols are re-read if the executable has
> changed.
> 
> Bad point for me, sorry... Fortunatly, only Ada is affected for now.
> Attached is a patch.
> 
> 2005-03-07  Joel Brobecker  <brobecker@adacore.com>
> 
>         * infcmd.c (start_command): Make sure the symbols are up to date
>         before setting the temporary breakpoint.
> 
> Tested on x86-linux.  This fixes the FAIL above. Otherwise, the results
> are identical.
> 
> OK to commit?

Just my two cents, but I think you may want to add an argument to
run_command, instead, and create the breakpoint there.  For instance
there's probably a case where you'll need reopen_exec_file ().  And
reread_symbols is passably expensive - lots of stat().

-- 
Daniel Jacobowitz
CodeSourcery, LLC


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