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: [PATCH] MI: lvalues and variable_editable


 > On Wed, Oct 31, 2007 at 10:47:40PM +0300, Vladimir Prus wrote:
 > > I'm not sure that's possible. If you create varobj for *foo, and foo changes
 > > to point to inaccessible memory, then assignment to *foo will fail, but I
 > > don't know any mechanism in gdb that will tell you that without actually
 > > trying assignment.
 > 
 > Yes, there is no way to be sure without trying to write.  Which we
 > shouldn't unless the user asked us to, of course.

In that case for such a varobj, var->value == NULL must indicate that the
memory was inaccessible at the _last_ update, or creation, and it may no longer
be inaccessible.  Describing it as "noneditable" may then be a bit misleading.

I'm surprised that there is "no way to be sure without trying to write".  I
know that 0x0 is inaccessible memory, and presumably the OS has a better idea
about what is and isn't accessible.  Are you saying that in some systems, for
example, you could replace a RAM chip with a ROM one, and only way to know
about it is by trying to write to it?

-- 
Nick                                           http://www.inet.net.nz/~nickrob


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