mi-var-child failures

Vladimir Prus vladimir@codesourcery.com
Tue Jan 15 16:50:00 GMT 2008


Nick,
it seems like your recent patch for 'noneditable' attribute
makes some tests to be non-deterministic. Specifically, we
get those failures on embedded targets:

	-PASS: gdb.mi/mi2-var-child.exp: is weird.int_ptr_ptr.*int_ptr_ptr editable
	-PASS: gdb.mi/mi2-var-child.exp: is weird.int_ptr_ptr.*int_ptr_ptr.**int_ptr_ptr editable
	+FAIL: gdb.mi/mi2-var-child.exp: is weird.int_ptr_ptr.*int_ptr_ptr editable
	+FAIL: gdb.mi/mi2-var-child.exp: is weird.int_ptr_ptr.*int_ptr_ptr.**int_ptr_ptr editable

What's happening here is that we have pointer initialized to NULL, and
create a varobj for the dereferenced pointer, and get its attributes.
Now, on Linux we can't dereference NULL pointer, so that value stored in
varobj ends up being NULL, and we return the value is not editable.
On embedded system, you might be allowed to access NULL pointer, and in
that case varobj is editable.

This is not a problem with GDB -- it's acting right, so FAIL on embedded target
is not indicative of a problem. I think we get to fix the testcase itself.

Mind if I make the pointer point to valid memory on all systems?

- Volodya



More information about the Gdb mailing list