This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] re-read symbols before "start"-ing...
- From: Daniel Jacobowitz <drow at false dot org>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Tue, 8 Mar 2005 08:48:09 -0500
- Subject: Re: [RFA] re-read symbols before "start"-ing...
- References: <20050308064529.GB18053@adacore.com>
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