This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: fix for gdb/635
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Thu, 15 Aug 2002 23:31:24 -0400
- Subject: Re: fix for gdb/635
- References: <ro1znvn7psy.fsf@jackfruit.Stanford.EDU>
On Thu, Aug 15, 2002 at 02:52:29PM -0700, David Carlton wrote:
> Here's a patch that fixes values.c(value_static_field) to get rid of
> some situations where it was doing bad memory accesses, as mentioned
> in PR gdb/635.
>
> I also checked to see whether or not value_static_field's callers
> correctly handled a return value of NULL as meaning that the field in
> question had been optimized out. Some of them handled it correctly,
> but a few didn't; in those cases, I fixed the error messages that they
> printed to make them a bit more appropriate.
>
> No new regressions.
>
> David Carlton
> carlton@math.stanford.edu
Only C++ uses this code path, and your patch looks correct to me, so
I'll approve it. As with the other, please commit it when you're
approved for write access.
> 2002-08-15 David Carlton <carlton@math.stanford.edu>
>
> * valops.c (search_struct_field): Change error message to treat
> return value of 0 from value_static_field as meaning that field is
> optimized out.
> (value_struct_elt_for_reference): Ditto.
>
> * values.c (value_static_field): Treat an unresolved location the
> same as a nonexistent symbol.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer