This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [mi] Some error path fixes
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: drow at false dot org (Daniel Jacobowitz)
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 9 Mar 2007 01:55:20 +0100 (CET)
- Subject: Re: [mi] Some error path fixes
Daniel Jacobowitz wrote:
> 2006-12-07 Daniel Jacobowitz <dan@codesourcery.com>
>
> * gdb.mi/mi-var-cmd.exp: Add tests for unreadable varobjs.
> +# Test whether bad varobjs crash GDB.
> +
> +# A varobj we fail to read during -var-update should be considered
> +# out of scope.
> +mi_gdb_test "-var-create null_ptr * **0" \
> + {\^done,name="null_ptr",numchild="0",type="int"} \
> + "create null_ptr"
> +
> +# Allow this to succeed, if address zero is readable, although it
> +# will not test what it was meant to. Most important is that GDB
> +# does not crash.
> +mi_gdb_test "-var-update null_ptr" \
> + {\^done,changelist=\[{.*}\]} \
> + "update null_ptr"
This fails on SPU, where address zero is indeed readable. I get:
-var-create null_ptr * **0^M
^done,name="null_ptr",numchild="0",value="",type="int"^M
(gdb) ^M
PASS: gdb.mi/mi-var-cmd.exp: create null_ptr
-var-update null_ptr^M
^done,changelist=[]^M
(gdb) ^M
FAIL: gdb.mi/mi-var-cmd.exp: update null_ptr
Note the completely empty changelist, while the test checks
for at least one element { ... }.
Is this a testcase bug, or should there really be a change?
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com