This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] gdb/hppa-tdep.c: Fix a logical typo bug found by compiler warning
- From: Chen Gang <gang dot chen dot 5i5j at gmail dot com>
- To: Andreas Schwab <schwab at linux-m68k dot org>
- Cc: Joel Brobecker <brobecker at adacore dot com>, gdb-patches at sourceware dot org
- Date: Thu, 16 Oct 2014 15:44:05 +0800
- Subject: Re: [PATCH] gdb/hppa-tdep.c: Fix a logical typo bug found by compiler warning
- Authentication-results: sourceware.org; auth=none
- References: <d6q0acpdxmm7g52oqylkjjb2 dot 1413419448973 at email dot android dot com> <mvmh9z45w8s dot fsf at hawking dot suse dot de>
On 10/16/14 15:06, Andreas Schwab wrote:
> There's another bug in this function:
>
> /* Does it look like a stw? */
> if ((inst >> 26) == 0x1a || (inst >> 26) == 0x1b
> || (inst >> 26) == 0x1f
> || ((inst >> 26) == 0x1f
> && ((inst >> 6) == 0xa)))
> return hppa_extract_5R_store (inst);
>
> The last condition is redundant.
>
OK, thanks.
For me, it is another typo issue bug, according to the code within
inst_saves_gr(), need use "(inst >> 26) == 0x03" instead of the 2nd
"(inst >> 26) == 0x1f".
And are any members familiar with the related logical working flow? If
no reply within this week end, I shall try to be familiar with the
related working flow firstly, then make patch v2 within this month.
Thanks.
--
Chen Gang
Open, share, and attitude like air, water, and life which God blessed