Skip to content

Commit

Permalink
Make gymrat's warnings debug messages.
Browse files Browse the repository at this point in the history
  • Loading branch information
ltfish committed Nov 22, 2023
1 parent 7978bc4 commit 1332ba0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
16 changes: 8 additions & 8 deletions pyvex/lifting/gym/arm_spotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def match_instruction(self, data, bitstrm):
return True

def compute_result(self): # pylint: disable=arguments-differ
log.warning(
log.debug(
"Ignoring STMxx ^ instruction at %#x. This mode is not implemented by VEX! "
"See pyvex/lifting/gym/arm_spotter.py",
self.addr,
Expand All @@ -200,7 +200,7 @@ def match_instruction(self, data, bitstrm):

def compute_result(self): # pylint: disable=arguments-differ
# test if PC will be set. If so, the jumpkind of this block should be Ijk_Ret
log.warning("Spotting an LDM instruction at %#x. This is not fully tested. Prepare for errors.", self.addr)
log.debug("Spotting an LDM instruction at %#x. This is not fully tested. Prepare for errors.", self.addr)
# l.warning(repr(self.rawbits))
# l.warning(repr(self.data))

Expand Down Expand Up @@ -324,15 +324,15 @@ def compute_result(self): # pylint: disable=arguments-differ
src = self.get(src_reg, Type.int_32)
self.put(src, "primask")
else:
log.warning(
log.debug(
"[thumb] FIXME: tMSR at %#x is writing into an unsupported special register %#x. "
"Ignoring the instruction.",
self.addr,
dest_spec_reg,
)
else:
log.warning("[thumb] tMSR at %#x is writing SPSR. Ignoring the instruction. FixMe.", self.addr)
log.warning(
log.debug("[thumb] tMSR at %#x is writing SPSR. Ignoring the instruction. FixMe.", self.addr)
log.debug(
"[thumb] Spotting an tMSR instruction at %#x. This is not fully tested. Prepare for errors.", self.addr
)

Expand All @@ -357,16 +357,16 @@ def compute_result(self): # pylint: disable=arguments-differ
src = self.get("primask", Type.int_32)
self.put(src, dest_reg)
else:
log.warning(
log.debug(
"[thumb] FIXME: tMRS at %#x is using the unsupported special register %#x. "
"Ignoring the instruction.",
self.addr,
spec_reg,
)
else:
log.warning("[thumb] tMRS at %#x is reading from SPSR. Ignoring the instruction. FixMe.", self.addr)
log.debug("[thumb] tMRS at %#x is reading from SPSR. Ignoring the instruction. FixMe.", self.addr)
log.debug("[thumb] Ignoring tMRS instruction at %#x.", self.addr)
log.warning(
log.debug(
"[thumb] Spotting an tMRS instruction at %#x. This is not fully tested. Prepare for errors.", self.addr
)

Expand Down
6 changes: 3 additions & 3 deletions pyvex/lifting/gym/x86_spotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def compute_result(self): # pylint: disable=arguments-differ
temp_al = temp_al % base
self.put(temp_ah, "ah")
self.put(temp_al, "al")
log.warning(
log.debug(
"The generalized AAM instruction is not supported by VEX, and is handled specially by pyvex."
" It has no flag handling at present. See pyvex/lifting/gym/x86_spotter.py for details"
)
Expand All @@ -100,8 +100,8 @@ def compute_result(self): # pylint: disable=arguments-differ
temp_ah = self.constant(0, Type.int_8)
self.put(temp_ah, "ah")
self.put(temp_al, "al")
log.warning(
"The generalized AAM instruction is not supported by VEX, and is handled specially by pyvex."
log.debug(
"The generalized AAD instruction is not supported by VEX, and is handled specially by pyvex."
" It has no flag handling at present. See pyvex/lifting/gym/x86_spotter.py for details"
)

Expand Down

0 comments on commit 1332ba0

Please sign in to comment.