From: Yao Qi <yao@codesourcery.com>
To: Hui Zhu <teawater@gmail.com>
Cc: gdb-patches ml <gdb-patches@sourceware.org>,
Joel Brobecker <brobecker@adacore.com>
Subject: Re: [PATCH] Fix agent code generate bug of ref
Date: Mon, 11 Mar 2013 13:39:00 -0000 [thread overview]
Message-ID: <513DDE2C.9080109@codesourcery.com> (raw)
In-Reply-To: <CANFwon0GXGwSqOyev+te3f0DBCqG3y0ovJ+yJ-kcaWkMAJOwXw@mail.gmail.com>
On 03/10/2013 01:00 PM, Hui Zhu wrote:
> @@ -2929,7 +2929,7 @@ dwarf2_compile_expr_to_ax (struct agent_
> if (op == DW_OP_deref_size)
> size = *op_ptr++;
> else
> - size = addr_size;
> + size = addr_size_bits;
The problem here is SIZE is "size in bytes", but
>
> switch (size)
> {
SIZE is checked as "size in bits". Your fix is right, but not complete.
We also have to fix it when op is DW_OP_deref_size, something like the
patch below.
I am not familiar with this area, so I might be wrong.
--
Yao (é½å°§)
@@ -2931,7 +2931,7 @@ dwarf2_compile_expr_to_ax (struct agent_expr
*expr, struct axs_value *loc,
else
size = addr_size;
- switch (size)
+ switch (size * TARGET_CHAR_BIT)
{
case 8:
ax_simple (expr, aop_ref8);
next prev parent reply other threads:[~2013-03-11 13:39 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-10 5:01 Hui Zhu
2013-03-11 13:39 ` Yao Qi [this message]
2013-03-11 14:38 ` Tom Tromey
2013-03-11 14:56 ` Tom Tromey
2013-03-12 2:53 ` Hui Zhu
2013-03-12 14:17 ` Tom Tromey
2013-03-12 14:48 ` Hui Zhu
2013-03-12 15:16 ` Tom Tromey
2013-03-12 15:25 ` Hui Zhu
2013-03-12 15:27 ` Tom Tromey
2013-03-12 15:47 ` Hui Zhu
2013-03-12 16:18 ` Tom Tromey
2013-03-12 2:22 ` Hui Zhu
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=513DDE2C.9080109@codesourcery.com \
--to=yao@codesourcery.com \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=teawater@gmail.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