From: Yao Qi <qiyaoltc@gmail.com>
To: Alan Hayward <Alan.Hayward@arm.com>
Cc: "gdb-patches\@sourceware.org" <gdb-patches@sourceware.org>,
nd <nd@arm.com>
Subject: Re: [PATCH 6/11] Add ALPHA_MAX_REGISTER_SIZE
Date: Tue, 11 Apr 2017 09:16:00 -0000 [thread overview]
Message-ID: <86bms3wbh5.fsf@gmail.com> (raw)
In-Reply-To: <772F5764-0F2A-4F53-BC41-C36AF15BED21@arm.com> (Alan Hayward's message of "Tue, 4 Apr 2017 10:14:08 +0000")
Alan Hayward <Alan.Hayward@arm.com> writes:
> diff --git a/gdb/alpha-tdep.h b/gdb/alpha-tdep.h
> index ab46ba56bef1ffb1cea541c506ffed6a5ae9b556..316d94d0bb53e9bc7943d406bf81f7d597437ff3 100644
> --- a/gdb/alpha-tdep.h
> +++ b/gdb/alpha-tdep.h
> @@ -26,6 +26,9 @@ struct regcache;
> real way to know how big a register is. */
> #define ALPHA_REGISTER_SIZE 8
>
> +/* Big enough to hold the size of the largest register in bytes. */
> +#define ALPHA_MAX_REGISTER_SIZE 8
> +
> --- a/gdb/alpha-tdep.c
> +++ b/gdb/alpha-tdep.c
> @@ -244,7 +244,7 @@ alpha_register_to_value (struct frame_info *frame, int regnum,
> int *optimizedp, int *unavailablep)
> {
> struct gdbarch *gdbarch = get_frame_arch (frame);
> - gdb_byte in[MAX_REGISTER_SIZE];
> + gdb_byte in[ALPHA_MAX_REGISTER_SIZE];
>
> /* Convert to TYPE. */
> if (!get_frame_register_bytes (frame, regnum, 0,
We can use get_frame_register_value, so "in" can be removed.
> @@ -266,7 +266,7 @@ static void
> alpha_value_to_register (struct frame_info *frame, int regnum,
> struct type *valtype, const gdb_byte *in)
> {
> - gdb_byte out[MAX_REGISTER_SIZE];
> + gdb_byte out[ALPHA_MAX_REGISTER_SIZE];
Why don't you use ALPHA_REGISTER_SIZE?
--
Yao (齐尧)
next prev parent reply other threads:[~2017-04-11 9:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-04 10:14 Alan Hayward
2017-04-11 9:16 ` Yao Qi [this message]
[not found] ` <EED29198-B67C-4BD6-B4A8-12D75CD7A11B@arm.com>
2017-06-05 16:25 ` Alan Hayward
2017-06-06 14:02 ` Yao Qi
2017-06-06 14:47 ` Alan Hayward
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=86bms3wbh5.fsf@gmail.com \
--to=qiyaoltc@gmail.com \
--cc=Alan.Hayward@arm.com \
--cc=gdb-patches@sourceware.org \
--cc=nd@arm.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