* [PATCH] PR tdep/9390: Fix possible typo on xstorxstormy16-tdep.c
@ 2014-09-16 20:14 Sergio Durigan Junior
2014-09-16 20:27 ` Pedro Alves
0 siblings, 1 reply; 5+ messages in thread
From: Sergio Durigan Junior @ 2014-09-16 20:14 UTC (permalink / raw)
To: GDB Patches; +Cc: Sergio Durigan Junior
This patch (probably) fixes the bug described in PR tdep/9390, which
is about a wrong check in the following code:
...
/* optional copying of args in r2-r7 to r10-r13. */
/* Probably only in optimized case but legal action for prologue. */
else if ((inst & 0xff00) == 0x4600 /* 46SD mov rD, rS */
&& (inst & 0x00f0) >= 0x0020 && (inst & 0x00f0) <= 0x0070
&& (inst & 0x000f) >= 0x00a0 && (inst & 0x000f) <= 0x000d)
^^^^^^^^^^^^^^^^^^^^^^^^^
...
This condition will never trigger, and the fix proposed in the bug
(which made sense to me) was to test against 0x000a. I tried finding
documentation about this target, but couldn't find anything. I don't
even know if it is still used, but decided to submit the fix anyway.
Tested on my x86_64 Fedora 20 GNU/Linux.
gdb/ChangeLog:
2014-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
PR tdep/9390
* xstorxstormy16-tdep.c (xstormy16_analyze_prologue): Fix possible
typo when using logical AND to determine instruction type.
---
gdb/ChangeLog | 6 ++++++
gdb/xstormy16-tdep.c | 2 +-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 8216274..622976d 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,11 @@
2014-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
+ PR tdep/9390
+ * xstorxstormy16-tdep.c (xstormy16_analyze_prologue): Fix possible
+ typo when using logical AND to determine instruction type.
+
+2014-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
+
* objc-lang.c (find_implementation_from_class): Remove dead code.
2014-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
diff --git a/gdb/xstormy16-tdep.c b/gdb/xstormy16-tdep.c
index af3ff32..9692742 100644
--- a/gdb/xstormy16-tdep.c
+++ b/gdb/xstormy16-tdep.c
@@ -374,7 +374,7 @@ xstormy16_analyze_prologue (struct gdbarch *gdbarch,
/* Probably only in optimized case but legal action for prologue. */
else if ((inst & 0xff00) == 0x4600 /* 46SD mov rD, rS */
&& (inst & 0x00f0) >= 0x0020 && (inst & 0x00f0) <= 0x0070
- && (inst & 0x000f) >= 0x00a0 && (inst & 0x000f) <= 0x000d)
+ && (inst & 0x000f) >= 0x000a && (inst & 0x000f) <= 0x000d)
;
/* Optional copying of args in r2-r7 to stack. */
--
1.9.3
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] PR tdep/9390: Fix possible typo on xstorxstormy16-tdep.c
2014-09-16 20:14 [PATCH] PR tdep/9390: Fix possible typo on xstorxstormy16-tdep.c Sergio Durigan Junior
@ 2014-09-16 20:27 ` Pedro Alves
2014-10-08 8:33 ` Corinna Vinschen
0 siblings, 1 reply; 5+ messages in thread
From: Pedro Alves @ 2014-09-16 20:27 UTC (permalink / raw)
To: Sergio Durigan Junior, GDB Patches, Corinna Vinschen
[Adding Corinna, listed as xstormy16 maintainer in MAINTAINERS.
Hi Corinna. Do we still care about this port?]
The fix makes sense to me, though I know nothing about
xstormy16 either.
Thanks,
Pedro Alves
On 09/16/2014 09:14 PM, Sergio Durigan Junior wrote:
> This patch (probably) fixes the bug described in PR tdep/9390, which
> is about a wrong check in the following code:
>
> ...
>
> /* optional copying of args in r2-r7 to r10-r13. */
> /* Probably only in optimized case but legal action for prologue. */
> else if ((inst & 0xff00) == 0x4600 /* 46SD mov rD, rS */
> && (inst & 0x00f0) >= 0x0020 && (inst & 0x00f0) <= 0x0070
> && (inst & 0x000f) >= 0x00a0 && (inst & 0x000f) <= 0x000d)
> ^^^^^^^^^^^^^^^^^^^^^^^^^
> ...
>
> This condition will never trigger, and the fix proposed in the bug
> (which made sense to me) was to test against 0x000a. I tried finding
> documentation about this target, but couldn't find anything. I don't
> even know if it is still used, but decided to submit the fix anyway.
>
> Tested on my x86_64 Fedora 20 GNU/Linux.
>
> gdb/ChangeLog:
> 2014-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
>
> PR tdep/9390
> * xstorxstormy16-tdep.c (xstormy16_analyze_prologue): Fix possible
> typo when using logical AND to determine instruction type.
> ---
> gdb/ChangeLog | 6 ++++++
> gdb/xstormy16-tdep.c | 2 +-
> 2 files changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/gdb/ChangeLog b/gdb/ChangeLog
> index 8216274..622976d 100644
> --- a/gdb/ChangeLog
> +++ b/gdb/ChangeLog
> @@ -1,5 +1,11 @@
> 2014-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
>
> + PR tdep/9390
> + * xstorxstormy16-tdep.c (xstormy16_analyze_prologue): Fix possible
> + typo when using logical AND to determine instruction type.
> +
> +2014-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
> +
> * objc-lang.c (find_implementation_from_class): Remove dead code.
>
> 2014-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
> diff --git a/gdb/xstormy16-tdep.c b/gdb/xstormy16-tdep.c
> index af3ff32..9692742 100644
> --- a/gdb/xstormy16-tdep.c
> +++ b/gdb/xstormy16-tdep.c
> @@ -374,7 +374,7 @@ xstormy16_analyze_prologue (struct gdbarch *gdbarch,
> /* Probably only in optimized case but legal action for prologue. */
> else if ((inst & 0xff00) == 0x4600 /* 46SD mov rD, rS */
> && (inst & 0x00f0) >= 0x0020 && (inst & 0x00f0) <= 0x0070
> - && (inst & 0x000f) >= 0x00a0 && (inst & 0x000f) <= 0x000d)
> + && (inst & 0x000f) >= 0x000a && (inst & 0x000f) <= 0x000d)
> ;
>
> /* Optional copying of args in r2-r7 to stack. */
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] PR tdep/9390: Fix possible typo on xstorxstormy16-tdep.c
2014-09-16 20:27 ` Pedro Alves
@ 2014-10-08 8:33 ` Corinna Vinschen
2014-10-09 17:48 ` Sergio Durigan Junior
0 siblings, 1 reply; 5+ messages in thread
From: Corinna Vinschen @ 2014-10-08 8:33 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 3255 bytes --]
On Sep 16 21:27, Pedro Alves wrote:
> [Adding Corinna, listed as xstormy16 maintainer in MAINTAINERS.
> Hi Corinna. Do we still care about this port?]
Hi Pedro. Sorry for the delay. Yes, we still care for this port.
> The fix makes sense to me, though I know nothing about
> xstormy16 either.
The patch is fine. The expression is trying to check for certain
registers in a mov, and the register numbers are encoded in the lowest
nibble. There's definitely a typo.
Thanks,
Corinna
>
> Thanks,
> Pedro Alves
>
> On 09/16/2014 09:14 PM, Sergio Durigan Junior wrote:
> > This patch (probably) fixes the bug described in PR tdep/9390, which
> > is about a wrong check in the following code:
> >
> > ...
> >
> > /* optional copying of args in r2-r7 to r10-r13. */
> > /* Probably only in optimized case but legal action for prologue. */
> > else if ((inst & 0xff00) == 0x4600 /* 46SD mov rD, rS */
> > && (inst & 0x00f0) >= 0x0020 && (inst & 0x00f0) <= 0x0070
> > && (inst & 0x000f) >= 0x00a0 && (inst & 0x000f) <= 0x000d)
> > ^^^^^^^^^^^^^^^^^^^^^^^^^
> > ...
> >
> > This condition will never trigger, and the fix proposed in the bug
> > (which made sense to me) was to test against 0x000a. I tried finding
> > documentation about this target, but couldn't find anything. I don't
> > even know if it is still used, but decided to submit the fix anyway.
> >
> > Tested on my x86_64 Fedora 20 GNU/Linux.
> >
> > gdb/ChangeLog:
> > 2014-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
> >
> > PR tdep/9390
> > * xstorxstormy16-tdep.c (xstormy16_analyze_prologue): Fix possible
> > typo when using logical AND to determine instruction type.
> > ---
> > gdb/ChangeLog | 6 ++++++
> > gdb/xstormy16-tdep.c | 2 +-
> > 2 files changed, 7 insertions(+), 1 deletion(-)
> >
> > diff --git a/gdb/ChangeLog b/gdb/ChangeLog
> > index 8216274..622976d 100644
> > --- a/gdb/ChangeLog
> > +++ b/gdb/ChangeLog
> > @@ -1,5 +1,11 @@
> > 2014-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
> >
> > + PR tdep/9390
> > + * xstorxstormy16-tdep.c (xstormy16_analyze_prologue): Fix possible
> > + typo when using logical AND to determine instruction type.
> > +
> > +2014-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
> > +
> > * objc-lang.c (find_implementation_from_class): Remove dead code.
> >
> > 2014-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
> > diff --git a/gdb/xstormy16-tdep.c b/gdb/xstormy16-tdep.c
> > index af3ff32..9692742 100644
> > --- a/gdb/xstormy16-tdep.c
> > +++ b/gdb/xstormy16-tdep.c
> > @@ -374,7 +374,7 @@ xstormy16_analyze_prologue (struct gdbarch *gdbarch,
> > /* Probably only in optimized case but legal action for prologue. */
> > else if ((inst & 0xff00) == 0x4600 /* 46SD mov rD, rS */
> > && (inst & 0x00f0) >= 0x0020 && (inst & 0x00f0) <= 0x0070
> > - && (inst & 0x000f) >= 0x00a0 && (inst & 0x000f) <= 0x000d)
> > + && (inst & 0x000f) >= 0x000a && (inst & 0x000f) <= 0x000d)
> > ;
> >
> > /* Optional copying of args in r2-r7 to stack. */
> >
--
Corinna Vinschen
Cygwin Maintainer
Red Hat
[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] PR tdep/9390: Fix possible typo on xstorxstormy16-tdep.c
2014-10-08 8:33 ` Corinna Vinschen
@ 2014-10-09 17:48 ` Sergio Durigan Junior
2014-10-09 18:01 ` Corinna Vinschen
0 siblings, 1 reply; 5+ messages in thread
From: Sergio Durigan Junior @ 2014-10-09 17:48 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 773 bytes --]
On Wednesday, October 08 2014, Corinna Vinschen wrote:
> On Sep 16 21:27, Pedro Alves wrote:
>> [Adding Corinna, listed as xstormy16 maintainer in MAINTAINERS.
>> Hi Corinna. Do we still care about this port?]
>
> Hi Pedro. Sorry for the delay. Yes, we still care for this port.
>
>> The fix makes sense to me, though I know nothing about
>> xstormy16 either.
>
> The patch is fine. The expression is trying to check for certain
> registers in a mov, and the register numbers are encoded in the lowest
> nibble. There's definitely a typo.
Thanks, Corinna.
I have pushed the patch.
<https://sourceware.org/ml/gdb-cvs/2014-10/msg00026.html>
--
Sergio
GPG key ID: 0x65FC5E36
Please send encrypted e-mail if possible
http://sergiodj.net/
[-- Attachment #2: Type: application/pgp-signature, Size: 818 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] PR tdep/9390: Fix possible typo on xstorxstormy16-tdep.c
2014-10-09 17:48 ` Sergio Durigan Junior
@ 2014-10-09 18:01 ` Corinna Vinschen
0 siblings, 0 replies; 5+ messages in thread
From: Corinna Vinschen @ 2014-10-09 18:01 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 834 bytes --]
On Oct 9 13:47, Sergio Durigan Junior wrote:
> On Wednesday, October 08 2014, Corinna Vinschen wrote:
>
> > On Sep 16 21:27, Pedro Alves wrote:
> >> [Adding Corinna, listed as xstormy16 maintainer in MAINTAINERS.
> >> Hi Corinna. Do we still care about this port?]
> >
> > Hi Pedro. Sorry for the delay. Yes, we still care for this port.
> >
> >> The fix makes sense to me, though I know nothing about
> >> xstormy16 either.
> >
> > The patch is fine. The expression is trying to check for certain
> > registers in a mov, and the register numbers are encoded in the lowest
> > nibble. There's definitely a typo.
>
> Thanks, Corinna.
>
> I have pushed the patch.
>
> <https://sourceware.org/ml/gdb-cvs/2014-10/msg00026.html>
Thanks!
Corinna
--
Corinna Vinschen
Cygwin Maintainer
Red Hat
[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-10-09 18:01 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-16 20:14 [PATCH] PR tdep/9390: Fix possible typo on xstorxstormy16-tdep.c Sergio Durigan Junior
2014-09-16 20:27 ` Pedro Alves
2014-10-08 8:33 ` Corinna Vinschen
2014-10-09 17:48 ` Sergio Durigan Junior
2014-10-09 18:01 ` Corinna Vinschen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).