aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorFred Fish <fnf@specifix.com>1996-07-30 06:15:13 +0000
committerFred Fish <fnf@specifix.com>1996-07-30 06:15:13 +0000
commit80e0e92aaa620acae14e46a2b63f01cb29f21602 (patch)
tree50d2ea4d1feaf40bf5e30e7d678a8ad89c06992f /gdb
parent58b4fad2269dee3b8940183e747f4c34e0df9ca0 (diff)
downloadgdb-80e0e92aaa620acae14e46a2b63f01cb29f21602.zip
gdb-80e0e92aaa620acae14e46a2b63f01cb29f21602.tar.gz
gdb-80e0e92aaa620acae14e46a2b63f01cb29f21602.tar.bz2
* mips-tdep.c (mips_read_processor_type): Add parens around
bitwise-and operands in comparison; previous expression always evaluated to 0 because of equality comparison of two constants.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/mips-tdep.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index d60d61e..f901c0c 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,9 @@
Mon Jul 29 21:13:20 1996 Fred Fish <fnf@cygnus.com>
+ * mips-tdep.c (mips_read_processor_type): Add parens around
+ bitwise-and operands in comparison; previous expression always
+ evaluated to 0 because of equality comparison of two constants.
+
* rs6000-tdep.c (skip_prologue): Add missing parens around
operands of logical-or so that first operand does not bind
to previous logical-and.
diff --git a/gdb/mips-tdep.c b/gdb/mips-tdep.c
index 427e0f6..6a37d1a 100644
--- a/gdb/mips-tdep.c
+++ b/gdb/mips-tdep.c
@@ -1505,7 +1505,7 @@ mips_read_processor_type ()
prid = read_register (PRID_REGNUM);
- if (prid & ~0xf == 0x700)
+ if ((prid & ~0xf) == 0x700)
return savestring ("r3041", strlen("r3041"));
return NULL;