From: Chen Gang <gang.chen.5i5j@gmail.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: Andreas Schwab <schwab@suse.de>, gdb-patches@sourceware.org
Subject: Re: [PATCH v4] gdb/hppa-tdep.c: Fix logical working flow issues and check additional store instructions
Date: Mon, 15 Dec 2014 04:31:00 -0000 [thread overview]
Message-ID: <548E65B5.7040606@gmail.com> (raw)
In-Reply-To: <20141214193513.GT5457@adacore.com>
On 12/15/14 03:35, Joel Brobecker wrote:
>> 2014-12-14 Chen Gang <gang.chen.5i5j@gmail.com>
>>
>> * hppa-tdep.c (inst_saves_gr): Fix logical working flow issues
>> and check additional store instructions.
>
> Review full disclosure: This is only a spot-check review, since
> I no longer have much clue nor interest in hppa. I normally find
> that it's fine to just trust the submitter, but then usually
> the submitter has a way to actually test the patch, which is not
> your case IIUC. Regardless, I will trust you that your patch does
> the right thing (tm)...
>
Excuse me, I have no related test environments for parisc either. Maybe
I can try to construct the related virtual environments for it, but I am
still not quite sure whether it is enough.
Can we change to another way for it:
- try to keep the original code no touch.
- only fix the related typo issues according to the related documents,
do not add new features (e.g. do not check stby, stbdy, stwa, stda,
only give the related comments for them).
- let it pass compiling.
Or, can we find related members in our gdb mailing list which has parisc
environments?
>> ---
>> gdb/hppa-tdep.c | 111 +++++++++++++++++++++++++++++++++++++++++++-------------
>> 1 file changed, 85 insertions(+), 26 deletions(-)
>>
>> diff --git a/gdb/hppa-tdep.c b/gdb/hppa-tdep.c
>> index 627f31a..4f52e43 100644
>> --- a/gdb/hppa-tdep.c
>> +++ b/gdb/hppa-tdep.c
>> @@ -1376,37 +1376,96 @@ is_branch (unsigned long inst)
>> }
>>
>> /* Return the register number for a GR which is saved by INST or
>> - zero it INST does not save a GR. */
>> + zero it INST does not save a GR.
>
> While changing this, can you change "zero it" -> "zero if".
>
OK, thanks.
>> + Store a word or doubleword using an absolute memory address formed
>> + using short or long displace- ment or indexed
> ^^^^^^^^^^^^^^
>
> "displace- ment" -> "displacement".
>
OK, thanks.
>> +static int
>> +inst_saves_gr (unsigned long inst)
>> +{
>> + switch ((inst >> 26) & 0x0f)
>> + {
>> + case 0x03:
>> + switch ((inst >> 6) & 0x0f)
>> + {
>> + case 0x08:
>> + case 0x09:
>> + case 0x0a:
>> + case 0x0b:
>> + case 0x0c:
>> + case 0x0d:
>> + case 0x0e:
>> + case 0x0f:
>> + break;
>> + default:
>> + return 0;
>> + }
>> + /* Fall through */
>> + case 0x18:
>> + case 0x19:
>> + case 0x1a:
>> + case 0x1b:
>> + case 0x1c:
>> + /* no 0x1d or 0x1e -- according to parisc 2.0 document */
>> + case 0x1f:
>> + return hppa_extract_5R_store (inst);
>> + default:
>> + return 0;
>
> Quite honestly, I find your code quite confusing because of
> the fall-through. It's up to you, but wouldn't it be clearer
> if you had "hppa_extract_5R_store (inst)" instead of "break" +
> the "/* Fall through */" ?
>
OK, thanks, if still use the switch statement for path v2, I will remove
the /* Fall through */.
Thanks.
--
Chen Gang
Open, share, and attitude like air, water, and life which God blessed
next prev parent reply other threads:[~2014-12-15 4:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-14 13:36 Chen Gang
2014-12-14 19:35 ` Joel Brobecker
2014-12-15 4:31 ` Chen Gang [this message]
2014-12-15 12:49 ` Joel Brobecker
2014-12-15 14:24 ` Chen Gang
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=548E65B5.7040606@gmail.com \
--to=gang.chen.5i5j@gmail.com \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=schwab@suse.de \
/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