mehdi_amini created this revision.
Herald added a subscriber: emaste.

Reported by coverity, I don't know how to provide a test.


https://reviews.llvm.org/D34550

Files:
  lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp


Index: lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
===================================================================
--- lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
+++ lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
@@ -1693,7 +1693,7 @@
             // ABI Mask doesn't cover N32 and N64 ABI.
             if (header.e_ident[EI_CLASS] == llvm::ELF::ELFCLASS64)
               arch_flags |= lldb_private::ArchSpec::eMIPSABI_N64;
-            else if (header.e_flags && llvm::ELF::EF_MIPS_ABI2)
+            else if (header.e_flags & llvm::ELF::EF_MIPS_ABI2)
               arch_flags |= lldb_private::ArchSpec::eMIPSABI_N32;
             break;
           }


Index: lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
===================================================================
--- lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
+++ lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
@@ -1693,7 +1693,7 @@
             // ABI Mask doesn't cover N32 and N64 ABI.
             if (header.e_ident[EI_CLASS] == llvm::ELF::ELFCLASS64)
               arch_flags |= lldb_private::ArchSpec::eMIPSABI_N64;
-            else if (header.e_flags && llvm::ELF::EF_MIPS_ABI2)
+            else if (header.e_flags & llvm::ELF::EF_MIPS_ABI2)
               arch_flags |= lldb_private::ArchSpec::eMIPSABI_N32;
             break;
           }
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
  • [Lldb-commits] [PATCH] D34550... Mehdi AMINI via Phabricator via lldb-commits

Reply via email to