From: Michael Snyder <msnyder@vmware.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [ob] fix buf size in amd64_epilogue_frame_cache
Date: Thu, 24 Dec 2009 18:51:00 -0000 [thread overview]
Message-ID: <4B33B73D.5090709@vmware.com> (raw)
In-Reply-To: <20091221043809.GM2788@adacore.com>
Joel Brobecker wrote:
>> 2009-12-20 Michael Snyder <msnyder@vmware.com>
>>
>> * amd64-tdep.c (amd64_epilogue_frame_cache): Fix buf size.
>
> I'm going to apply this patch to the gdb-7.0 branch as well.
>
>> - gdb_byte buf[4];
>> + gdb_byte buf[8];
>
> I think we should try to avoid using litteral constants like these,
> especially when we repeat that constant later. For instance, in
> this case, we could have used register_size, or something similar...
I don't think there's a simple "register_size" constant.
There's a register_size function, but that's not a good way
to declare an array size.
There's MAX_REGISTER_SIZE, but that's 16. A possibility.
If you've got a better suggestion...
prev parent reply other threads:[~2009-12-24 18:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-20 19:11 Michael Snyder
2009-12-21 4:38 ` Joel Brobecker
2009-12-24 18:51 ` Michael Snyder [this message]
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=4B33B73D.5090709@vmware.com \
--to=msnyder@vmware.com \
--cc=brobecker@adacore.com \
--cc=gdb-patches@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