This is the mail archive of the gdb-patches@sourceware.org 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: [RFC] varobj deletion after the binary has changed


On Thu, Jan 25, 2007 at 10:49:01AM +1300, Nick Roberts wrote:
> The crash occurs because computing TYPE_CODE (type) involves a memory
> violation.  This comes from "type = SYMBOL_TYPE (var)" in read_var_value, in
> turn from var = exp->elts[pc + 2].symbol which is from exp = var->root->exp of
> the variable object in question (if that makes sense!).

Right, that's about what I expected.  A parsed exp has pointers into
the symbol table, which at this point has been flushed and reloaded.

For expressions not associated with a particular block, we ought to
reparse them from the original string if the symbol file changes. I'm
not sure what to do for things involving local variables; we need to
discard valid_block too, for the same reason.  Breakpoints have similar
issues, which are handled in breakpoint.c, but they don't usually carry
block pointers around.

The other things which could be invalidated when we reload the file
are the type pointers in values.  So, we probably need to discard all
values when reloading the file.

-- 
Daniel Jacobowitz
CodeSourcery


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