From: Daniel Jacobowitz <drow@false.org>
To: Antony KING <antony.king@st.com>
Cc: gdb@sourceware.org
Subject: Re: [GDB 6.8] Problem using watchpoints with compound objects
Date: Tue, 03 Mar 2009 21:46:00 -0000 [thread overview]
Message-ID: <20090303214606.GA9404@caradoc.them.org> (raw)
In-Reply-To: <49AD9E8A.3020608@st.com>
On Tue, Mar 03, 2009 at 09:18:02PM +0000, Antony KING wrote:
> struct {int m1, m2, m3, m4;} a;
> int main (void)
> {
> a.m1 = 1;
> return 0;
> }
>
> In both cases value_equal is comparing the address of the object and not
> the contents. This is caused, I believe, by the following code at the
> start of value_equal:
>
> arg1 = coerce_array (arg1);
> arg2 = coerce_array (arg2);
>
> which is converting the compound objects into pointers. These are then
> used in the latter tests of value_equal.
Arrays are supposed to be handled specially, but I was talking about
structs since that was in your original example. coerce_array has no
effect on structs.
--
Daniel Jacobowitz
CodeSourcery
next prev parent reply other threads:[~2009-03-03 21:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-03 17:39 Antony KING
2009-03-03 20:33 ` Daniel Jacobowitz
2009-03-03 21:18 ` Antony KING
2009-03-03 21:46 ` Daniel Jacobowitz [this message]
2009-03-04 19:20 ` Antony KING
2009-03-04 19:28 ` Daniel Jacobowitz
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=20090303214606.GA9404@caradoc.them.org \
--to=drow@false.org \
--cc=antony.king@st.com \
--cc=gdb@sourceware.org \
/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