From: Vladimir Prus <vladimir@codesourcery.com>
To: gdb@sources.redhat.com
Subject: MI failures related to string printing
Date: Fri, 12 Jan 2007 10:52:00 -0000 [thread overview]
Message-ID: <200701121351.29310.vladimir@codesourcery.com> (raw)
As I've reported before, I'm getting this failure:
FAIL: gdb.mi/mi-var-child.exp: update all vars psnp->next->next->long_ptr (and 2.long_ptr) changed
After investigation, it appears related to recent -var-update changes. The failing test
does:
mi_gdb_test "-var-update *" \
"\\^done,changelist=\\\[\{name=\"psnp->ptrs.0.next.next.long_ptr\",in_scope=\"true\",type_changed=\"false\"\}\\\]" \
"update all vars psnp->next->next->long_ptr (and 2.long_ptr) changed"
It's the last check in mi-var-child.exp. The reply from gdb includes also:
{name="psnp->char_ptr.*psnp->char_ptr.**psnp->char_ptr.***psnp->char_ptr",in_scope="true",type_changed="false"}
and another similar thing. The problem is that test is written like this:
char a0, *a1, **a2, ***a3;
a0 = '0';
a1 = &a0;
a2 = &a1;
a3 = &a2;
There's a variable object correspoding to a1. When varobj_update tries to compare old
and new value of that varobj, it computes string value of a1. Unfortunately, a1 points to
a single character. There's no terminating zero character. So, the string value of a1 is
essentially random, and -var-update randomly marks varobj as changed.
What do we do about it? At the very least, the test should be fixed. Is there anything smart
we can do here?
- Volodya
next reply other threads:[~2007-01-12 10:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-12 10:52 Vladimir Prus [this message]
2007-01-12 11:22 ` Mark Kettenis
2007-01-12 12:11 ` Nick Roberts
2007-01-12 12:30 ` Bob Rossi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200701121351.29310.vladimir@codesourcery.com \
--to=vladimir@codesourcery.com \
--cc=gdb@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox